2012-04-02 08:56:30 +02:00
|
|
|
#ifndef CONFIGOBJECT_H
|
|
|
|
#define CONFIGOBJECT_H
|
2012-03-31 15:18:09 +02:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
class ConfigHive;
|
|
|
|
|
2012-04-20 13:49:04 +02:00
|
|
|
class I2_BASE_API ConfigObject : public Dictionary
|
2012-03-31 15:18:09 +02:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
weak_ptr<ConfigHive> m_Hive;
|
|
|
|
|
|
|
|
string m_Name;
|
|
|
|
string m_Type;
|
2012-04-20 14:20:25 +02:00
|
|
|
bool m_Replicated;
|
2012-03-31 15:18:09 +02:00
|
|
|
|
2012-04-22 16:45:31 +02:00
|
|
|
int PropertyChangedHandler(const PropertyChangedEventArgs& dpcea);
|
2012-04-20 13:49:04 +02:00
|
|
|
|
2012-03-31 15:18:09 +02:00
|
|
|
public:
|
2012-04-02 20:50:35 +02:00
|
|
|
typedef shared_ptr<ConfigObject> Ptr;
|
|
|
|
typedef weak_ptr<ConfigObject> WeakPtr;
|
2012-03-31 15:18:09 +02:00
|
|
|
|
2012-04-04 10:04:38 +02:00
|
|
|
ConfigObject(const string& type, const string& name);
|
|
|
|
|
|
|
|
void SetHive(const weak_ptr<ConfigHive>& hive);
|
2012-03-31 15:18:09 +02:00
|
|
|
weak_ptr<ConfigHive> GetHive(void) const;
|
|
|
|
|
|
|
|
void SetName(const string& name);
|
|
|
|
string GetName(void) const;
|
|
|
|
|
|
|
|
void SetType(const string& type);
|
|
|
|
string GetType(void) const;
|
2012-04-20 14:20:25 +02:00
|
|
|
|
|
|
|
void SetReplicated(bool replicated);
|
|
|
|
bool GetReplicated(void) const;
|
2012-03-31 15:18:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-04-02 08:56:30 +02:00
|
|
|
#endif /* CONFIGOBJECT_H */
|