osg::Stats Class Reference

Inheritance diagram for osg::Stats:

Inheritance graph
[legend]

List of all members.

Public Types

typedef std::map
< std::string,
double > 
AttributeMap
typedef std::vector
< AttributeMap
AttributeMapList
typedef std::map
< std::string, bool > 
CollectMap

Public Member Functions

 Stats (const std::string &name)
 Stats (const std::string &name, unsigned int numberOfFrames)
void setName (const std::string &name)
const std::string & getName () const
void allocate (unsigned int numberOfFrames)
int getEarliestFrameNumber () const
int getLatestFrameNumber () const
bool setAttribute (int frameNumber, const std::string &attributeName, double value)
bool getAttribute (int frameNumber, const std::string &attributeName, double &value) const
bool getAveragedAttribute (const std::string &attributeName, double &value, bool averageInInverseSpace=false) const
bool getAveragedAttribute (int startFrameNumber, int endFrameNumber, const std::string &attributeName, double &value, bool averageInInverseSpace=false) const
AttributeMapgetAttributeMap (int frameNumber)
const AttributeMapgetAttributeMap (int frameNumber) const
void collectStats (const std::string &str, bool flag)
bool collectStats (const std::string &str) const
void report (std::ostream &out, const char *indent=0) const
void report (std::ostream &out, unsigned int frameNumber, const char *indent=0) const

Protected Member Functions

virtual ~Stats ()
bool getAttributeNoMutex (int frameNumber, const std::string &attributeName, double &value) const
AttributeMapgetAttributeMapNoMutex (int frameNumber)
const AttributeMapgetAttributeMapNoMutex (int frameNumber) const
int getIndex (int frameNumber) const

Protected Attributes

std::string _name
OpenThreads::Mutex _mutex
int _baseFrameNumber
int _latestFrameNumber
AttributeMapList _attributeMapList
AttributeMap _invalidAttributeMap
CollectMap _collectMap


Member Typedef Documentation

typedef std::map<std::string, double> osg::Stats::AttributeMap

typedef std::vector<AttributeMap> osg::Stats::AttributeMapList

typedef std::map<std::string, bool> osg::Stats::CollectMap


Constructor & Destructor Documentation

osg::Stats::Stats ( const std::string &  name  ) 

osg::Stats::Stats ( const std::string &  name,
unsigned int  numberOfFrames 
)

virtual osg::Stats::~Stats (  )  [inline, protected, virtual]


Member Function Documentation

void osg::Stats::setName ( const std::string &  name  )  [inline]

const std::string& osg::Stats::getName (  )  const [inline]

void osg::Stats::allocate ( unsigned int  numberOfFrames  ) 

int osg::Stats::getEarliestFrameNumber (  )  const [inline]

int osg::Stats::getLatestFrameNumber (  )  const [inline]

bool osg::Stats::setAttribute ( int  frameNumber,
const std::string &  attributeName,
double  value 
)

bool osg::Stats::getAttribute ( int  frameNumber,
const std::string &  attributeName,
double &  value 
) const [inline]

bool osg::Stats::getAveragedAttribute ( const std::string &  attributeName,
double &  value,
bool  averageInInverseSpace = false 
) const

bool osg::Stats::getAveragedAttribute ( int  startFrameNumber,
int  endFrameNumber,
const std::string &  attributeName,
double &  value,
bool  averageInInverseSpace = false 
) const

AttributeMap& osg::Stats::getAttributeMap ( int  frameNumber  )  [inline]

const AttributeMap& osg::Stats::getAttributeMap ( int  frameNumber  )  const [inline]

void osg::Stats::collectStats ( const std::string &  str,
bool  flag 
) [inline]

bool osg::Stats::collectStats ( const std::string &  str  )  const [inline]

void osg::Stats::report ( std::ostream &  out,
const char *  indent = 0 
) const

void osg::Stats::report ( std::ostream &  out,
unsigned int  frameNumber,
const char *  indent = 0 
) const

bool osg::Stats::getAttributeNoMutex ( int  frameNumber,
const std::string &  attributeName,
double &  value 
) const [protected]

AttributeMap& osg::Stats::getAttributeMapNoMutex ( int  frameNumber  )  [protected]

const AttributeMap& osg::Stats::getAttributeMapNoMutex ( int  frameNumber  )  const [protected]

int osg::Stats::getIndex ( int  frameNumber  )  const [inline, protected]


Member Data Documentation

std::string osg::Stats::_name [protected]

OpenThreads::Mutex osg::Stats::_mutex [mutable, protected]

int osg::Stats::_baseFrameNumber [protected]

int osg::Stats::_latestFrameNumber [protected]

AttributeMapList osg::Stats::_attributeMapList [protected]

AttributeMap osg::Stats::_invalidAttributeMap [protected]

CollectMap osg::Stats::_collectMap [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:16 2007 for the OpenSceneGraph by doxygen 1.5.3.