"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/base/namespace.hpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

namespace.hpp  (icinga2-2.11.5):namespace.hpp  (icinga2-2.12.0)
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */ /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
#ifndef NAMESPACE_H #ifndef NAMESPACE_H
#define NAMESPACE_H #define NAMESPACE_H
#include "base/i2-base.hpp" #include "base/i2-base.hpp"
#include "base/object.hpp" #include "base/object.hpp"
#include "base/shared-object.hpp"
#include "base/value.hpp" #include "base/value.hpp"
#include "base/debuginfo.hpp" #include "base/debuginfo.hpp"
#include <map> #include <map>
#include <vector> #include <vector>
#include <memory> #include <memory>
namespace icinga namespace icinga
{ {
struct NamespaceValue struct NamespaceValue : public SharedObject
{ {
DECLARE_PTR_TYPEDEFS(NamespaceValue);
virtual Value Get(const DebugInfo& debugInfo = DebugInfo()) const = 0; virtual Value Get(const DebugInfo& debugInfo = DebugInfo()) const = 0;
virtual void Set(const Value& value, bool overrideFrozen, const DebugInfo & debugInfo = DebugInfo()) = 0; virtual void Set(const Value& value, bool overrideFrozen, const DebugInfo & debugInfo = DebugInfo()) = 0;
}; };
struct EmbeddedNamespaceValue : public NamespaceValue struct EmbeddedNamespaceValue : public NamespaceValue
{ {
EmbeddedNamespaceValue(const Value& value); EmbeddedNamespaceValue(const Value& value);
Value Get(const DebugInfo& debugInfo) const override; Value Get(const DebugInfo& debugInfo) const override;
void Set(const Value& value, bool overrideFrozen, const DebugInfo& debugI nfo) override; void Set(const Value& value, bool overrideFrozen, const DebugInfo& debugI nfo) override;
skipping to change at line 69 skipping to change at line 72
/** /**
* A namespace. * A namespace.
* *
* @ingroup base * @ingroup base
*/ */
class Namespace final : public Object class Namespace final : public Object
{ {
public: public:
DECLARE_OBJECT(Namespace); DECLARE_OBJECT(Namespace);
typedef std::map<String, std::shared_ptr<NamespaceValue> >::iterator Iter ator; typedef std::map<String, NamespaceValue::Ptr>::iterator Iterator;
typedef std::map<String, std::shared_ptr<NamespaceValue> >::value_type Pa ir; typedef std::map<String, NamespaceValue::Ptr>::value_type Pair;
Namespace(NamespaceBehavior *behavior = new NamespaceBehavior); Namespace(NamespaceBehavior *behavior = new NamespaceBehavior);
Value Get(const String& field) const; Value Get(const String& field) const;
bool Get(const String& field, Value *value) const; bool Get(const String& field, Value *value) const;
void Set(const String& field, const Value& value, bool overrideFrozen = f alse); void Set(const String& field, const Value& value, bool overrideFrozen = f alse);
bool Contains(const String& field) const; bool Contains(const String& field) const;
void Remove(const String& field, bool overrideFrozen = false); void Remove(const String& field, bool overrideFrozen = false);
std::shared_ptr<NamespaceValue> GetAttribute(const String& field) const; NamespaceValue::Ptr GetAttribute(const String& field) const;
void SetAttribute(const String& field, const std::shared_ptr<NamespaceVal void SetAttribute(const String& field, const NamespaceValue::Ptr& nsVal);
ue>& nsVal);
void RemoveAttribute(const String& field); void RemoveAttribute(const String& field);
Iterator Begin(); Iterator Begin();
Iterator End(); Iterator End();
Value GetFieldByName(const String& field, bool sandboxed, const DebugInfo & debugInfo) const override; Value GetFieldByName(const String& field, bool sandboxed, const DebugInfo & debugInfo) const override;
void SetFieldByName(const String& field, const Value& value, bool overrid eFrozen, const DebugInfo& debugInfo) override; void SetFieldByName(const String& field, const Value& value, bool overrid eFrozen, const DebugInfo& debugInfo) override;
bool HasOwnField(const String& field) const override; bool HasOwnField(const String& field) const override;
bool GetOwnField(const String& field, Value *result) const override; bool GetOwnField(const String& field, Value *result) const override;
static Object::Ptr GetPrototype(); static Object::Ptr GetPrototype();
private: private:
std::map<String, std::shared_ptr<NamespaceValue> > m_Data; std::map<String, NamespaceValue::Ptr> m_Data;
std::unique_ptr<NamespaceBehavior> m_Behavior; std::unique_ptr<NamespaceBehavior> m_Behavior;
}; };
Namespace::Iterator begin(const Namespace::Ptr& x); Namespace::Iterator begin(const Namespace::Ptr& x);
Namespace::Iterator end(const Namespace::Ptr& x); Namespace::Iterator end(const Namespace::Ptr& x);
} }
extern template class std::map<icinga::String, std::shared_ptr<icinga::Namespace Value> >; extern template class std::map<icinga::String, std::shared_ptr<icinga::Namespace Value> >;
 End of changes. 7 change blocks. 
7 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)