EPSCommentDef Class Reference

Describes an EPS/DSC comment, and describes how to handle it. There are four fields:. More...

#include <epscdef.h>

List of all members.

Public Member Functions

 EPSCommentDef (void)
 Creates the class, and sets all the variables to be a default value.
 EPSCommentDef (const EPSCommentDef &NewValue)
 Copy constructor.
 EPSCommentDef (TCHAR *pStart, TCHAR *pEnd, BOOL DoProcessContents, UINT32 NestingDepth)
 Creates the class, and sets all the variables to be a passed value.
 ~EPSCommentDef (void)
 Destroys the class and all member data.
void Add (EPSCommentDef *pNewItem)
 Adds a new item onto the end of the list.
EPSCommentDefoperator= (const EPSCommentDef &NewValue)
 Sets the value of an EPSCommentDef to be equal to the passed in value.
EPSCommentDefGetNext (void)
 Gets the pointer to the next item in the linked list.

Public Attributes

String_64 StartMarker
String_64 EndMarker
BOOL ProcessContents
UINT32 Nesting

Private Attributes

EPSCommentDefmpNext


Detailed Description

Describes an EPS/DSC comment, and describes how to handle it. There are four fields:.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com> (from Tim's code)
Date:
27/4/00
StartMarker - a string which is the start of the comment block, e.g. "%%BeginSetup"

EndMarker - a string which is the end of the comment block, e.g. "%%EndSetup"

ProcessContents - a boolean; if TRUE, all comments found within the comment block should be passed around to the document components for processing as usual. If FALSE, then all lines in the comment block should be completely ignored.

Nesting - the current nesting level of this comment - this is set up to be 0 before loading a new file, and means we can cope with, e.g. nested documents correctly.

Definition at line 128 of file epscdef.h.


Constructor & Destructor Documentation

EPSCommentDef::EPSCommentDef void   ) 
 

Creates the class, and sets all the variables to be a default value.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/00
Parameters:
- [INPUTS]
Returns:
-
See also:
EPSCommentDef::~EPSCommentDef

Definition at line 114 of file epscdef.cpp.

00115 {
00116     // Pointers to next and previous items.
00117     mpNext          = NULL;
00118 
00119     // State variables.
00120     StartMarker.Empty ();
00121     EndMarker.Empty ();
00122     ProcessContents = FALSE;
00123     Nesting         = 0;
00124 }

EPSCommentDef::EPSCommentDef const EPSCommentDef NewValue  ) 
 

Copy constructor.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/5/00
Parameters:
NewValue - The values to be assigned. [INPUTS]
Returns:
-
See also:
EPSCommentList::EPSCommentDef

Definition at line 140 of file epscdef.cpp.

00141 {
00142     // Copy the data across.
00143     StartMarker     = NewValue.StartMarker;
00144     EndMarker       = NewValue.EndMarker;
00145     ProcessContents = NewValue.ProcessContents;
00146     Nesting         = NewValue.Nesting;
00147 
00148     // Default value for the pointer.
00149     mpNext          = NULL;
00150 }

EPSCommentDef::EPSCommentDef TCHAR pStart,
TCHAR pEnd,
BOOL  DoProcessContents,
UINT32  NestingDepth
 

Creates the class, and sets all the variables to be a passed value.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/00
Parameters:
pStart - Pointer to the comment starting a comment block. [INPUTS] pEnd - Pointer to the comment that ends this block. DoProcessComments - Do the comments need processing? NestingDepth - The depth to which comments can be nested.
Returns:
-
See also:
EPSCommentDef::~EPSCommentDef

Definition at line 171 of file epscdef.cpp.

00175 {
00176     // Set the variables according to the passed-in values.
00177     StartMarker     = pStart;
00178     EndMarker       = pEnd;
00179     ProcessContents = DoProcessContents;
00180     Nesting         = NestingDepth;
00181 
00182     // Set the values of the pointers.
00183     mpNext          = NULL;
00184 }

EPSCommentDef::~EPSCommentDef void   ) 
 

Destroys the class and all member data.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/00
Parameters:
- [INPUTS]
Returns:
-
See also:
EPSCommentDef::~EPSCommentDef

Definition at line 199 of file epscdef.cpp.

00200 {
00201     // Recursively call down the list.
00202     if ( mpNext != NULL )
00203     {
00204         delete mpNext;
00205     }
00206 }


Member Function Documentation

void EPSCommentDef::Add EPSCommentDef pNewItem  ) 
 

Adds a new item onto the end of the list.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/00
Parameters:
pNewItem - A pointer to the item to be added. [INPUTS]
Returns:
-
See also:
EPSCommentList::Add

Definition at line 221 of file epscdef.cpp.

00222 {
00223     // Recursively call down the list until mpNext is NULL.
00224     if ( mpNext != NULL )
00225     {
00226         mpNext->Add ( pNewItem );
00227     }
00228     else
00229     {
00230         mpNext = pNewItem;
00231     }
00232 }

EPSCommentDef * EPSCommentDef::GetNext void   ) 
 

Gets the pointer to the next item in the linked list.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/00
Parameters:
- [INPUTS]
Returns:
mpNext - A pointer to the next item in the list.
See also:
EPSCommentDef::Add

Definition at line 273 of file epscdef.cpp.

00274 {
00275     // Return a pointer to the next item in the list.
00276     return mpNext;
00277 }

EPSCommentDef & EPSCommentDef::operator= const EPSCommentDef NewValue  ) 
 

Sets the value of an EPSCommentDef to be equal to the passed in value.

Author:
Graeme_Sutherland (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/5/00
Parameters:
NewValue - The values to be assigned. [INPUTS]
Returns:
EPSCommentDef& - The value being assigned (to allow for chaining).
See also:
EPSCommentList::Add

Definition at line 247 of file epscdef.cpp.

00248 {
00249     StartMarker     = NewValue.StartMarker;
00250     EndMarker       = NewValue.EndMarker;
00251     ProcessContents = NewValue.ProcessContents;
00252     Nesting         = NewValue.Nesting;
00253 
00254     // Ignore the pointers to avoid confusion with the linked list.
00255 
00256     // Return a reference to the new value to allow chaining of = operators.
00257     return *this;
00258 }


Member Data Documentation

String_64 EPSCommentDef::EndMarker
 

Definition at line 147 of file epscdef.h.

EPSCommentDef* EPSCommentDef::mpNext [private]
 

Definition at line 153 of file epscdef.h.

UINT32 EPSCommentDef::Nesting
 

Definition at line 149 of file epscdef.h.

BOOL EPSCommentDef::ProcessContents
 

Definition at line 148 of file epscdef.h.

String_64 EPSCommentDef::StartMarker
 

Definition at line 146 of file epscdef.h.


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