tMemStack Class Reference

#include <tMemStack.h>

List of all members.

Public Member Functions

 tMemStack (int minSize=10)
 ~tMemStack ()
void * GetMem () const
int GetSize () const
void IncreaseMem ()

Private Member Functions

tMemStackItemItem () const

Private Attributes

int index


Detailed Description

Definition at line 37 of file tMemStack.h.


Constructor & Destructor Documentation

tMemStack::tMemStack ( int  minSize = 10  ) 

Definition at line 119 of file tMemStack.cpp.

References tMemStackItem::Alloc(), Item(), and ST_Size().

00120         : index( ST_Index()++ )
00121 {
00122     if ( ST_Size() < minSize )
00123         ST_Size() = minSize;
00124 
00125     Item().Alloc();
00126 }

Here is the call graph for this function:

tMemStack::~tMemStack (  ) 

Definition at line 128 of file tMemStack.cpp.

References index, st_Breakpoint(), ST_Index(), and st_Pop().

00129 {
00130     st_Pop();
00131 
00132 #ifdef DEBUG
00133     if( index != ST_Index() )
00134     {
00135         st_Breakpoint();
00136     }
00137 #endif
00138 }

Here is the call graph for this function:


Member Function Documentation

void * tMemStack::GetMem (  )  const

Definition at line 142 of file tMemStack.cpp.

References Item(), and tMemStackItem::memory.

00143 {
00144     return Item().memory;
00145 }

Here is the call graph for this function:

int tMemStack::GetSize (  )  const

Definition at line 148 of file tMemStack.cpp.

References Item(), and tMemStackItem::size.

00149 {
00150     return Item().size;
00151 }

Here is the call graph for this function:

void tMemStack::IncreaseMem (  ) 

Definition at line 154 of file tMemStack.cpp.

References tMemStackItem::Alloc(), Item(), and ST_Size().

00155 {
00156     ST_Size() *= 2;
00157 
00158     Item().Alloc();
00159 }

Here is the call graph for this function:

tMemStackItem & tMemStack::Item (  )  const [private]

Definition at line 114 of file tMemStack.cpp.

References index, and ST_Stack().

Referenced by GetMem(), GetSize(), IncreaseMem(), and tMemStack().

00115 {
00116     return ST_Stack()[this->index];
00117 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int tMemStack::index [private]

Definition at line 48 of file tMemStack.h.

Referenced by Item(), and ~tMemStack().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:57:39 2008 for Armagetron Advanced by  doxygen 1.5.4