EPSStackItem Class Reference

This class provides objects that make up an EPSStack object. The object is polymorphic, and can contain either a INT32, a double, or a TCHAR* string object. More...

#include <epssitem.h>

Inheritance diagram for EPSStackItem:

ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 EPSStackItem ()
 Initialises a stack item (i.e. sets its type to be EPSTYPE_EMPTY).
 ~EPSStackItem ()
 Deletes storage associated with an EPSStackItem object.
void Init (INT32)
 Initialise an EPSStackItem object to hold a INT32.
void Init (FIXEDPOINT)
 Initialise an EPSStackItem object to hold a fixed point value.
void Init (double)
 Initialise an EPSStackItem object to hold a double.
void Init (TCHAR *Str, BOOL IsName=FALSE)
 Initialise an EPSStackItem object to hold a TCHAR * string. The string is copied.
void Init (EPSCommand)
 Initialise an EPSStackItem object to hold an EPS command.

Public Attributes

union {
   INT32   Long
   FIXEDPOINT   FixedPoint
   double   Double
   TCHAR *   pString
   EPSCommand   Cmd
Data
EPSType Type

Private Member Functions

 CC_DECLARE_MEMDUMP (EPSStackItem)

Detailed Description

This class provides objects that make up an EPSStack object. The object is polymorphic, and can contain either a INT32, a double, or a TCHAR* string object.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93
See also:
EPSStack

Definition at line 118 of file epssitem.h.


Constructor & Destructor Documentation

EPSStackItem::EPSStackItem  ) 
 

Initialises a stack item (i.e. sets its type to be EPSTYPE_EMPTY).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93

Definition at line 115 of file epssitem.cpp.

00116 {
00117     Type = EPSTYPE_EMPTY;
00118     Data.pString = NULL;
00119 }

EPSStackItem::~EPSStackItem  ) 
 

Deletes storage associated with an EPSStackItem object.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93

Definition at line 131 of file epssitem.cpp.

00132 {
00133     // Delete any data that is pointed to, rather than contained by, the stack item.
00134     if ((Type == EPSTYPE_STRING) || (Type == EPSTYPE_NAME))
00135     {
00136         delete Data.pString;
00137         Data.pString = NULL;
00138     }
00139 }


Member Function Documentation

EPSStackItem::CC_DECLARE_MEMDUMP EPSStackItem   )  [private]
 

void EPSStackItem::Init EPSCommand  Cmd  ) 
 

Initialise an EPSStackItem object to hold an EPS command.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93
Parameters:
Cmd - the command to put into the stack item. [INPUTS]

Definition at line 227 of file epssitem.cpp.

00228 {
00229     Type = EPSTYPE_COMMAND;
00230     Data.Cmd = Cmd;
00231 }

void EPSStackItem::Init TCHAR pString,
BOOL  IsName = FALSE
 

Initialise an EPSStackItem object to hold a TCHAR * string. The string is copied.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93
Parameters:
pString - pointer to the data to put into the stack item. [INPUTS] IsName - this is true if the string is a PostScript name object, and FALSE if it is a PostScript string object.

Definition at line 206 of file epssitem.cpp.

00207 {
00208     if (IsName)
00209         Type = EPSTYPE_NAME;
00210     else
00211         Type = EPSTYPE_STRING;
00212         
00213     Data.pString = pString;
00214 }

void EPSStackItem::Init double  Double  ) 
 

Initialise an EPSStackItem object to hold a double.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93
Parameters:
Double - the data to put into the stack item. [INPUTS]

Definition at line 186 of file epssitem.cpp.

00187 {
00188     Type = EPSTYPE_DOUBLE;
00189     Data.Double = Double;
00190 }

void EPSStackItem::Init FIXEDPOINT  FixedPoint  ) 
 

Initialise an EPSStackItem object to hold a fixed point value.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93
Parameters:
FixedPoint - the data to put into the stack item. [INPUTS]

Definition at line 169 of file epssitem.cpp.

00170 {
00171     Type = EPSTYPE_FIXEDPOINT;
00172     Data.FixedPoint = FixedPoint;
00173 }

void EPSStackItem::Init INT32  Long  ) 
 

Initialise an EPSStackItem object to hold a INT32.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/10/93
Parameters:
Long - the data to put into the stack item. [INPUTS]

Definition at line 152 of file epssitem.cpp.

00153 {
00154     Type = EPSTYPE_INT32;
00155     Data.Long = Long;
00156 }


Member Data Documentation

EPSCommand EPSStackItem::Cmd
 

Definition at line 138 of file epssitem.h.

union { ... } EPSStackItem::Data
 

double EPSStackItem::Double
 

Definition at line 136 of file epssitem.h.

FIXEDPOINT EPSStackItem::FixedPoint
 

Definition at line 135 of file epssitem.h.

INT32 EPSStackItem::Long
 

Definition at line 134 of file epssitem.h.

TCHAR* EPSStackItem::pString
 

Definition at line 137 of file epssitem.h.

EPSType EPSStackItem::Type
 

Definition at line 141 of file epssitem.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:54:04 2007 for Camelot by  doxygen 1.4.4