[Classes] [Prev] [Next] [Methods]

CStackable

Methods Index

Heritage
Description
Usage
Protected Data Members
Protected Methods
Constructor and Destructor Methods
State Methods
Attributes Method
Canceled Methods

CStackable


Heritage

Superclass: None

Subclass: CDrawingContext


Description

The CStackable class serves as a base class for objects that should not be created on the heap. This class is used to maintain a last-in, first-out (LIFO) collection of objects created with an automatic storage class. It also provides collection management (stack) of all objects of this type that have been constructed on the stack frame.


Usage

Use this class as a base class to disable heap creation of an object. This class provides methods to determine if this is the top-most item and, if not, to make this the top-most item.


Protected Data Members

static RWGDlist(
CStackable)
itsStack; A list of the CStackable instances currently on the stack


Protected Methods

Constructor and Destructor Methods

CStackable();
The constructor, which adds the constructed object to itsStack.

virtual ~CStackable();
The destructor, which removes the destructed object from itsStack.

State Methods

BOOLEAN IsTop(void) const;
void MakeTop(void);
virtual void DoUpdate(void) = 0;

Attributes Method

static RWGDlist(CStackable) & GetStack(void);

Canceled Methods

Since the new and delete operators are overloaded to provide CStackable functionality, the following two methods are canceled:

void * operator new(size_t theSize);
void operator delete(void *theObject);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.