Yate
Public Member Functions | List of all members
TempObjectCounter Class Reference

Ephemeral object counter changer. More...

#include <yateclass.h>

Public Member Functions

 TempObjectCounter (NamedCounter *counter, bool enable=GenObject::getObjCounting())
 
 TempObjectCounter (const GenObject *obj, bool enable=GenObject::getObjCounting())
 
 TempObjectCounter (const GenObject &obj, bool enable=GenObject::getObjCounting())
 
 ~TempObjectCounter ()
 

Detailed Description

Ephemeral object counter changer.

This class changes the current thread's object counter for its lifetime

Constructor & Destructor Documentation

TempObjectCounter ( NamedCounter counter,
bool  enable = GenObject::getObjCounting() 
)
inline

Constructor, changes object counter if counting is enabled

Parameters
counterObject counter to apply on the current thread
enableTrue to enable change, false to take no action

References Thread::setCurrentObjCounter().

TempObjectCounter ( const GenObject obj,
bool  enable = GenObject::getObjCounting() 
)
inline

Constructor, changes object counter if counting is enabled

Parameters
objObject to copy the counter from
enableTrue to enable change, false to take no action

References GenObject::getObjCounter(), and Thread::setCurrentObjCounter().

TempObjectCounter ( const GenObject obj,
bool  enable = GenObject::getObjCounting() 
)
inline

Constructor, changes object counter if counting is enabled

Parameters
objObject to copy the counter from
enableTrue to enable change, false to take no action

References GenObject::getObjCounter(), and Thread::setCurrentObjCounter().

~TempObjectCounter ( )
inline

Destructor, restores saved object counter

References Thread::setCurrentObjCounter().


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