Project

General

Profile

SO3Engine

#include <SO3UserObjectBindings.h>

Classes

class  Attributes
 

Public Member Functions

 SUserObjectBindings ()
 
virtual ~SUserObjectBindings ()
 
void SetUserAny (const SAny &anything)
 
const SAnyGetUserAny () const
 
void SetUserAny (const std::string &key, const SAny &anything)
 
const SAnyGetUserAny (const std::string &key) const
 
void EraseUserAny (const std::string &key)
 
void Clear () const
 

Static Public Member Functions

static const SAnyGetEmptyUserAny ()
 

Protected Types

typedef std::unordered_map< std::string, SAnyUserObjectsMap
 
typedef UserObjectsMap::iterator UserObjectsMapIterator
 
typedef UserObjectsMap::const_iterator UserObjectsMapConstIterator
 

Detailed Description

Class that provide convenient interface to establish a linkage between custom user application objects and Ogre core classes. SAny instance of Ogre class that will derive from this class could be associated with custom application object using this class interface.

Definition at line 38 of file SO3UserObjectBindings.h.

Member Typedef Documentation

◆ UserObjectsMap

typedef std::unordered_map<std::string, SAny> SO3::SUserObjectBindings::UserObjectsMap
protected

Definition at line 42 of file SO3UserObjectBindings.h.

◆ UserObjectsMapConstIterator

typedef UserObjectsMap::const_iterator SO3::SUserObjectBindings::UserObjectsMapConstIterator
protected

Definition at line 44 of file SO3UserObjectBindings.h.

◆ UserObjectsMapIterator

typedef UserObjectsMap::iterator SO3::SUserObjectBindings::UserObjectsMapIterator
protected

Definition at line 43 of file SO3UserObjectBindings.h.

Constructor & Destructor Documentation

◆ SUserObjectBindings()

SO3::SUserObjectBindings::SUserObjectBindings ( )

Class constructor.

Definition at line 32 of file SO3UserObjectBindings.cpp.

◆ ~SUserObjectBindings()

SO3::SUserObjectBindings::~SUserObjectBindings ( )
virtual

Class destructor.

Definition at line 37 of file SO3UserObjectBindings.cpp.

Member Function Documentation

◆ Clear()

void SO3::SUserObjectBindings::Clear ( ) const

Clear all user objects from this binding.

Definition at line 100 of file SO3UserObjectBindings.cpp.

◆ EraseUserAny()

void SO3::SUserObjectBindings::EraseUserAny ( const std::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.

Definition at line 89 of file SO3UserObjectBindings.cpp.

◆ GetEmptyUserAny()

static const SAny & SO3::SUserObjectBindings::GetEmptyUserAny ( )
inlinestatic

Definition at line 139 of file SO3UserObjectBindings.h.

◆ GetUserAny() [1/2]

const SAny & SO3::SUserObjectBindings::GetUserAny ( ) const

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

Definition at line 51 of file SO3UserObjectBindings.cpp.

◆ GetUserAny() [2/2]

const SAny & SO3::SUserObjectBindings::GetUserAny ( const std::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 SAny object will be empty.

Definition at line 72 of file SO3UserObjectBindings.cpp.

◆ SetUserAny() [1/2]

void SO3::SUserObjectBindings::SetUserAny ( const SAny 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.

Definition at line 42 of file SO3UserObjectBindings.cpp.

◆ SetUserAny() [2/2]

void SO3::SUserObjectBindings::SetUserAny ( const std::string &  key,
const SAny 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.

Definition at line 60 of file SO3UserObjectBindings.cpp.


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