CMXFutureLength Class Reference

#include <cmxexdc.h>

Inheritance diagram for CMXFutureLength:

CMXFutureUpdater CCObject SimpleCCObject List of all members.

Public Member Functions

 CMXFutureLength ()
 constructor
BOOL SetLengthStartPos (CMXExportDC *pDC, INT32 RelativePos)
 sets the start position of the length which is to be written
BOOL Write (CMXExportDC *pDC)
 writes the length to the file. The length is the (+ve) value from the start position set earlier to the current position in the file.

Protected Member Functions

void Reset (void)
 resets the future updater object after a write

Private Member Functions

 CC_DECLARE_DYNAMIC (CMXFutureLength)

Private Attributes

INT32 StartPos

Detailed Description

Definition at line 156 of file cmxexdc.h.


Constructor & Destructor Documentation

CMXFutureLength::CMXFutureLength  ) 
 

constructor

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

Definition at line 254 of file cmxexdc.cpp.

00255 {
00256     StartPos = -1;
00257 }


Member Function Documentation

CMXFutureLength::CC_DECLARE_DYNAMIC CMXFutureLength   )  [private]
 

void CMXFutureLength::Reset void   )  [protected, virtual]
 

resets the future updater object after a write

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/06/96
Parameters:
export dc, relative position from current position (+ve is forwards) [INPUTS]
Returns:
none
See also:

Reimplemented from CMXFutureUpdater.

Definition at line 295 of file cmxexdc.cpp.

00296 {
00297     StartPos = -1;
00298 }

BOOL CMXFutureLength::SetLengthStartPos CMXExportDC pDC,
INT32  RelativePos
 

sets the start position of the length which is to be written

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/06/96
Parameters:
export dc, relative position from current position (+ve is forwards) [INPUTS]
Returns:
none
See also:

Definition at line 272 of file cmxexdc.cpp.

00273 {
00274     ERROR2IF(StartPos >= 0, FALSE, "Start position already set");
00275     ERROR2IF(pDC == 0, FALSE, "No dc");
00276     StartPos = pDC->GetFilePosition() + RelativePos;
00277 
00278     return TRUE;
00279 }

BOOL CMXFutureLength::Write CMXExportDC pDC  )  [virtual]
 

writes the length to the file. The length is the (+ve) value from the start position set earlier to the current position in the file.

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

Implements CMXFutureUpdater.

Definition at line 315 of file cmxexdc.cpp.

00316 {
00317     ERROR2IF(pDC == 0, FALSE, "No dc");
00318     ERROR2IF(StartPos < 0, FALSE, "StartPos is negative... has this length been initialised properly?");
00319 
00320     INT32 len = pDC->GetFilePosition() - StartPos;
00321 
00322     ERROR2IF(len < 0, FALSE, "We're talking negative lengths here? I don't think so");
00323     
00324     return WriteValue(pDC, len);
00325 }


Member Data Documentation

INT32 CMXFutureLength::StartPos [private]
 

Definition at line 167 of file cmxexdc.h.


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