Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::FieldDescription Class Reference
[Field Container]

#include <OSGFieldDescriptionImpl.h>

List of all members.

Public Member Functions

Constructors
FieldDescription (const TypeBase &elementType, const Char8 *szName, const UInt32 uiFieldId, const BitVector vFieldMask, const bool bInternal, FieldAccessMethod fAccessMethod, const Char8 *defaultValue=NULL)
 FieldDescription (const TypeBase &elementType, const Char8 *szName, const UInt32 uiFieldId, const BitVector vFieldMask, const bool bInternal, FieldIndexAccessMethod fIndexedAccessMethod, const Char8 *defaultValue=NULL)
 FieldDescription (const FieldDescription &source)
Destructor
*virtual ~FieldDescription (void)
Get
*const Char8getCName (void) const
const IDStringgetName (void) const
UInt32 getTypeId (void) const
BitVector getFieldMask (void) const
void setFieldMask (BitVector vFieldMask)
UInt32 getFieldId (void) const
void setFieldId (UInt32 uiFieldId)
const Char8getDefaultValue (void) const
const TypeBasegetFieldType (void) const
bool isInternal (void) const
bool isValid (void) const
Set
*void setAccessMethod (FieldAccessMethod fAccessMethod)
void setIndexAccessMethod (FieldIndexAccessMethod fIndexedAccessMethod)

Protected Member Functions

Generic Field Access *FieldgetField (FieldContainer &dataStore) const

Protected Attributes

Member
*IDString _szName
const TypeBase_fieldType
UInt32 _uiFieldId
BitVector _vFieldMask
bool _bInternal
FieldAccessMethod _fAccessMethod
FieldIndexAccessMethod _fIndexedAccessMethod
IDString _defaultValue

Private Member Functions

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

Friends

class FieldContainer
class FieldContainerPtr


Detailed Description

Definition at line 78 of file OSGFieldDescriptionImpl.h.


Constructor & Destructor Documentation

FieldDescription::FieldDescription const TypeBase elementType,
const Char8 szName,
const UInt32  uiFieldId,
const BitVector  vFieldMask,
const bool  bInternal,
FieldAccessMethod  fAccessMethod,
const Char8 defaultValue = NULL
 

Definition at line 59 of file OSGFieldDescription.cpp.

00065                                                                           :
00066 
00067     _szName              (szName       ),
00068 
00069     _fieldType           (elementType  ),
00070     _uiFieldId           (uiFieldId    ),
00071     _vFieldMask          (vFieldMask   ),
00072 
00073     _bInternal           (bInternal    ),
00074 
00075     _fAccessMethod       (fAccessMethod),
00076     _fIndexedAccessMethod(NULL         ),
00077     _defaultValue        (defaultValue )
00078 {
00079 }

osg::FieldDescription::FieldDescription const TypeBase elementType,
const Char8 szName,
const UInt32  uiFieldId,
const BitVector  vFieldMask,
const bool  bInternal,
FieldIndexAccessMethod  fIndexedAccessMethod,
const Char8 defaultValue = NULL
 

FieldDescription::FieldDescription const FieldDescription source  ) 
 

Definition at line 105 of file OSGFieldDescription.cpp.

00105                                                                  :
00106 
00107     _szName              (source._szName              ),
00108 
00109     _fieldType           (source._fieldType           ),
00110     _uiFieldId           (source._uiFieldId           ),
00111     _vFieldMask          (source._vFieldMask          ),
00112 
00113     _bInternal           (source._bInternal           ),
00114 
00115     _fAccessMethod       (source._fAccessMethod       ),
00116     _fIndexedAccessMethod(source._fIndexedAccessMethod),
00117 
00118     _defaultValue        (source._defaultValue        )
00119 {
00120 }

FieldDescription::~FieldDescription void   )  [virtual]
 

Definition at line 125 of file OSGFieldDescription.cpp.

00126 {
00127 }


Member Function Documentation

const Char8 * osg::FieldDescription::getCName void   )  const [inline]
 

Definition at line 54 of file OSGFieldDescriptionImpl.inl.

References _szName, and osg::IDString::str().

Referenced by osg::FieldContainerType::addDescription(), osg::QFCItem::addRefedContainer(), osg::SharePtrGraphOp::compareFCs(), osg::deepClone(), osg::BINWriter::doIndexFC(), osg::VRMLNodeDesc::dump(), osg::DynFieldAttachment< AttachmentDescT >::dump(), osg::QFCItem::expand(), osg::getParentsField(), osg::FieldContainerType::initFields(), osg::SharePtrGraphOp::isEqual(), isEqual(), osg::QFCItem::setup(), osg::FieldContainerType::subDescription(), osg::MultiDisplayWindow::updateViewport(), and osg::FieldContainerFactory::writeSingleTypeFCD().

00055 {
00056     return _szName.str();
00057 }

const IDString & osg::FieldDescription::getName void   )  const [inline]
 

Definition at line 60 of file OSGFieldDescriptionImpl.inl.

References _szName.

Referenced by osg::RemoteAspect::receiveSync(), and osg::OSGWriter::writeField().

00061 {
00062     return _szName;
00063 }

UInt32 osg::FieldDescription::getTypeId void   )  const [inline]
 

Definition at line 66 of file OSGFieldDescriptionImpl.inl.

References _fieldType, and osg::TypeBase::getId().

Referenced by osg::FieldContainerType::addDescription(), osg::DynFieldAttachment< AttachmentDescT >::addField(), osg::FieldContainerType::initFields(), and osg::FieldContainerFactory::writeSingleTypeFCD().

00067 {
00068     return _fieldType.getId();
00069 }

BitVector osg::FieldDescription::getFieldMask void   )  const [inline]
 

Definition at line 72 of file OSGFieldDescriptionImpl.inl.

References _vFieldMask.

Referenced by osg::SharePtrGraphOp::addAttachmentParent(), osg::OSGLoader::beginField(), osg::SharePtrGraphOp::clearAttachmentParent(), osg::SharePtrGraphOp::compareFCs(), osg::deepClone(), osg::BINWriter::doIndexFC(), osg::VRMLFile::endField(), osg::OSGLoader::endField(), and osg::MultiDisplayWindow::updateViewport().

00073 {
00074     return _vFieldMask;
00075 }

void osg::FieldDescription::setFieldMask BitVector  vFieldMask  )  [inline]
 

Definition at line 78 of file OSGFieldDescriptionImpl.inl.

References _vFieldMask.

Referenced by osg::DynFieldAttachment< AttachmentDescT >::addField().

00079 {
00080     _vFieldMask = vFieldMask;
00081 }

UInt32 osg::FieldDescription::getFieldId void   )  const [inline]
 

Definition at line 84 of file OSGFieldDescriptionImpl.inl.

References _uiFieldId.

Referenced by osg::SharePtrGraphOp::addAttachmentParent(), osg::SharePtrGraphOp::clearAttachmentParent(), osg::SharePtrGraphOp::compareFCs(), and osg::FieldDescriptionPLT::operator()().

00085 {
00086     return _uiFieldId;
00087 }

void osg::FieldDescription::setFieldId UInt32  uiFieldId  )  [inline]
 

Definition at line 90 of file OSGFieldDescriptionImpl.inl.

References _uiFieldId.

Referenced by osg::DynFieldAttachment< AttachmentDescT >::addField().

00091 {
00092     _uiFieldId = uiFieldId;
00093 }

const Char8 * osg::FieldDescription::getDefaultValue void   )  const [inline]
 

Definition at line 96 of file OSGFieldDescriptionImpl.inl.

References _defaultValue, and osg::IDString::str().

00097 {
00098     return _defaultValue.str();
00099 }

const TypeBase & osg::FieldDescription::getFieldType void   )  const [inline]
 

Definition at line 102 of file OSGFieldDescriptionImpl.inl.

References _fieldType.

Referenced by osg::VRMLNodeDesc::dump().

00103 {
00104     return _fieldType;
00105 }

bool osg::FieldDescription::isInternal void   )  const [inline]
 

Definition at line 111 of file OSGFieldDescriptionImpl.inl.

References _bInternal.

Referenced by osg::SharePtrGraphOp::addAttachmentParent(), osg::SharePtrGraphOp::clearAttachmentParent(), osg::SharePtrGraphOp::compareFCs(), osg::deepClone(), osg::BINWriter::doIndexFC(), osg::SharePtrGraphOp::isEqual(), isEqual(), osg::OSGWriter::visitContainer(), osg::OSGWriter::writeContainer(), and osg::FieldContainerFactory::writeSingleTypeFCD().

00112 {
00113     return _bInternal;
00114 }

bool osg::FieldDescription::isValid void   )  const [inline]
 

Definition at line 117 of file OSGFieldDescriptionImpl.inl.

References _szName, and osg::IDString::getLength().

Referenced by osg::FieldContainerType::addDescription(), and osg::FieldContainerType::initFields().

00118 {
00119     return (this != NULL && _szName.getLength()) ? true : false;
00120 }

void osg::FieldDescription::setAccessMethod FieldAccessMethod  fAccessMethod  )  [inline]
 

Definition at line 126 of file OSGFieldDescriptionImpl.inl.

References _fAccessMethod.

00127 {
00128     _fAccessMethod = fAccessMethod;
00129 }

void osg::FieldDescription::setIndexAccessMethod FieldIndexAccessMethod  fIndexedAccessMethod  )  [inline]
 

Definition at line 132 of file OSGFieldDescriptionImpl.inl.

References _fIndexedAccessMethod.

00134 {
00135     _fIndexedAccessMethod = fIndexedAccessMethod;
00136 }

Field * osg::FieldDescription::getField FieldContainer dataStore  )  const [inline, protected]
 

Definition at line 142 of file OSGFieldDescriptionImpl.inl.

References _fAccessMethod, _fIndexedAccessMethod, _szName, _uiFieldId, osg::IDString::str(), and SWARNING.

Referenced by osg::FieldContainer::getField().

00143 {
00144     Field *pField = NULL;
00145 
00146     if(_fAccessMethod != 0)
00147     {
00148         pField = ( (&dataStore)->*_fAccessMethod) ();
00149     }
00150     else if(_fIndexedAccessMethod != 0)
00151     {
00152         pField = ( (&dataStore)->*_fIndexedAccessMethod)(_uiFieldId);
00153     }
00154     else
00155     {
00156         SWARNING << "No accessMethod for " << _szName.str() << std::endl;
00157     }
00158 
00159     return pField;
00160 }

void osg::FieldDescription::operator= const FieldDescription source  )  [private]
 


Friends And Related Function Documentation

friend class FieldContainer [friend]
 

Definition at line 178 of file OSGFieldDescriptionImpl.h.

friend class FieldContainerPtr [friend]
 

Definition at line 179 of file OSGFieldDescriptionImpl.h.


Member Data Documentation

* IDString osg::FieldDescription::_szName [protected]
 

Definition at line 153 of file OSGFieldDescriptionImpl.h.

Referenced by getCName(), getField(), getName(), and isValid().

const TypeBase& osg::FieldDescription::_fieldType [protected]
 

Definition at line 155 of file OSGFieldDescriptionImpl.h.

Referenced by getFieldType(), and getTypeId().

UInt32 osg::FieldDescription::_uiFieldId [protected]
 

Definition at line 157 of file OSGFieldDescriptionImpl.h.

Referenced by getField(), getFieldId(), and setFieldId().

BitVector osg::FieldDescription::_vFieldMask [protected]
 

Definition at line 158 of file OSGFieldDescriptionImpl.h.

Referenced by getFieldMask(), and setFieldMask().

bool osg::FieldDescription::_bInternal [protected]
 

Definition at line 160 of file OSGFieldDescriptionImpl.h.

Referenced by isInternal().

FieldAccessMethod osg::FieldDescription::_fAccessMethod [protected]
 

Definition at line 162 of file OSGFieldDescriptionImpl.h.

Referenced by getField(), and setAccessMethod().

FieldIndexAccessMethod osg::FieldDescription::_fIndexedAccessMethod [protected]
 

Definition at line 163 of file OSGFieldDescriptionImpl.h.

Referenced by getField(), and setIndexAccessMethod().

IDString osg::FieldDescription::_defaultValue [protected]
 

Definition at line 165 of file OSGFieldDescriptionImpl.h.

Referenced by getDefaultValue().


The documentation for this class was generated from the following files:
Generated on Thu Aug 25 04:13:45 2005 for OpenSG by  doxygen 1.4.3