CMXReferLayer Class Reference

#include <cmxexdc.h>

Inheritance diagram for CMXReferLayer:

CMXReferListItemOffset CMXReferListItem ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 CMXReferLayer (CMXExportDC *pDC)
void SetLayerDetails (WORD Number, String_256 *tName)
 sets the layer details
BOOL IsInReferenceList (void)
BOOL WriteInReferenceList (CMXExportDC *pDC)
 writes the relevant entry in the reference list of the file
BOOL IsInWhichIndex (void)
BOOL WriteInIndex (CMXExportDC *pDC)
 writes the layer details in the layer list
INT32 IndexEntrySize (CMXExportDC *pDC)
 gets the length of the entry we'll write in the index

Protected Attributes

WORD LayerNumber
String_256 Name

Private Member Functions

 CC_DECLARE_DYNAMIC (CMXReferLayer)

Detailed Description

Definition at line 481 of file cmxexdc.h.


Constructor & Destructor Documentation

CMXReferLayer::CMXReferLayer CMXExportDC pDC  )  [inline]
 

Definition at line 486 of file cmxexdc.h.

00486 : CMXReferListItemOffset(pDC) {};


Member Function Documentation

CMXReferLayer::CC_DECLARE_DYNAMIC CMXReferLayer   )  [private]
 

INT32 CMXReferLayer::IndexEntrySize CMXExportDC pDC  )  [virtual]
 

gets the length of the entry we'll write in the index

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/06/96
Parameters:
none [INPUTS]
Returns:
length of entry we'll write
See also:

Reimplemented from CMXReferListItem.

Definition at line 452 of file cmxexdc.cpp.

00453 {
00454     ERROR2IF(pDC == NULL, 0, "no dc");
00455     
00456     INT32 StrLen = Name.Length();
00457 
00458     return StrLen + sizeof(WORD) + sizeof(DWORD) * 2 + ((pDC->IsThirtyTwoBit())?sizeof(WORD):0);
00459 }

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

Reimplemented from CMXReferListItem.

Definition at line 490 of file cmxexdc.h.

00490 {return TRUE;};

BOOL CMXReferLayer::IsInWhichIndex void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 493 of file cmxexdc.h.

00493 {return cmxINDEX_LAYER;};

void CMXReferLayer::SetLayerDetails WORD  Number,
String_256 tName
 

sets the layer details

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/06/96
Parameters:
layer number, name [INPUTS]
Returns:
none
See also:

Definition at line 401 of file cmxexdc.cpp.

00402 {
00403     LayerNumber = Number;
00404     Name = *tName;
00405 }

BOOL CMXReferLayer::WriteInIndex CMXExportDC pDC  )  [virtual]
 

writes the layer details in the layer list

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

Reimplemented from CMXReferListItem.

Definition at line 475 of file cmxexdc.cpp.

00476 {
00477     // write size in file
00478     pDC->WriteSizeInFile(Name.Length() + sizeof(DWORD) * 2);
00479 
00480     DWORD tOffset = Offset;
00481     pDC->WriteData(&tOffset, sizeof(tOffset));
00482 
00483     pDC->WriteString(&Name);
00484 
00485     SDWORD RefList = -1;
00486     pDC->WriteData(&RefList, sizeof(RefList));
00487 
00488     return TRUE;
00489 }

BOOL CMXReferLayer::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:
26/06/96
Parameters:
export dc [INPUTS]
Returns:
sucess
See also:

Reimplemented from CMXReferListItem.

Definition at line 421 of file cmxexdc.cpp.

00422 {
00423     ERROR2IF(pDC == 0, FALSE, "no DC");
00424 
00425     // write the entry
00426     cmxRefListEntryRef en;
00427     memset(&en, '\0', sizeof(en));
00428 
00429     en.Association = cmxREFLISTEN_DESC_COMPONENT;
00430     en.Type = cmxREFLISTEN_TYPE_LAYER;
00431     en.ReferenceNumber = LayerNumber;
00432 
00433     pDC->WriteData(&en, sizeof(en));
00434 
00435     return TRUE;
00436 }


Member Data Documentation

WORD CMXReferLayer::LayerNumber [protected]
 

Definition at line 498 of file cmxexdc.h.

String_256 CMXReferLayer::Name [protected]
 

Definition at line 499 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