OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osg::Stats Class Reference

#include <Stats.h>

Inheritance diagram for osg::Stats:
Inheritance graph
[legend]
Collaboration diagram for osg::Stats:
Collaboration graph
[legend]

Public Types

typedef std::map< std::string,
double > 
AttributeMap
 
typedef std::vector< AttributeMapAttributeMapList
 
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)
 
unsigned int getEarliestFrameNumber () const
 
unsigned int getLatestFrameNumber () const
 
bool setAttribute (unsigned int frameNumber, const std::string &attributeName, double value)
 
bool getAttribute (unsigned int frameNumber, const std::string &attributeName, double &value) const
 
bool getAveragedAttribute (const std::string &attributeName, double &value, bool averageInInverseSpace=false) const
 
bool getAveragedAttribute (unsigned int startFrameNumber, unsigned int endFrameNumber, const std::string &attributeName, double &value, bool averageInInverseSpace=false) const
 
AttributeMapgetAttributeMap (unsigned int frameNumber)
 
const AttributeMapgetAttributeMap (unsigned 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
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Member Functions

virtual ~Stats ()
 
bool getAttributeNoMutex (unsigned int frameNumber, const std::string &attributeName, double &value) const
 
AttributeMapgetAttributeMapNoMutex (unsigned int frameNumber)
 
const AttributeMapgetAttributeMapNoMutex (unsigned int frameNumber) const
 
int getIndex (unsigned int frameNumber) const
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

std::string _name
 
OpenThreads::Mutex _mutex
 
unsigned int _baseFrameNumber
 
unsigned int _latestFrameNumber
 
AttributeMapList _attributeMapList
 
AttributeMap _invalidAttributeMap
 
CollectMap _collectMap
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

Definition at line 28 of file Stats.h.

Member Typedef Documentation

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

Definition at line 44 of file Stats.h.

Definition at line 45 of file Stats.h.

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

Definition at line 71 of file Stats.h.

Constructor & Destructor Documentation

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

Definition at line 88 of file Stats.h.

Member Function Documentation

void osg::Stats::allocate ( unsigned int  numberOfFrames)
void osg::Stats::collectStats ( const std::string &  str,
bool  flag 
)
inline

Definition at line 73 of file Stats.h.

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

Definition at line 75 of file Stats.h.

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

Definition at line 49 of file Stats.h.

AttributeMap& osg::Stats::getAttributeMap ( unsigned int  frameNumber)
inline

Definition at line 59 of file Stats.h.

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

Definition at line 65 of file Stats.h.

AttributeMap& osg::Stats::getAttributeMapNoMutex ( unsigned int  frameNumber)
protected
const AttributeMap& osg::Stats::getAttributeMapNoMutex ( unsigned int  frameNumber) const
protected
bool osg::Stats::getAttributeNoMutex ( unsigned int  frameNumber,
const std::string &  attributeName,
double &  value 
) const
protected
bool osg::Stats::getAveragedAttribute ( const std::string &  attributeName,
double &  value,
bool  averageInInverseSpace = false 
) const
bool osg::Stats::getAveragedAttribute ( unsigned int  startFrameNumber,
unsigned int  endFrameNumber,
const std::string &  attributeName,
double &  value,
bool  averageInInverseSpace = false 
) const
unsigned int osg::Stats::getEarliestFrameNumber ( ) const
inline

Definition at line 41 of file Stats.h.

int osg::Stats::getIndex ( unsigned int  frameNumber) const
inlineprotected

Definition at line 96 of file Stats.h.

unsigned int osg::Stats::getLatestFrameNumber ( ) const
inline

Definition at line 42 of file Stats.h.

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

Definition at line 37 of file Stats.h.

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::setAttribute ( unsigned int  frameNumber,
const std::string &  attributeName,
double  value 
)
void osg::Stats::setName ( const std::string &  name)
inline

Definition at line 36 of file Stats.h.

Member Data Documentation

AttributeMapList osg::Stats::_attributeMapList
protected

Definition at line 115 of file Stats.h.

unsigned int osg::Stats::_baseFrameNumber
protected

Definition at line 112 of file Stats.h.

CollectMap osg::Stats::_collectMap
protected

Definition at line 118 of file Stats.h.

AttributeMap osg::Stats::_invalidAttributeMap
protected

Definition at line 116 of file Stats.h.

unsigned int osg::Stats::_latestFrameNumber
protected

Definition at line 113 of file Stats.h.

OpenThreads::Mutex osg::Stats::_mutex
mutableprotected

Definition at line 110 of file Stats.h.

std::string osg::Stats::_name
protected

Definition at line 108 of file Stats.h.


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