The Properties class represents a persistent set of properties. The Properties can be saved to a file (Ex.: .json) or loaded from a file (Ex.: .json). Also used for interaction, with user or other classes of this module, to change state of a MVC Component. More...
#include <Properties.h>
Public Member Functions | |
virtual bool | addProperty (Property property) |
Adds the specified property to the set of properties for this object. More... | |
virtual bool | clear () |
Clear set of properties of this object. More... | |
virtual bool | contains (Property property) |
Checks if the property is contained within the set of properties. More... | |
virtual Property | contains (std::string name) |
Checks if the name is contained within the set of properties. More... | |
virtual int | getHashCode () |
Returns the hashcode of a MVC component. More... | |
virtual std::string | getObjectName () |
Returns object name that owns these properties. More... | |
virtual std::vector< Property > | getProperties () |
Returns set of all properties. More... | |
virtual EnumType * | getTypeObj () |
Returns object type that owns these properties. More... | |
virtual bool | hasWindows () |
Properties (std::string objectName, EnumType *type=0, int hashCode=0) | |
Constructor. More... | |
virtual bool | removeProperty (std::string name) |
Removes a property from the set of properties of this object. More... | |
virtual void | setHashCode (int hashCode) |
Sets the hashcode of a MVC component. More... | |
virtual void | setHasWindows (bool windows) |
virtual void | setObjectName (std::string name) |
Sets object name that owns these properties. More... | |
virtual void | setTypeObj (EnumType *type) |
Sets object type that owns these properties. More... | |
virtual | ~Properties (void) |
Destructor. More... | |
Protected Attributes | |
int | m_hashcode |
bool | m_hasWindows |
std::string | m_objName |
Object name that owns these properties. More... | |
std::vector< Property > | m_properties |
set of properties for this object More... | |
EnumType * | m_typeObj |
Object type that owns these properties. More... | |
The Properties class represents a persistent set of properties. The Properties can be saved to a file (Ex.: .json) or loaded from a file (Ex.: .json). Also used for interaction, with user or other classes of this module, to change state of a MVC Component.
Definition at line 52 of file Properties.h.
|
inline |
Constructor.
objectName | Object name that owns these properties |
type | Object type that owns these properties |
Definition at line 181 of file Properties.h.
|
inlinevirtual |
Destructor.
Definition at line 189 of file Properties.h.
|
inlinevirtual |
Adds the specified property to the set of properties for this object.
property | specified property |
Definition at line 193 of file Properties.h.
References m_properties.
Referenced by te::layout::ItemModelObservable::addChildrenProperties(), te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertyBrowser::getProperties(), te::layout::JSON::retrieve(), te::layout::PropertiesUtils::sameProperties(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), te::layout::PropertiesOutside::sendPropertyToSelectedItems(), and te::layout::GridSettingsModel::updateProperty().
|
inlinevirtual |
Clear set of properties of this object.
Definition at line 225 of file Properties.h.
References m_properties.
Referenced by te::layout::MapLayerChoiceModel::getProperties(), te::layout::TextGridSettingsModel::getProperties(), te::layout::PageSetupModel::getProperties(), te::layout::SystematicScaleModel::getProperties(), te::layout::ItemModelObservable::getProperties(), te::layout::OutsideModelObservable::getProperties(), te::layout::OutsideModelObservable::getPublicProperties(), te::layout::ItemModelObservable::getPublicProperties(), and te::layout::ChangePropertyCommand::~ChangePropertyCommand().
|
inlinevirtual |
Checks if the property is contained within the set of properties.
property |
Definition at line 251 of file Properties.h.
References m_properties.
Referenced by te::layout::GridSettingsModel::containsProperty(), te::layout::AbstractBuildGraphicsItem::findCoordinate(), te::layout::AbstractBuildGraphicsItem::findZValue(), te::layout::LineModel::updateProperties(), te::layout::TitleModel::updateProperties(), te::layout::PointModel::updateProperties(), te::layout::TextModel::updateProperties(), te::layout::ImageModel::updateProperties(), te::layout::MapModel::updateProperties(), te::layout::ScaleModel::updateProperties(), te::layout::LegendModel::updateProperties(), te::layout::GridMapModel::updateProperties(), te::layout::ItemModelObservable::updateProperties(), and te::layout::GridSettingsModel::updateProperty().
|
inlinevirtual |
Checks if the name is contained within the set of properties.
name | name of the property |
Definition at line 263 of file Properties.h.
References m_properties.
|
inlinevirtual |
Returns the hashcode of a MVC component.
Definition at line 290 of file Properties.h.
|
inlinevirtual |
Returns object name that owns these properties.
Definition at line 231 of file Properties.h.
References m_objName.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertiesOutside::itemsSelected(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), and te::layout::PropertiesOutside::sendPropertyToSelectedItems().
|
inlinevirtual |
Returns set of all properties.
Definition at line 220 of file Properties.h.
References m_properties.
Referenced by te::layout::ItemModelObservable::addChildrenProperties(), te::layout::ChangePropertyCommand::equals(), te::layout::ItemUtils::getGridMapProperties(), te::layout::OutsideObserver::getProperties(), te::layout::PropertiesOutside::itemsSelected(), te::layout::JSON::loadFromProperties(), te::layout::PropertiesUtils::sameProperties(), te::layout::PropertyBrowser::updateProperties(), and te::layout::OutsideModelObservable::updateProperties().
|
inlinevirtual |
Returns object type that owns these properties.
Definition at line 241 of file Properties.h.
References m_typeObj.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::GridSettingsModel::containsGrid(), te::layout::JSON::loadFromProperties(), te::layout::BuildGraphicsItem::rebuildItem(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), and te::layout::PropertiesOutside::sendPropertyToSelectedItems().
|
inlinevirtual |
Definition at line 285 of file Properties.h.
Referenced by te::layout::PropertiesUtils::getAllProperties(), and te::layout::PropertiesUtils::intersection().
|
inlinevirtual |
Removes a property from the set of properties of this object.
property | specified property |
Definition at line 204 of file Properties.h.
References m_properties.
Referenced by te::layout::GridSettingsModel::updateProperty().
|
inlinevirtual |
Sets the hashcode of a MVC component.
Definition at line 295 of file Properties.h.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::ItemModelObservable::ItemModelObservable(), and te::layout::OutsideModelObservable::OutsideModelObservable().
|
inlinevirtual |
Definition at line 280 of file Properties.h.
Referenced by te::layout::ImageModel::ImageModel(), and te::layout::PropertiesOutside::itemsSelected().
|
inlinevirtual |
Sets object name that owns these properties.
object | name that owns these properties |
Definition at line 236 of file Properties.h.
References m_objName.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), and te::layout::PropertiesOutside::sendPropertyToSelectedItems().
|
inlinevirtual |
Sets object type that owns these properties.
object | type that owns these properties |
Definition at line 246 of file Properties.h.
References m_typeObj.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::JSON::retrieve(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), and te::layout::PropertiesOutside::sendPropertyToSelectedItems().
|
protected |
Definition at line 177 of file Properties.h.
|
protected |
Definition at line 176 of file Properties.h.
|
protected |
Object name that owns these properties.
Definition at line 174 of file Properties.h.
Referenced by getObjectName(), and setObjectName().
|
protected |
set of properties for this object
Definition at line 173 of file Properties.h.
Referenced by addProperty(), clear(), contains(), getProperties(), and removeProperty().
|
protected |
Object type that owns these properties.
Definition at line 175 of file Properties.h.
Referenced by getTypeObj(), and setTypeObj().