osg::StatElemDesc< Type > Class Template Reference

#include <OSGStatElemDesc.h>

Inheritance diagram for osg::StatElemDesc< Type >:

osg::StatElemDescBase

List of all members.

instance



void print (void)
Int32 getID (void)
const IDString & getName (void)
const IDString & getDescription (void)
static bool isValidID (Int32 descId)
static StatElemDescBase * getDesc (Int32 descId)
static StatElemDescBase * findDescByName (const Char8 *name)
static Int32 getNumOfDescs (void)
static const Char8 * getClassname (void)
static void printAll (void)

Public Member Functions

Constructors


 StatElemDesc (const Char8 *name, const Char8 *description)
Destructor


virtual ~StatElemDesc (void)
Comparison


bool operator< (const StatElemDescBase &other) const
 assignment

Private Member Functions

virtual StatElem * createElem (void)
 StatElemDesc (const StatElemDesc &source)
StatElemDesc & operator= (const StatElemDesc &source)

Static Private Attributes

static char cvsid [] = "@(#)$Id: OSGStatElemDesc.inl,v 1.5 2002/01/24 22:55:05 dirk Exp $"


Detailed Description

template<class Type>
class osg::StatElemDesc< Type >

Definition at line 150 of file OSGStatElemDesc.h.


Constructor & Destructor Documentation

template<class T>
osg::StatElemDesc< T >::StatElemDesc ( const Char8 *  name,
const Char8 *  description 
) [inline]

Definition at line 99 of file OSGStatElemDesc.inl.

00099                                                                            :
00100     StatElemDescBase(name, description)
00101 {
00102 }

template<class T>
osg::StatElemDesc< T >::~StatElemDesc ( void   )  [inline, virtual]

Definition at line 106 of file OSGStatElemDesc.inl.

00107 {
00108 }

template<class Type>
osg::StatElemDesc< Type >::StatElemDesc ( const StatElemDesc< Type > &  source  )  [private]


Member Function Documentation

template<class T>
StatElem * osg::StatElemDesc< T >::createElem ( void   )  [inline, private, virtual]

Implements osg::StatElemDescBase.

Definition at line 112 of file OSGStatElemDesc.inl.

00113 {
00114     return T::create(this);
00115 }

template<class Type>
StatElemDesc& osg::StatElemDesc< Type >::operator= ( const StatElemDesc< Type > &  source  )  [private]

bool osg::StatElemDescBase::isValidID ( Int32  descId  )  [inline, static, inherited]

Definition at line 43 of file OSGStatElemDesc.inl.

References osg::StatElemDescBase::_descVec.

00044 { 
00045   return (_descVec && (descId >= 0) && (descId < Int32(_descVec->size()))); 
00046 }

StatElemDescBase * osg::StatElemDescBase::getDesc ( Int32  descId  )  [inline, static, inherited]

Definition at line 50 of file OSGStatElemDesc.inl.

References osg::StatElemDescBase::_descVec.

Referenced by osg::StatCollector::getElem().

00051 { 
00052   return (*_descVec)[descId];
00053 }

StatElemDescBase * StatElemDescBase::findDescByName ( const Char8 *  name  )  [static, inherited]

Definition at line 74 of file OSGStatElemDesc.cpp.

References osg::StatElemDescBase::_descVec, osg::StatElemDescBase::_name, and osg::IDString::str().

Referenced by osg::StatCollector::getFromString(), osg::StatCollector::getValue(), and osg::StatElemDescBase::StatElemDescBase().

00075 {
00076   Int32 i,n = _descVec ? _descVec->size() : 0;
00077   StatElemDescBase *desc = 0;
00078 
00079   if (name && *name && n)
00080     for (i = 0; i < n; i++)
00081       if (!strcmp(name,(*_descVec)[i]->_name.str())) {
00082         desc = (*_descVec)[i];
00083         break;
00084       }
00085   
00086   return desc;
00087 }

Int32 osg::StatElemDescBase::getNumOfDescs ( void   )  [inline, static, inherited]

Definition at line 57 of file OSGStatElemDesc.inl.

References osg::StatElemDescBase::_descVec.

Referenced by osg::StatCollector::refitElemNum().

00058 { 
00059   return _descVec ? _descVec->size() : 0; 
00060 }

const Char8 * osg::StatElemDescBase::getClassname ( void   )  [inline, static, inherited]

Definition at line 64 of file OSGStatElemDesc.inl.

00065 { 
00066   return "StatElemDescBase"; 
00067 }

void StatElemDescBase::printAll ( void   )  [static, inherited]

Definition at line 145 of file OSGStatElemDesc.cpp.

References osg::StatElemDescBase::_descVec.

00146 {
00147   Int32 i,n = _descVec ? _descVec->size() : 0;
00148 
00149   for (i = 0; i < n; i++)
00150     (*_descVec)[i]->print();
00151 }

void StatElemDescBase::print ( void   )  [inherited]

Definition at line 153 of file OSGStatElemDesc.cpp.

References osg::StatElemDescBase::_description, osg::StatElemDescBase::_id, osg::StatElemDescBase::_name, FLOG, and osg::IDString::str().

00154 {
00155   FLOG (( "StatElemDescBase: ID/Name/Description: %d/%s/%s\n",
00156           _id, _name.str(), _description.str() ));
00157 }

Int32 osg::StatElemDescBase::getID ( void   )  [inline, inherited]

const IDString & osg::StatElemDescBase::getName ( void   )  [inline, inherited]

Definition at line 78 of file OSGStatElemDesc.inl.

References osg::StatElemDescBase::_name.

Referenced by osg::SimpleStatisticsForeground::draw().

00079 { 
00080   return _name; 
00081 }

const IDString & osg::StatElemDescBase::getDescription ( void   )  [inline, inherited]

Definition at line 85 of file OSGStatElemDesc.inl.

References osg::StatElemDescBase::_description.

00086 { 
00087   return _description; 
00088 }

bool StatElemDescBase::operator< ( const StatElemDescBase &  other  )  const [inherited]

Definition at line 192 of file OSGStatElemDesc.cpp.

00193 {
00194     return this < &other;
00195 }


Member Data Documentation

template<class Type>
char osg::StatElemDesc< T >::cvsid = "@(#)$Id: OSGStatElemDesc.inl,v 1.5 2002/01/24 22:55:05 dirk Exp $" [inline, static, private]

Reimplemented from osg::StatElemDescBase.

Definition at line 179 of file OSGStatElemDesc.h.


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

Generated on Mon Mar 17 11:20:15 2008 for OpenSG by  doxygen 1.5.5