All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::Properties Class Reference

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< PropertygetProperties ()
 Returns set of all properties. More...
 
virtual EnumTypegetTypeObj ()
 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< Propertym_properties
 set of properties for this object More...
 
EnumTypem_typeObj
 Object type that owns these properties. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

te::layout::Properties::Properties ( std::string  objectName,
EnumType type = 0,
int  hashCode = 0 
)
inline

Constructor.

Parameters
objectNameObject name that owns these properties
typeObject type that owns these properties

Definition at line 181 of file Properties.h.

te::layout::Properties::~Properties ( void  )
inlinevirtual

Destructor.

Definition at line 189 of file Properties.h.

Member Function Documentation

bool te::layout::Properties::addProperty ( Property  property)
inlinevirtual
te::layout::Property te::layout::Properties::contains ( std::string  name)
inlinevirtual

Checks if the name is contained within the set of properties.

Parameters
namename of the property
Returns
true if contained, false otherwise

Definition at line 263 of file Properties.h.

References m_properties.

int te::layout::Properties::getHashCode ( )
inlinevirtual

Returns the hashcode of a MVC component.

Returns
hashCode

Definition at line 290 of file Properties.h.

std::string te::layout::Properties::getObjectName ( )
inlinevirtual

Returns object name that owns these properties.

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().

te::layout::EnumType * te::layout::Properties::getTypeObj ( )
inlinevirtual
bool te::layout::Properties::hasWindows ( )
inlinevirtual
bool te::layout::Properties::removeProperty ( std::string  name)
inlinevirtual

Removes a property from the set of properties of this object.

Parameters
propertyspecified property
Returns
true if remove, false otherwise

Definition at line 204 of file Properties.h.

References m_properties.

Referenced by te::layout::GridSettingsModel::updateProperty().

void te::layout::Properties::setHashCode ( int  hashCode)
inlinevirtual
void te::layout::Properties::setHasWindows ( bool  windows)
inlinevirtual
void te::layout::Properties::setObjectName ( std::string  name)
inlinevirtual

Sets object name that owns these properties.

Parameters
objectname 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().

void te::layout::Properties::setTypeObj ( EnumType type)
inlinevirtual

Sets object type that owns these properties.

Parameters
objecttype 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().

Member Data Documentation

int te::layout::Properties::m_hashcode
protected

Definition at line 177 of file Properties.h.

bool te::layout::Properties::m_hasWindows
protected

Definition at line 176 of file Properties.h.

std::string te::layout::Properties::m_objName
protected

Object name that owns these properties.

Definition at line 174 of file Properties.h.

Referenced by getObjectName(), and setObjectName().

std::vector<Property> te::layout::Properties::m_properties
protected

set of properties for this object

Definition at line 173 of file Properties.h.

Referenced by addProperty(), clear(), contains(), getProperties(), and removeProperty().

EnumType* te::layout::Properties::m_typeObj
protected

Object type that owns these properties.

Definition at line 175 of file Properties.h.

Referenced by getTypeObj(), and setTypeObj().


The documentation for this class was generated from the following file: