OSG::DataSlotMixin< ParentT > Class Template Reference

#include <OSGDataSlotMixin.h>

List of all members.


Public Types

typedef ParentT Inherited

Public Member Functions

dcast


template<class ValuePtr>
ValuePtr getData (Int32 iSlotId)
General Fieldcontainer Declaration


void setDataX (FieldBundleP pBundle, Int32 iSlotId)

Protected Types

Type information


typedef Inherited::Desc Desc
typedef Desc::DataStore DataStore

Protected Member Functions

Member


 DataSlotMixin (void)
 DataSlotMixin (const DataSlotMixin &source)
virtual ~DataSlotMixin (void)

Protected Attributes

Fields


DataStore _mfData

Private Member Functions

void operator= (const DataSlotMixin &source)
 prohibit default function (move to 'public' if needed)

Detailed Description

template<class ParentT>
class OSG::DataSlotMixin< ParentT >

Definition at line 48 of file OSGDataSlotMixin.h.


Member Typedef Documentation

template<class ParentT>
typedef ParentT OSG::DataSlotMixin< ParentT >::Inherited

Reimplemented in OSG::RenderTraversalAction, and OSG::RenderTraversalActionBase.

Definition at line 54 of file OSGDataSlotMixin.h.

template<class ParentT>
typedef Inherited::Desc OSG::DataSlotMixin< ParentT >::Desc [protected]

Definition at line 139 of file OSGDataSlotMixin.h.

template<class ParentT>
typedef Desc ::DataStore OSG::DataSlotMixin< ParentT >::DataStore [protected]

Definition at line 141 of file OSGDataSlotMixin.h.


Constructor & Destructor Documentation

template<class ParentT>
OSG::DataSlotMixin< ParentT >::DataSlotMixin ( void   )  [inline, protected]

Definition at line 72 of file OSGDataSlotMixin.inl.

00072                                           :
00073      Inherited(),
00074     _mfData   ()
00075 {
00076 }

template<class ParentT>
OSG::DataSlotMixin< ParentT >::DataSlotMixin ( const DataSlotMixin< ParentT > &  source  )  [inline, protected]

Definition at line 79 of file OSGDataSlotMixin.inl.

00079                                                                  :
00080      Inherited(source),
00081     _mfData   (      )
00082 {
00083 }

template<class ParentT>
OSG::DataSlotMixin< ParentT >::~DataSlotMixin ( void   )  [inline, protected, virtual]

Definition at line 86 of file OSGDataSlotMixin.inl.

References OSG::DataSlotMixin< ParentT >::_mfData, and OSG::subRef().

00087 {
00088     for(UInt32 i = 0; i < _mfData.size(); ++i)
00089     {
00090         OSG::subRef(_mfData[i]);
00091     }
00092 }


Member Function Documentation

template<class ParentT>
template<class ValuePtr>
ValuePtr OSG::DataSlotMixin< ParentT >::getData ( Int32  iSlotId  )  [inline]

Definition at line 43 of file OSGDataSlotMixin.inl.

References OSG::DataSlotMixin< ParentT >::_mfData.

Referenced by OSG::HDRStage::initData(), OSG::HDRStage::postProcess(), and OSG::SimpleShadowMapEngine::runOnEnter().

00044 {
00045     ValuePtr returnValue = NULL;
00046 
00047     if(iSlotId >= 0 && static_cast<UInt32>(iSlotId) < _mfData.size())
00048     {
00049         FieldBundleP pTmp = _mfData[iSlotId];
00050 
00051         returnValue = dynamic_cast<ValuePtr>(pTmp);
00052     }
00053 
00054     return returnValue;
00055 }

template<class ParentT>
void OSG::DataSlotMixin< ParentT >::setDataX ( FieldBundleP  pBundle,
Int32  iSlotId 
) [inline]

Definition at line 58 of file OSGDataSlotMixin.inl.

References OSG::DataSlotMixin< ParentT >::_mfData, and OSG::setRefd().

Referenced by OSG::StageHandlerMixin< ParentT >::setData(), and OSG::StageHandlerMixin< ParentT >::validateOnEnter().

00059 {
00060     if(iSlotId < 0)
00061         return;
00062 
00063     if(static_cast<UInt32>(iSlotId) <= _mfData.size())
00064     {
00065         _mfData.resize(iSlotId + 1, NULL);
00066     }
00067 
00068     OSG::setRefd(_mfData[iSlotId], pBundle);
00069 }

template<class ParentT>
void OSG::DataSlotMixin< ParentT >::operator= ( const DataSlotMixin< ParentT > &  source  )  [private]


Member Data Documentation

template<class ParentT>
DataStore OSG::DataSlotMixin< ParentT >::_mfData [protected]


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