version 3.3

VRS::ContextData< T > Class Template Reference

#include <vrs/contextdata.h>

Inheritance diagram for VRS::ContextData< T >:

VRS::MonoAttribute VRS::Attribute VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 ContextData (const T &value, const ID &category)
 Constructs a attribute object that puts the given object at the specified stack.
virtual ~ContextData ()
void setData (const T &t)
 Sets the object that will be stored in the context.
const T & getData () const
 Returns the object that will be stored in the context, see setData.
virtual ID category () const
 Returns the ID specifying the stack the object will be put on.
bool operator== (const ContextData &other) const
 VRS_TYPEINFO (ContextData, MonoAttribute)


Detailed Description

template<class T>
class VRS::ContextData< T >

Template for generic storing of data in rendering contexts (see Engine) Inserted into scene graph, objects of this class stores arbitrary objects on a certain (given) attribute stack.

Constructor & Destructor Documentation

template<class T>
VRS::ContextData< T >::ContextData ( const T &  value,
const ID category 
)

Constructs a attribute object that puts the given object at the specified stack.

The stack within an engine's context is specified by category. It has to assigned explicitly by the application and should be unique. Don't use class names as categories. You can get a unique category for example with 'ID("blabla")'.

template<class T>
virtual VRS::ContextData< T >::~ContextData (  )  [virtual]


Member Function Documentation

template<class T>
void VRS::ContextData< T >::setData ( const T &  t  ) 

Sets the object that will be stored in the context.

The given object will be put on the stack specified by the given ID (see constructor) when the scene graph evaluation reaches the ContextData object.

template<class T>
const T& VRS::ContextData< T >::getData (  )  const

Returns the object that will be stored in the context, see setData.

template<class T>
virtual ID VRS::ContextData< T >::category (  )  const [virtual]

Returns the ID specifying the stack the object will be put on.

Reimplemented from VRS::Attribute.

template<class T>
bool VRS::ContextData< T >::operator== ( const ContextData< T > &  other  )  const

template<class T>
VRS::ContextData< T >::VRS_TYPEINFO ( ContextData< T >  ,
MonoAttribute   
)


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

Generated on Mon May 21 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact