Yate: TempObjectCounter Class Reference

Yate

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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

  counter | Object counter to apply on the current thread
  enable | True 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

  obj | Object to copy the counter from
  enable | True 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

  obj | Object to copy the counter from
  enable | True 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:

- yateclass.h