OGRE  1.10.12
Object-Oriented Graphics Rendering Engine
Ogre::UserObjectBindings Class Reference

Class that provides convenient interface to establish a linkage between custom user application objects and Ogre core classes. More...

#include <OgreUserObjectBindings.h>

+ Inheritance diagram for Ogre::UserObjectBindings:

Public Member Functions

 UserObjectBindings ()
 Class constructor. More...
 
 UserObjectBindings (const UserObjectBindings &other)
 Copy constructor. More...
 
 ~UserObjectBindings ()
 Class destructor. More...
 
void clear () const
 Clear all user objects from this binding. More...
 
void eraseUserAny (const String &key)
 Erase the custom user object associated with this class and key from this binding. More...
 
const AnygetUserAny (void) const
 Retrieves the custom key less user object associated with this class. More...
 
const AnygetUserAny (const String &key) const
 Retrieves the custom user object associated with this class and key. More...
 
UserObjectBindingsoperator= (const UserObjectBindings &rhs)
 
void setUserAny (const Any &anything)
 Sets any kind of user object on this class instance. More...
 
void setUserAny (const String &key, const Any &anything)
 Sets any kind of user object on this class instance. More...
 
UserObjectBindingsswap (UserObjectBindings &rhs)
 

Static Public Member Functions

static const AnygetEmptyUserAny ()
 Returns empty user any object. More...
 

Detailed Description

Class that provides convenient interface to establish a linkage between custom user application objects and Ogre core classes.

Any instance of Ogre class that will derive from this class could be associated with custom application object using this class interface.

Constructor & Destructor Documentation

◆ UserObjectBindings() [1/2]

Ogre::UserObjectBindings::UserObjectBindings ( )

Class constructor.

◆ ~UserObjectBindings()

Ogre::UserObjectBindings::~UserObjectBindings ( )

Class destructor.

◆ UserObjectBindings() [2/2]

Ogre::UserObjectBindings::UserObjectBindings ( const UserObjectBindings other)

Copy constructor.

Performs a copy of all stored UserAny.

Member Function Documentation

◆ setUserAny() [1/2]

void Ogre::UserObjectBindings::setUserAny ( const Any anything)

Sets any kind of user object on this class instance.

Remarks
This method allows you to associate any user object you like with this class. This can be a pointer back to one of your own classes for instance.
Note
This method is key less meaning that each call for it will override previous object that were set. If you need to associate multiple objects with this class use the extended version that takes key.

◆ getUserAny() [1/2]

const Any& Ogre::UserObjectBindings::getUserAny ( void  ) const

Retrieves the custom key less user object associated with this class.

◆ setUserAny() [2/2]

void Ogre::UserObjectBindings::setUserAny ( const String key,
const Any anything 
)

Sets any kind of user object on this class instance.

Remarks
This method allows you to associate multiple object with this class. This can be a pointer back to one of your own classes for instance. Use a unique key to distinguish between each of these objects.
Parameters
keyThe key that this data is associate with.
anythingThe data to associate with the given key.

◆ getUserAny() [2/2]

const Any& Ogre::UserObjectBindings::getUserAny ( const String key) const

Retrieves the custom user object associated with this class and key.

Parameters
keyThe key that the requested user object is associated with.
Remarks
In case no object associated with this key the returned Any object will be empty.

◆ eraseUserAny()

void Ogre::UserObjectBindings::eraseUserAny ( const String key)

Erase the custom user object associated with this class and key from this binding.

Parameters
keyThe key that the requested user object is associated with.

◆ clear()

void Ogre::UserObjectBindings::clear ( ) const

Clear all user objects from this binding.

◆ getEmptyUserAny()

static const Any& Ogre::UserObjectBindings::getEmptyUserAny ( )
inlinestatic

Returns empty user any object.

◆ swap()

UserObjectBindings& Ogre::UserObjectBindings::swap ( UserObjectBindings rhs)
inline

References std::swap().

Referenced by operator=().

◆ operator=()

UserObjectBindings& Ogre::UserObjectBindings::operator= ( const UserObjectBindings rhs)
inline

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