OGRE  1.9.0
Ogre::PropertySet Class Reference

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

#include <OgreProperty.h>

Inheritance diagram for Ogre::PropertySet:

Public Types

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

Public Member Functions

 PropertySet ()
 
 ~PropertySet ()
 
void addProperty (PropertyBase *prop)
 Adds a property to this set.
 
PropertyBasegetProperty (const String &name) const
 Gets the property object for a given property name.
 
PropertyIterator getPropertyIterator ()
 Get an iterator over the available properties.
 
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 operator delete (void *ptr)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz)
 
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, const char *file, int line, const char *func)
 operator new, with debug line info
 
void * operator new (size_t sz, void *ptr)
 placement operator new
 
void * operator new (size_t sz, void *ptr)
 placement operator new
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz)
 
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, const char *file, int line, const char *func)
 array operator new, with debug line info
 
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.
 

Protected Member Functions

template<typename T>
void getPropertyImpl (const String &name, T &refVal, PropertyType typeCheck) const
 Get a named property value, internal implementation (type match required)
 
template<typename T>
void setPropertyImpl (const String &name, const T &val, PropertyType typeCheck)
 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

◆ PropertyIterator

◆ PropertyMap

Definition at line 306 of file OgreProperty.h.

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.

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

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.

Referenced by getPropertyImpl(), and setPropertyImpl().

◆ getPropertyImpl()

template<typename T>
void Ogre::PropertySet::getPropertyImpl ( const String & name,
T & refVal,
PropertyType typeCheck ) const
protected

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

Definition at line 371 of file OgreProperty.h.

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

Referenced by getValue().

◆ getPropertyIterator()

PropertyIterator Ogre::PropertySet::getPropertyIterator ( )

Get an iterator over the available properties.

◆ getValue()

template<typename T>
void Ogre::PropertySet::getValue ( const String & name,
T & value ) const

Get a named property value.

Definition at line 323 of file OgreProperty.h.

References getPropertyImpl(), and Ogre::PropertyDef::getTypeForValue().

◆ getValueMap()

PropertyValueMap Ogre::PropertySet::getValueMap ( ) const

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

◆ hasProperty()

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

Reports whether this property set contains a named property.

◆ operator delete() [1/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr)
inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [2/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr)
inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [3/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
const char * ,
int ,
const char *  )
inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [4/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
const char * ,
int ,
const char *  )
inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [5/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
void *  )
inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

◆ operator delete() [6/6]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete ( void * ptr,
void *  )
inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [1/4]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete[] ( void * ptr)
inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [2/4]

void Ogre::AllocatedObject< GeneralAllocPolicy >::operator delete[] ( void * ptr)
inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [3/4]

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

Definition at line 119 of file OgreMemoryAllocatedObject.h.

◆ operator delete[]() [4/4]

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

Definition at line 119 of file OgreMemoryAllocatedObject.h.

◆ operator new() [1/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz)
inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

◆ operator new() [2/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz)
inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

◆ operator new() [3/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
const char * file,
int line,
const char * func )
inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

◆ operator new() [4/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
const char * file,
int line,
const char * func )
inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

◆ operator new() [5/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
void * ptr )
inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

◆ operator new() [6/6]

void * Ogre::AllocatedObject< GeneralAllocPolicy >::operator new ( size_t sz,
void * ptr )
inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [1/4]

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

Definition at line 91 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [2/4]

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

Definition at line 91 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [3/4]

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

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

◆ operator new[]() [4/4]

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

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

◆ removeProperty()

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

Removes the named property from the property set.

◆ setPropertyImpl()

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 356 of file OgreProperty.h.

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

Referenced by setValue(), setValue(), and setValue().

◆ setValue() [1/3]

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

Special-case char*, convert to String automatically.

Definition at line 344 of file OgreProperty.h.

References Ogre::PROP_STRING, and setPropertyImpl().

◆ setValue() [2/3]

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 331 of file OgreProperty.h.

References Ogre::PropertyDef::getTypeForValue(), and setPropertyImpl().

◆ setValue() [3/3]

template<typename T>
void Ogre::PropertySet::setValue ( const String & name,
T value )

Set a named property value.

Definition at line 338 of file OgreProperty.h.

References Ogre::PropertyDef::getTypeForValue(), and setPropertyImpl().

◆ setValueMap()

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

Sets the current state from a given value map.

Member Data Documentation

◆ mPropertyMap

PropertyMap Ogre::PropertySet::mPropertyMap
protected

Definition at line 352 of file OgreProperty.h.


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