m_Properties(properties), m_Tags(boost::make_shared<Dictionary>())
{ }
-ConfigObject::ConfigObject(string type, string name, const ConfigObject::Set::Ptr& container)
- : m_Container(container ? container : GetAllObjects()),
- m_Properties(boost::make_shared<Dictionary>()), m_Tags(boost::make_shared<Dictionary>())
-{
- SetProperty("__type", type);
- SetProperty("__name", name);
-}
-
void ConfigObject::SetProperties(Dictionary::Ptr properties)
{
m_Properties = properties;
return name;
}
-void ConfigObject::SetLocal(bool value)
-{
- GetProperties()->Set("__local", value ? 1 : 0);
-}
-
bool ConfigObject::IsLocal(void) const
{
bool value = false;
return value;
}
-void ConfigObject::SetAbstract(bool value)
-{
- GetProperties()->Set("__abstract", value ? 1 : 0);
-}
-
bool ConfigObject::IsAbstract(void) const
{
bool value = false;
typedef ObjectSet<ConfigObject::Ptr> Set;
ConfigObject(Dictionary::Ptr properties, const Set::Ptr& container = Set::Ptr());
- ConfigObject(string type, string name, const Set::Ptr& container = Set::Ptr());
void SetProperties(Dictionary::Ptr config);
Dictionary::Ptr GetProperties(void) const;
- template<typename T>
- void SetProperty(const string& key, const T& value)
- {
- GetProperties()->Set(key, value);
- }
-
template<typename T>
bool GetProperty(const string& key, T *value) const
{
string GetType(void) const;
string GetName(void) const;
- void SetLocal(bool value);
bool IsLocal(void) const;
-
- void SetAbstract(bool value);
bool IsAbstract(void) const;
void SetSource(const string& value);