- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
G::Counter< D, C > Class Template Reference

An instance counter to help with leak testing. More...

`#include <gcounter.h>`

Inheritance diagram for G::Counter< D, C >:

## Public Member Functions
| Counter ()
| Constructor. More...
| ~Counter ()
| Destructor. More...
| Counter (const Counter< D, C > &)
| Copy constructor. More...
void | operator= (const Counter< D, C > &)
| Assignment operator. More...

## Detailed Description

### template<typename D, const char * C>
class G::Counter< D, C >

An instance counter to help with leak testing.

Typically used as a private base class. (Strictly this uses the curiously recurring template pattern, but it does not do any static_cast<D> downcasting.)

Note that the second template parameter (the class name) needs a declaration like "extern char FooClassName[]", not a string literal.

Definition at line 60 of file gcounter.h.

## Constructor & Destructor Documentation

template<typename D , const char * C>

G::Counter< D, C >::Counter | ( |  | ) |

Constructor.

Definition at line 83 of file gcounter.h.

template<typename D , const char * C>

G::Counter< D, C >::~Counter | ( |  | ) |

Destructor.

Definition at line 90 of file gcounter.h.

template<typename D , const char * C>

G::Counter< D, C >::Counter | ( | const Counter< D, C > & |  | ) |

Copy constructor.

Definition at line 97 of file gcounter.h.

## Member Function Documentation

template<typename D , const char * C>

void G::Counter< D, C >::operator= | ( | const Counter< D, C > & |  | ) |

Assignment operator.

Definition at line 104 of file gcounter.h.

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

- gcounter.h