ircproxy  The Ultimate Cyborg

debug::InvisibleAllocations Struct Reference

#include <debug.h>

List of all members.


Detailed Description

Interface for marking scopes of invisible memory allocations.

Creation of the object does nothing, you have to explicitly call InvisibleAllocations::on. Destruction of the object automatically cancels any call to on of this object. This makes it exception- (stack unwinding) and recursive-safe.

Definition at line 123 of file debug.h.


Public Member Functions

 InvisibleAllocations ()
 Constructor.
 ~InvisibleAllocations ()
 Destructor.
void on (void)
 Set invisible allocations on. Can be called recursively.
void off (void)
 Cancel one call to on().

Public Attributes

int M_on

Constructor & Destructor Documentation

debug::InvisibleAllocations::InvisibleAllocations (  )  [inline]

Constructor.

Definition at line 126 of file debug.h.

00126 : M_on(0) { }

debug::InvisibleAllocations::~InvisibleAllocations (  )  [inline]

Destructor.

Definition at line 128 of file debug.h.

References M_on, and off().

00128 { while (M_on > 0) off(); }


Member Function Documentation

void debug::InvisibleAllocations::on ( void   )  [inline]

Set invisible allocations on. Can be called recursively.

Definition at line 130 of file debug.h.

References M_on.

00130 { libcwd::set_invisible_on(); ++M_on; }

void debug::InvisibleAllocations::off ( void   )  [inline]

Cancel one call to on().

Definition at line 132 of file debug.h.

References M_on.

Referenced by ~InvisibleAllocations().

00132 { assert(M_on > 0); --M_on; libcwd::set_invisible_off(); }


Member Data Documentation

The number of times that InvisibleAllocations::on() was called.

Definition at line 124 of file debug.h.

Referenced by off(), on(), and ~InvisibleAllocations().


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

Copyright © 2005-2007 Carlo Wood.  All rights reserved.