void CompatComponent::DumpCustomAttributes(std::ostream& fp, const DynamicObject::Ptr& object)
{
- Dictionary::Ptr custom = object->Get("custom");
+ Dictionary::Ptr custom = object->GetCustom();
if (!custom)
return;
RegisterAttribute("__local", Attribute_Config, &m_Local);
RegisterAttribute("__source", Attribute_Local, &m_Source);
RegisterAttribute("methods", Attribute_Config, &m_Methods);
+ RegisterAttribute("custom", Attribute_Config, &m_Custom);
if (!serializedObject->Contains("configTx"))
BOOST_THROW_EXCEPTION(std::invalid_argument("Serialized object must contain a config snapshot."));
return m_Attributes;
}
+
+Dictionary::Ptr DynamicObject::GetCustom(void) const
+{
+ return m_Custom;
+}
static double GetCurrentTx(void);
+ Dictionary::Ptr GetCustom(void) const;
+
protected:
explicit DynamicObject(const Dictionary::Ptr& serializedObject);
Attribute<bool> m_Local;
Attribute<String> m_Source;
Attribute<Dictionary::Ptr> m_Methods;
+ Attribute<Dictionary::Ptr> m_Custom;
bool m_Registered; /**< protected by the type mutex */
RegisterAttribute("display_name", Attribute_Config, &m_DisplayName);
RegisterAttribute("hostgroups", Attribute_Config, &m_HostGroups);
RegisterAttribute("macros", Attribute_Config, &m_Macros);
- RegisterAttribute("custom", Attribute_Config, &m_Custom);
RegisterAttribute("hostdependencies", Attribute_Config, &m_HostDependencies);
RegisterAttribute("servicedependencies", Attribute_Config, &m_ServiceDependencies);
RegisterAttribute("hostcheck", Attribute_Config, &m_HostCheck);
return m_Macros;
}
-Dictionary::Ptr Host::GetCustom(void) const
-{
- return m_Custom;
-}
-
Array::Ptr Host::GetHostDependencies(void) const
{
return m_HostDependencies;;
Array::Ptr GetGroups(void) const;
Dictionary::Ptr GetMacros(void) const;
- Dictionary::Ptr GetCustom(void) const;
Array::Ptr GetHostDependencies(void) const;
Array::Ptr GetServiceDependencies(void) const;
String GetHostCheck(void) const;
Attribute<String> m_DisplayName;
Attribute<Array::Ptr> m_HostGroups;
Attribute<Dictionary::Ptr> m_Macros;
- Attribute<Dictionary::Ptr> m_Custom;
Attribute<Array::Ptr> m_HostDependencies;
Attribute<Array::Ptr> m_ServiceDependencies;
Attribute<String> m_HostCheck;
RegisterAttribute("display_name", Attribute_Config, &m_DisplayName);
RegisterAttribute("macros", Attribute_Config, &m_Macros);
- RegisterAttribute("custom", Attribute_Config, &m_Custom);
RegisterAttribute("hostdependencies", Attribute_Config, &m_HostDependencies);
RegisterAttribute("servicedependencies", Attribute_Config, &m_ServiceDependencies);
RegisterAttribute("servicegroups", Attribute_Config, &m_ServiceGroups);
return m_Macros;
}
-Dictionary::Ptr Service::GetCustom(void) const
-{
- return m_Custom;
-}
-
Array::Ptr Service::GetHostDependencies(void) const
{
return m_HostDependencies;
String GetDisplayName(void) const;
Host::Ptr GetHost(void) const;
Dictionary::Ptr GetMacros(void) const;
- Dictionary::Ptr GetCustom(void) const;
Array::Ptr GetHostDependencies(void) const;
Array::Ptr GetServiceDependencies(void) const;
Array::Ptr GetGroups(void) const;
Attribute<String> m_DisplayName;
Attribute<Dictionary::Ptr> m_Macros;
- Attribute<Dictionary::Ptr> m_Custom;
Attribute<Array::Ptr> m_HostDependencies;
Attribute<Array::Ptr> m_ServiceDependencies;
Attribute<Array::Ptr> m_ServiceGroups;