1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "base/debuginfo.hpp"
4 #include "base/configtype.hpp"
21 virtual ~NameComposer();
23 virtual String MakeName(const String& shortName, const Object::Ptr& context) const = 0;
24 virtual Dictionary::Ptr ParseName(const String& name) const = 0;
28 abstract class ConfigObjectBase
32 class ConfigObjectBase : public ObjectImpl<ConfigObjectBase>
35 inline DebugInfo GetDebugInfo() const
40 void SetDebugInfo(const DebugInfo& di)
45 inline virtual void Start(bool /* runtimeCreated */)
48 inline virtual void Stop(bool /* runtimeRemoved */)
52 DebugInfo m_DebugInfo;
57 abstract class ConfigObject : ConfigObjectBase < ConfigType
59 [config, no_user_modify] String __name (Name);
60 [config, no_user_modify] String "name" (ShortName) {
62 if (m_ShortName.IsEmpty())
68 [config, no_user_modify] name(Zone) zone (ZoneName);
69 [config, no_user_modify] String package;
70 [config, get_protected, no_user_modify] Array::Ptr templates;
71 [config, no_storage, no_user_modify] Dictionary::Ptr source_location {
74 [get_protected, no_user_modify] bool active;
75 [get_protected, no_user_modify] bool paused {
76 default {{{ return true; }}}
78 [get_protected, no_user_view, no_user_modify] bool start_called;
79 [get_protected, no_user_view, no_user_modify] bool stop_called;
80 [get_protected, no_user_view, no_user_modify] bool pause_called;
81 [get_protected, no_user_view, no_user_modify] bool resume_called;
82 [enum] HAMode ha_mode (HAMode);
83 [protected, no_user_view, no_user_modify] Dictionary::Ptr extensions;
85 [protected, no_user_view, no_user_modify] bool state_loaded;
86 [no_user_modify] Dictionary::Ptr original_attributes;
87 [state, no_user_modify] double version {
88 default {{{ return 0; }}}