CXaraFileRecordHandler Class Reference

This is the class that encapsulates a record handler in the new v2 format. More...

#include <cxfrech.h>

Inheritance diagram for CXaraFileRecordHandler:

ListItem CCObject SimpleCCObject CamelotRecordHandler CXFTreeDlgRecordHandler BevelRecordHandler BitmapPropertiesRecordHandler BitmapRecordHandler BitmapSmoothingRecordHandler BlendRecordHandler BrushAttrRecordHandler ClipViewRecordHandler ColourRecordHandler CompressionRecordHandler ContourRecordHandler DocInfoRecordHandler DocumentRecordHandler ExportHintRecordHandler FeatherRecordHandler FillAttrRecordHandler FontDefRecordHandler GeneralAttrRecordHandler GeneralRecordHandler GroupRecordHandler ImagesettingAttrRecordHandler LineAttrRecordHandler LiveEffectRecordHandler MouldRecordHandler PathFlagsRecordHandler PathRecordHandler PrintingRecordHandler RegularShapeRecordHandler ShadowRecordHandler StandardDefaultRecordHandler StripSubTreeRecordHandler StrokeAttrRecordHandler TemplateAttrRecordHandler TextAttrRecordHandler TextObjRecordHandler UnitsRecordHandler ViewRecordHandler WizOpStyleRecordHandler WizOpStyleRefRecordHandler List of all members.

Public Member Functions

 CXaraFileRecordHandler ()
 Creates a record handler object. These are used by CXaraFile for reading the file. Handlers handle records as they are read from a file.
 ~CXaraFileRecordHandler ()
 Default destructor.
virtual UINT32GetTagList ()=0
virtual BOOL HandleRecord (CXaraFileRecord *pCXaraFileRecord)=0
virtual BOOL HandleStreamedRecord (CXaraFile *pCXFile, UINT32 Tag, UINT32 Size, UINT32 RecordNumber)
 This is the baseclass streamed record handler. It should always be overriden. We don't want to make it pure virtual and force all handlers to define it as most do not require it.
virtual BOOL IsStreamed (UINT32 Tag)=0
virtual void IncProgressBarCount (UINT32 n)=0
virtual BOOL IsTagInList (UINT32 Tag)
 Helper function that searchs the handler's tag list for a given tag.
virtual BOOL Init (BaseCamelotFilter *pBaseCamelotFilter)
 Initialises the handler.
virtual BOOL BeginImport ()
 Informs the record handler that importing has begun.
virtual BOOL EndImport ()
 Informs the record handler that importing is over.
virtual BOOL BeginSubtree (UINT32 Tag)
 Informs the record handler that a subtree is following a tag of type 'Tag'.
virtual BOOL EndSubtree (UINT32 Tag)
 Informs the record handler that a subtree that followed a tag of type 'Tag' has ended.

Private Member Functions

 CC_DECLARE_DYNAMIC (CXaraFileRecordHandler)

Detailed Description

This is the class that encapsulates a record handler in the new v2 format.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/5/96

Definition at line 145 of file cxfrech.h.


Constructor & Destructor Documentation

CXaraFileRecordHandler::CXaraFileRecordHandler  ) 
 

Creates a record handler object. These are used by CXaraFile for reading the file. Handlers handle records as they are read from a file.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/5/96
Parameters:
- [INPUTS]
Returns:
Errors: -
See also:
-

Definition at line 149 of file cxfrech.cpp.

00150 {
00151 }

CXaraFileRecordHandler::~CXaraFileRecordHandler  ) 
 

Default destructor.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/5/96
Returns:
Errors: -
See also:
-

Definition at line 165 of file cxfrech.cpp.

00166 {
00167 }


Member Function Documentation

BOOL CXaraFileRecordHandler::BeginImport  )  [virtual]
 

Informs the record handler that importing has begun.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/96
Parameters:
pThisBaseCamelotFilter = ptr to the filter that will read the file. [INPUTS]
Returns:
TRUE if ok FALSE otherwise

Errors: -

See also:
-

Reimplemented in StripSubTreeRecordHandler, BitmapRecordHandler, ColourRecordHandler, DocumentRecordHandler, DocInfoRecordHandler, PrintingRecordHandler, TextObjRecordHandler, UnitsRecordHandler, and ViewRecordHandler.

Definition at line 270 of file cxfrech.cpp.

00271 {
00272     return TRUE;
00273 }

BOOL CXaraFileRecordHandler::BeginSubtree UINT32  Tag  )  [virtual]
 

Informs the record handler that a subtree is following a tag of type 'Tag'.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/9/96
Parameters:
Tag = tag value of the tag this handler last handled [INPUTS]
Returns:
TRUE if this func wants exclusive handling of the tag FALSE otherwise
If you override this func and you do not wish other parts of the system to be informed of the subtree start, you should return TRUE

The base class always returns FALSE

Returns:
Errors: -
See also:
-

Reimplemented in BrushAttrRecordHandler, PrintingRecordHandler, and StrokeAttrRecordHandler.

Definition at line 318 of file cxfrech.cpp.

00319 {
00320     return FALSE;   // FALSE means pass onto other parts of the system
00321 }

CXaraFileRecordHandler::CC_DECLARE_DYNAMIC CXaraFileRecordHandler   )  [private]
 

BOOL CXaraFileRecordHandler::EndImport  )  [virtual]
 

Informs the record handler that importing is over.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/7/96
Parameters:
- [INPUTS]
Returns:
TRUE if ok FALSE otherwise
If you override this func, be sure to call the base class varient
Returns:
Errors: -
See also:
-

Reimplemented in WizOpStyleRecordHandler.

Definition at line 292 of file cxfrech.cpp.

00293 {
00294     // Just return TRUE in the base class
00295     return TRUE;
00296 }

BOOL CXaraFileRecordHandler::EndSubtree UINT32  Tag  )  [virtual]
 

Informs the record handler that a subtree that followed a tag of type 'Tag' has ended.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/9/96
Parameters:
Tag = tag value of the tag this handler last handled [INPUTS]
Returns:
TRUE if this func wants exclusive handling of the tag FALSE otherwise
If you override this func and you do not wish other parts of the system to be informed of the subtree start, you should return TRUE

The base class always returns FALSE

Returns:
Errors: -
See also:
-

Reimplemented in BrushAttrRecordHandler, PrintingRecordHandler, and StrokeAttrRecordHandler.

Definition at line 343 of file cxfrech.cpp.

00344 {
00345     return FALSE;   // FALSE means pass onto other parts of the system
00346 }

virtual UINT32* CXaraFileRecordHandler::GetTagList  )  [pure virtual]
 

Implemented in BrushAttrRecordHandler, StandardDefaultRecordHandler, GeneralRecordHandler, StripSubTreeRecordHandler, CXFTreeDlgRecordHandler, ExportHintRecordHandler, FeatherRecordHandler, ImagesettingAttrRecordHandler, ContourRecordHandler, ClipViewRecordHandler, BevelRecordHandler, LiveEffectRecordHandler, LineAttrRecordHandler, FillAttrRecordHandler, GeneralAttrRecordHandler, BlendRecordHandler, BitmapRecordHandler, BitmapPropertiesRecordHandler, ColourRecordHandler, CompressionRecordHandler, DocumentRecordHandler, EllipseRecordHandler, GroupRecordHandler, DocInfoRecordHandler, MouldRecordHandler, PathRecordHandler, PathFlagsRecordHandler, PolygonRecordHandler, PrintingRecordHandler, RectangleRecordHandler, RegularShapeRecordHandler, ShadowRecordHandler, BitmapSmoothingRecordHandler, TextObjRecordHandler, TextAttrRecordHandler, FontDefRecordHandler, UnitsRecordHandler, ViewRecordHandler, StrokeAttrRecordHandler, WizOpStyleRecordHandler, TemplateAttrRecordHandler, and WizOpStyleRefRecordHandler.

virtual BOOL CXaraFileRecordHandler::HandleRecord CXaraFileRecord pCXaraFileRecord  )  [pure virtual]
 

Implemented in BrushAttrRecordHandler, StandardDefaultRecordHandler, GeneralRecordHandler, StripSubTreeRecordHandler, CXFTreeDlgRecordHandler, ExportHintRecordHandler, FeatherRecordHandler, ImagesettingAttrRecordHandler, ContourRecordHandler, ClipViewRecordHandler, BevelRecordHandler, LiveEffectRecordHandler, LineAttrRecordHandler, FillAttrRecordHandler, GeneralAttrRecordHandler, BlendRecordHandler, BitmapRecordHandler, BitmapPropertiesRecordHandler, ColourRecordHandler, CompressionRecordHandler, DocumentRecordHandler, EllipseRecordHandler, GroupRecordHandler, DocInfoRecordHandler, MouldRecordHandler, PathRecordHandler, PathFlagsRecordHandler, PolygonRecordHandler, PrintingRecordHandler, RectangleRecordHandler, RegularShapeRecordHandler, ShadowRecordHandler, BitmapSmoothingRecordHandler, TextObjRecordHandler, TextAttrRecordHandler, FontDefRecordHandler, UnitsRecordHandler, ViewRecordHandler, StrokeAttrRecordHandler, WizOpStyleRecordHandler, TemplateAttrRecordHandler, and WizOpStyleRefRecordHandler.

BOOL CXaraFileRecordHandler::HandleStreamedRecord CXaraFile pCXFile,
UINT32  Tag,
UINT32  Size,
UINT32  RecordNumber
[virtual]
 

This is the baseclass streamed record handler. It should always be overriden. We don't want to make it pure virtual and force all handlers to define it as most do not require it.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/6/96
Parameters:
pCXFile = access to the CXaraFile class [INPUTS] Tag = the tag value Size = size of record RecordNumber = the record number in the file
Returns:
TRUE if handled ok FALSE otherwise

Errors: -

See also:
-

Reimplemented in CXFTreeDlgRecordHandler, LiveEffectRecordHandler, BitmapRecordHandler, BitmapPropertiesRecordHandler, and CompressionRecordHandler.

Definition at line 222 of file cxfrech.cpp.

00223 {
00224     ERROR2(FALSE,"CXaraFileRecordHandler::HandleStreamedRecord Baseclass handler called");
00225     return FALSE;
00226 }

virtual void CXaraFileRecordHandler::IncProgressBarCount UINT32  n  )  [pure virtual]
 

Implemented in StandardDefaultRecordHandler, GeneralRecordHandler, CamelotRecordHandler, StripSubTreeRecordHandler, CXFTreeDlgRecordHandler, and CompressionRecordHandler.

BOOL CXaraFileRecordHandler::Init BaseCamelotFilter pThisBaseCamelotFilter  )  [virtual]
 

Initialises the handler.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/5/96
Parameters:
pThisBaseCamelotFilter = ptr to the filter that will read the file. [INPUTS]
Returns:
TRUE if ok FALSE otherwise
Base class does nowt
Returns:
Errors: -
See also:
-

Reimplemented in CamelotRecordHandler, WizOpStyleRecordHandler, and WizOpStyleRefRecordHandler.

Definition at line 247 of file cxfrech.cpp.

00251 {
00252     return TRUE;
00253 }

virtual BOOL CXaraFileRecordHandler::IsStreamed UINT32  Tag  )  [pure virtual]
 

Implemented in StandardDefaultRecordHandler, CamelotRecordHandler, CXFTreeDlgRecordHandler, LiveEffectRecordHandler, BitmapRecordHandler, BitmapPropertiesRecordHandler, and CompressionRecordHandler.

BOOL CXaraFileRecordHandler::IsTagInList UINT32  Tag  )  [virtual]
 

Helper function that searchs the handler's tag list for a given tag.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/5/96
Parameters:
Tag = a tag value [INPUTS]
Returns:
TRUE if tag is in handler's tag list FALSE otherwise

Errors: -

See also:
-

Reimplemented in StripSubTreeRecordHandler.

Definition at line 185 of file cxfrech.cpp.

00186 {
00187     const UINT32* pTagList = GetTagList();
00188 
00189     ERROR2IF(pTagList == NULL,FALSE,"NULL pTagList - is this a default handler?");
00190     
00191     while (*pTagList != CXFRH_TAG_LIST_END)
00192     {
00193         if (*pTagList == Tag)
00194             return TRUE;
00195 
00196         pTagList++;
00197     }
00198 
00199     return FALSE;
00200 }


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