Loading...
Searching...
No Matches
Ogre::PropertySet Class Reference
Optional Components » Property

Defines a complete set of properties for a single object instance. More...

`#include <OgreProperty.h>`

Inheritance diagram for Ogre::PropertySet:
[legend]

## Public Types

typedef std::map< String, PropertyBase * > | PropertyMap

## Public Member Functions

| PropertySet ()
| ~PropertySet ()
void | addProperty (PropertyBase *prop)
| Adds a property to this set.
PropertyBase * | getProperty (const String &name) const
| Gets the property object for a given property name.
template<typename T>
void | getValue (const String &name, T &value) const
| Get a named property value.
PropertyValueMap | getValueMap () const
| Gets an independently usable collection of property values from the current state.
bool | hasProperty (const String &name) const
| Reports whether this property set contains a named property.
void | removeProperty (const String &name)
| Removes the named property from the property set.
void | setValue (const String &name, const char *pChar)
| Special-case char*, convert to String automatically.
template<typename T>
void | setValue (const String &name, const T *value)
| Set a named property value (via pointer to avoid copy).
template<typename T>
void | setValue (const String &name, T value)
| Set a named property value.
void | setValueMap (const PropertyValueMap &values)
| Sets the current state from a given value map.

## Detailed Description

Defines a complete set of properties for a single object instance.

## Member Typedef Documentation

## PropertyMap

typedef std::map<String, PropertyBase*> Ogre::PropertySet::PropertyMap

## Constructor & Destructor Documentation

## PropertySet()

Ogre::PropertySet::PropertySet | ( |  | ) |

## ~PropertySet()

Ogre::PropertySet::~PropertySet | ( |  | ) |

## Member Function Documentation

## addProperty()

void Ogre::PropertySet::addProperty | ( | PropertyBase * | prop | ) |

Adds a property to this set.

The PropertySet is responsible for deleting this object.

## getProperty()

PropertyBase * Ogre::PropertySet::getProperty | ( | const String & | name | ) | const

Gets the property object for a given property name.

Note that this property will need to be cast to a templated property compatible with the type you will be setting. You might find the overloaded set and get<type> methods quicker if you already know the type.

## hasProperty()

bool Ogre::PropertySet::hasProperty | ( | const String & | name | ) | const

Reports whether this property set contains a named property.

## removeProperty()

void Ogre::PropertySet::removeProperty | ( | const String & | name | ) |

Removes the named property from the property set.

## getValueMap()

PropertyValueMap Ogre::PropertySet::getValueMap | ( |  | ) | const

Gets an independently usable collection of property values from the current state.

## setValueMap()

void Ogre::PropertySet::setValueMap | ( | const PropertyValueMap & | values | ) |

Sets the current state from a given value map.

## getValue()

template<typename T>

void Ogre::PropertySet::getValue | ( | const String & | name,
|  | T & | value ) const

inline

Get a named property value.

References Ogre::PropertyDef::getTypeForValue().

## setValue() [1/3]

template<typename T>

void Ogre::PropertySet::setValue | ( | const String & | name,
|  | const T * | value )

inline

Set a named property value (via pointer to avoid copy).

References Ogre::PropertyDef::getTypeForValue().

## setValue() [2/3]

template<typename T>

void Ogre::PropertySet::setValue | ( | const String & | name,
|  | T | value )

inline

Set a named property value.

References Ogre::PropertyDef::getTypeForValue().

## setValue() [3/3]

void Ogre::PropertySet::setValue | ( | const String & | name,
|  | const char * | pChar )

inline

Special-case char*, convert to String automatically.

References Ogre::PROP_STRING.

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

- OgreProperty.h