Loading...
Searching...
No Matches
Ogre::UserObjectBindings Class Reference
Core » Scene

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:
[legend]

## Public Member Functions

| UserObjectBindings ()=default
| UserObjectBindings (const UserObjectBindings &other)
| Copy constructor.
void | clear ()
| Clear all user objects from this binding.
void | eraseUserAny (const String &key)
| Erase the custom user object associated with this class and key from this binding.
const Any & | getUserAny (const String &key) const
| Retrieves the custom user object associated with this class and key.
const Any & | getUserAny (void) const
| Retrieves the custom key less user object associated with this class.
UserObjectBindings & | operator= (const UserObjectBindings &rhs)
void | setUserAny (const Any &anything)
| Sets any kind of user object on this class instance.
void | setUserAny (const String &key, const Any &anything)
| Sets any kind of user object on this class instance.
UserObjectBindings & | swap (UserObjectBindings &rhs)

## Detailed Description

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

## Constructor & Destructor Documentation

## UserObjectBindings() [1/2]

Ogre::UserObjectBindings::UserObjectBindings | ( |  | ) |

default

Referenced by UserObjectBindings(), operator=(), and swap().

## UserObjectBindings() [2/2]

Ogre::UserObjectBindings::UserObjectBindings | ( | const UserObjectBindings & | other | ) |

Copy constructor.

Performs a copy of all stored UserAny.

References UserObjectBindings().

## Member Function Documentation

## setUserAny() [1/2]

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

Sets any kind of user object on this class instance.

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.

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

  key | The key that this data is associate with.
  anything | The 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

  key | The key that the requested user object is associated with.

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

  key | The key that the requested user object is associated with.

## clear()

void Ogre::UserObjectBindings::clear | ( |  | ) |

Clear all user objects from this binding.

## swap()

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

References UserObjectBindings().

## operator=()

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

References UserObjectBindings().

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

- OgreUserObjectBindings.h