EDoc::StackRef Class Reference

#include <include/EDoc/StackRef.h>


Detailed Description

Pushes/Pops pointers into a PStack instance.

This is primarily used to ensure that pointers are pop'ed off the stack when a function call goes out of scope.

Definition at line 32 of file StackRef.h.

Public Member Functions

 operator safe_bool_t () const
 Returns true if the pointer was successfully pushed onto the stack during construction.
 StackRef (PStack &stack_in, const void *item_in)
 Pushes the given pointer onto the stack.
 ~StackRef ()
 Pops the pointer from the stack upon destruction.

Private Types

typedef void(StackRef::*) safe_bool_t () const

Private Member Functions

void this_type_does_not_support_comparison () const
 (BRIEF DESC NOT PROVIDED).

Private Attributes

bool valid
 True if pointer was successfully pushed onto stack.
PStackstack
 Stack pointer was pushed onto.
const void * item
 Pointer value that was pushed onto the stack.


Member Typedef Documentation

typedef void(StackRef::*) EDoc::StackRef::safe_bool_t() const [private]

Definition at line 34 of file StackRef.h.


Constructor & Destructor Documentation

EDoc::StackRef::StackRef ( EDoc::PStack stack_in,
const void *  item_in 
)

Pushes the given pointer onto the stack.

Note:
EDoc++ data included.

Definition at line 26 of file StackRef.cpp.

References item, EDoc::PStack::Push(), stack, and valid.

EDoc::StackRef::~StackRef (  ) 

Pops the pointer from the stack upon destruction.

Note:
EDoc++ data included.

Definition at line 34 of file StackRef.cpp.

References EDOC_ASSERT, item, EDoc::PStack::Pop(), stack, and valid.


Member Function Documentation

EDoc::StackRef::this_type_does_not_support_comparison (  )  const [inline, private]

(BRIEF DESC NOT PROVIDED).

Note:
EDoc++ data included.

Definition at line 35 of file StackRef.h.

Referenced by operator safe_bool_t().

EDoc::StackRef::operator safe_bool_t (  )  const [inline]

Returns true if the pointer was successfully pushed onto the stack during construction.

Definition at line 42 of file StackRef.h.

References this_type_does_not_support_comparison(), and valid.


Field Documentation

bool EDoc::StackRef::valid [private]

True if pointer was successfully pushed onto stack.

Definition at line 66 of file StackRef.h.

Referenced by operator safe_bool_t(), StackRef(), and ~StackRef().

PStack& EDoc::StackRef::stack [private]

Stack pointer was pushed onto.

Definition at line 71 of file StackRef.h.

Referenced by StackRef(), and ~StackRef().

const void* EDoc::StackRef::item [private]

Pointer value that was pushed onto the stack.

Definition at line 76 of file StackRef.h.

Referenced by StackRef(), and ~StackRef().


The documentation for this class was generated from the following files:
Generated on Tue Jan 20 18:26:09 2009 for EDoc-0.2.1 by  doxygen 1.5.1