10 using std::make_unique;
14 using std::unique_ptr;
19 BaseProperties::BaseProperties(
const string& name,
const string& description)
38 return propertyByNameIt->second;
47 return propertyByNameIt->second;
77 auto property = make_unique<BaseProperty>(
name, value);
113 property->setValue(value);
125 auto property = propertyByNameIt->second;
126 for (
auto i = 0; i <
properties.size(); i++) {
void clearProperties()
Clears properties.
bool updateProperty(const string &oldName, const string &name, const string &value)
Update a property.
vector< unique_ptr< BaseProperty > > properties
const int getPropertyIndex(const string &name) const
Get property index.
const BaseProperty * getProperty(const string &name) const
Retrieve property by name.
map< string, BaseProperty * > propertiesByName
virtual ~BaseProperties()
Destructor.
bool addProperty(const string &name, const string &value)
Add a property.
bool removeProperty(const string &name)
Removes a property.
bool renameProperty(const string &oldName, const string &name)
Rename a property.
Base property model class.
void setName(const string &name)
Set up name.