OGRE
1.9.0
|
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers. More...
#include <OgreStringInterface.h>
Public Member Functions | |
StringInterface () | |
virtual | ~StringInterface () |
Virtual destructor, see Effective C++. | |
virtual void | copyParametersTo (StringInterface *dest) const |
Method for copying this object's parameters to another object. | |
ParamDictionary * | getParamDictionary (void) |
Retrieves the parameter dictionary for this class. | |
const ParamDictionary * | getParamDictionary (void) const |
virtual String | getParameter (const String &name) const |
Generic parameter retrieval method. | |
const ParameterList & | getParameters (void) const |
Retrieves a list of parameters valid for this object. | |
virtual bool | setParameter (const String &name, const String &value) |
Generic parameter setting method. | |
virtual void | setParameterList (const NameValuePairList ¶mList) |
Generic multiple parameter setting method. | |
Static Public Member Functions | |
static void | cleanupDictionary () |
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g. | |
Protected Member Functions | |
bool | createParamDictionary (const String &className) |
Internal method for creating a parameter dictionary for the class, if it does not already exist. | |
Private Member Functions | |
OGRE_STATIC_MUTEX (msDictionaryMutex) | |
Private Attributes | |
ParamDictionary * | mParamDict |
String | mParamDictName |
Class name for this instance to be used as a lookup (must be initialised by subclasses) | |
Static Private Attributes | |
static ParamDictionaryMap | msDictionary |
Dictionary of parameters. | |
Class defining the common interface which classes can use to present a reflection-style, self-defining parameter set to callers.
Definition at line 163 of file OgreStringInterface.h.
Ogre::StringInterface::StringInterface | ( | ) |
Definition at line 207 of file OgreStringInterface.h.
References mParamDict.
Referenced by copyParametersTo().
|
virtual |
Virtual destructor, see Effective C++.
Definition at line 210 of file OgreStringInterface.h.
|
static |
Cleans up the static 'msDictionary' required to reset Ogre, otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the ResourceManager implementers (e.g.
MaterialManager) initializes.
|
virtual |
Method for copying this object's parameters to another object.
dest | Pointer to object to have it's parameters set the same as this object. |
Definition at line 303 of file OgreStringInterface.h.
References StringInterface(), getParamDictionary(), getParameter(), Ogre::ParamDictionary::mParamDefs, and setParameter().
|
protected |
Internal method for creating a parameter dictionary for the class, if it does not already exist.
className | the name of the class using the dictionary |
Definition at line 186 of file OgreStringInterface.h.
References mParamDict, mParamDictName, msDictionary, and OGRE_LOCK_MUTEX.
ParamDictionary * Ogre::StringInterface::getParamDictionary | ( | void | ) |
Retrieves the parameter dictionary for this class.
Definition at line 219 of file OgreStringInterface.h.
References mParamDict.
Referenced by copyParametersTo(), and getParameter().
const ParamDictionary * Ogre::StringInterface::getParamDictionary | ( | void | ) | const |
Definition at line 224 of file OgreStringInterface.h.
References mParamDict.
Generic parameter retrieval method.
name | The name of the parameter to get |
Definition at line 272 of file OgreStringInterface.h.
References Ogre::ParamCommand::doGet(), Ogre::ParamDictionary::getParamCommand(), and getParamDictionary().
Referenced by copyParametersTo().
const ParameterList & Ogre::StringInterface::getParameters | ( | void | ) | const |
Retrieves a list of parameters valid for this object.
|
private |
|
virtual |
Generic parameter setting method.
name | The name of the parameter to set |
value | String value. Must be in the right format for the type specified in the parameter definition. See the StringConverter class for more information. |
Referenced by copyParametersTo().
|
virtual |
Generic multiple parameter setting method.
paramList | Name/value pair list |
|
private |
Definition at line 173 of file OgreStringInterface.h.
Referenced by StringInterface(), createParamDictionary(), getParamDictionary(), and getParamDictionary().
|
private |
Class name for this instance to be used as a lookup (must be initialised by subclasses)
Definition at line 172 of file OgreStringInterface.h.
Referenced by createParamDictionary().
|
staticprivate |
Dictionary of parameters.
Definition at line 169 of file OgreStringInterface.h.
Referenced by createParamDictionary().