CMXReferLens Class Reference

#include <cmxexdc.h>

Inheritance diagram for CMXReferLens:

CMXReferListItem ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 CMXReferLens (CMXExportDC *pDC)
BOOL Set (CMXExportDC *pDC, DocRect *tBBox)
 sets up the data this thingy needs
BOOL IsInReferenceList (void)
BOOL WriteInReferenceList (CMXExportDC *pDC)
 writes the relevant entry in the reference list of the file
BOOL IsASection (void)
BOOL WriteSection (CMXExportDC *pDC)
 writes the lens descrition section
BOOL IsAProcedure (void)
INT32 IsInWhichIndex (void)
BOOL WriteInIndex (CMXExportDC *pDC)
 writes the relevant entry in the procedure index of the file
INT32 IndexEntrySize (CMXExportDC *pDC)

Protected Attributes

INT32 CommandFilePosition
DocRect BBox
INT32 LayerNumber
INT32 LensDescFilePosition

Private Member Functions

 CC_DECLARE_DYNAMIC (CMXReferLens)

Detailed Description

Definition at line 667 of file cmxexdc.h.


Constructor & Destructor Documentation

CMXReferLens::CMXReferLens CMXExportDC pDC  )  [inline]
 

Definition at line 672 of file cmxexdc.h.

00672 : CMXReferListItem(pDC) {};


Member Function Documentation

CMXReferLens::CC_DECLARE_DYNAMIC CMXReferLens   )  [private]
 

INT32 CMXReferLens::IndexEntrySize CMXExportDC pDC  )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 686 of file cmxexdc.h.

00686 {return sizeof(cmxProcIndexEntry)+(pDC->IsThirtyTwoBit()?sizeof(WORD):0);};     // size of entry which goes in index

BOOL CMXReferLens::IsAProcedure void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 682 of file cmxexdc.h.

00682 {return TRUE;};

BOOL CMXReferLens::IsASection void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 679 of file cmxexdc.h.

00679 {return TRUE;};

BOOL CMXReferLens::IsInReferenceList void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 676 of file cmxexdc.h.

00676 {return TRUE;};

INT32 CMXReferLens::IsInWhichIndex void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 684 of file cmxexdc.h.

00684 {return cmxINDEX_PROCEDURE;};

BOOL CMXReferLens::Set CMXExportDC pDC,
DocRect tBBox
 

sets up the data this thingy needs

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/07/96
Parameters:
export DC, bounding box of lens object [INPUTS]
Returns:
error flag

Definition at line 2173 of file cmxdcobj.cpp.

02174 {
02175     // copy in the bounding box
02176     BBox = *tBBox;
02177 
02178     // get the position of the command
02179     CommandFilePosition = pDC->GetCurrentInstrFilePosition();
02180 
02181     // get the layer number
02182     LayerNumber = pDC->GetLayerNumber();
02183     
02184     return TRUE;
02185 }

BOOL CMXReferLens::WriteInIndex CMXExportDC pDC  )  [virtual]
 

writes the relevant entry in the procedure index of the file

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/07/96
Parameters:
export dc [INPUTS]
Returns:
success
See also:

Reimplemented from CMXReferListItem.

Definition at line 2278 of file cmxdcobj.cpp.

02279 {
02280     // write the index entry
02281     cmxProcIndexEntry en;
02282     pDC->WriteSizeInFile(sizeof(en));
02283     en.RefList = -1;
02284     en.Procedure = LensDescFilePosition;
02285 
02286     return pDC->WriteData(&en, sizeof(en));
02287 }

BOOL CMXReferLens::WriteInReferenceList CMXExportDC pDC  )  [virtual]
 

writes the relevant entry in the reference list of the file

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/07/96
Parameters:
export dc [INPUTS]
Returns:
success
See also:

Reimplemented from CMXReferListItem.

Definition at line 2247 of file cmxdcobj.cpp.

02248 {
02249     ERROR2IF(pDC == 0, FALSE, "no DC");
02250 
02251     // write the entry
02252     cmxRefListEntryRefOffset en;
02253     memset(&en, '\0', sizeof(en));
02254 
02255     en.Association = cmxREFLISTEN_DESC_LENS;
02256     en.Type = cmxREFLISTEN_TYPE_INSTRUCTION;
02257     en.Offset = CommandFilePosition;
02258 
02259     pDC->WriteData(&en, sizeof(en));
02260 
02261     return TRUE;
02262 }

BOOL CMXReferLens::WriteSection CMXExportDC pDC  )  [virtual]
 

writes the lens descrition section

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/07/96
Parameters:
export DC [INPUTS]
Returns:
error flag

Reimplemented from CMXReferListItem.

Definition at line 2200 of file cmxdcobj.cpp.

02201 {
02202     // note the position of this thingy for future reference
02203     LensDescFilePosition = pDC->GetFilePosition();
02204 
02205     // start the section
02206     if(!pDC->StartSection(CMXExportDC::CMXSECTION_LENS))
02207         return FALSE;
02208 
02209     // write the header
02210     cmxLensDescriptionSection len;
02211     len.ParentType = cmxREFLISTEN_TYPE_LAYER;
02212     len.Page = 1;
02213     len.ParentReference = LayerNumber;
02214     len.StartAddress = pDC->GetFirstInstrFilePosition();
02215     len.EndAddress = CommandFilePosition;
02216     pDC->WriteData(&len, sizeof(len));
02217 
02218     // write the bbox
02219     Matrix *pMat = pDC->GetTransMatrix();
02220     DocRect b = BBox;
02221     pMat->TransformBounds(&b);
02222     if(!pDC->WriteBBox(&b))
02223         return FALSE;
02224 
02225     // end the section
02226     if(!pDC->EndSection())
02227         return FALSE;
02228 
02229     return TRUE;
02230 }


Member Data Documentation

DocRect CMXReferLens::BBox [protected]
 

Definition at line 690 of file cmxexdc.h.

INT32 CMXReferLens::CommandFilePosition [protected]
 

Definition at line 686 of file cmxexdc.h.

INT32 CMXReferLens::LayerNumber [protected]
 

Definition at line 691 of file cmxexdc.h.

INT32 CMXReferLens::LensDescFilePosition [protected]
 

Definition at line 692 of file cmxexdc.h.


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