OGRE: Ogre::PropertySet Class Reference - OGRE Documentation

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

# Ogre::PropertySet Class Reference
[Property]

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

`#include <OgreProperty.h>`

Inheritance diagram for Ogre::PropertySet:
[legend]

List of all members.

## Public Types
typedef map< String, PropertyBase * >::type | PropertyMap
typedef Ogre::MapIterator < PropertyMap > | PropertyIterator
## 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.
bool | hasProperty (const String &name) const
| Reports whether this property set contains a named property.
PropertyIterator | getPropertyIterator ()
| Get an iterator over the available properties.
PropertyValueMap | getValueMap () const
| Gets an independently usable collection of property values from the current state.
void | setValueMap (const PropertyValueMap &values)
| Sets the current state from a given value map.
template<typename T >
void | getValue (const String &name, T &value) const
| Get a named property value.
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 | setValue (const String &name, const char *pChar)
| Special-case char*, convert to String automatically.
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info
void * | operator new[] (size_t sz)
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
## Protected Member Functions
template<typename T >
void | setPropertyImpl (const String &name, const T &val, PropertyType typeCheck)
| Set a named property value, internal implementation (type match required).
template<typename T >
void | getPropertyImpl (const String &name, T &refVal, PropertyType typeCheck) const
| Set a named property value, internal implementation (type match required).
## Protected Attributes
PropertyMap | mPropertyMap

## Detailed Description

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

Definition at line 279 of file OgreProperty.h.

## Member Typedef Documentation

typedef Ogre::MapIterator<PropertyMap> Ogre::PropertySet::PropertyIterator

Definition at line 304 of file OgreProperty.h.

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

Definition at line 303 of file OgreProperty.h.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

Adds a property to this set.

Remarks:
  The PropertySet is responsible for deleting this object.

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

Gets the property object for a given property name.

Remarks:
  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.

template<typename T >

void Ogre::PropertySet::getPropertyImpl | ( | const String & | name,
|  | T & | refVal,
|  | PropertyType | typeCheck |
| ) |  |  | const`[protected]`

Set a named property value, internal implementation (type match required).

Definition at line 368 of file OgreProperty.h.

References Ogre::Exception::ERR_INVALIDPARAMS, Ogre::PropertyBase::getType(), Ogre::PropertyDef::getTypeName(), and OGRE_EXCEPT.

PropertyIterator Ogre::PropertySet::getPropertyIterator | ( |  | ) |

Get an iterator over the available properties.

template<typename T >

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

Get a named property value.

Definition at line 320 of file OgreProperty.h.

References Ogre::PropertyDef::getTypeForValue().

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

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

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

Reports whether this property set contains a named property.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | `[inherited]`

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |  |
| ) |  |  | `[inherited]`

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |  |
| ) |  |  | `[inherited]`

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | `[inherited]`

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr |
| ) |  |  | `[inherited]`

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | `[inherited]`

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func |
| ) |  |  | `[inherited]`

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | `[inherited]`

Definition at line 90 of file OgreMemoryAllocatedObject.h.

template<typename T >

void Ogre::PropertySet::setPropertyImpl | ( | const String & | name,
|  | const T & | val,
|  | PropertyType | typeCheck |
| ) |  |  | `[protected]`

Set a named property value, internal implementation (type match required).

Definition at line 353 of file OgreProperty.h.

References Ogre::Exception::ERR_INVALIDPARAMS, Ogre::PropertyBase::getType(), Ogre::PropertyDef::getTypeName(), and OGRE_EXCEPT.

template<typename T >

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

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

Definition at line 328 of file OgreProperty.h.

References Ogre::PropertyDef::getTypeForValue().

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

Special-case char*, convert to String automatically.

Definition at line 341 of file OgreProperty.h.

References Ogre::PROP_STRING.

template<typename T >

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

Set a named property value.

Definition at line 335 of file OgreProperty.h.

References Ogre::PropertyDef::getTypeForValue().

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

Sets the current state from a given value map.

## Member Data Documentation

PropertyMap Ogre::PropertySet::mPropertyMap`[protected]`

Definition at line 349 of file OgreProperty.h.

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

- OgreProperty.h

Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Wed Nov 3 2010 19:25:04