#include <cmxexdc.h>
Inheritance diagram for CMXFutureLength:
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 |
Definition at line 156 of file cmxexdc.h.
|
constructor
Definition at line 254 of file cmxexdc.cpp. 00255 { 00256 StartPos = -1; 00257 }
|
|
|
|
resets the future updater object after a write
Reimplemented from CMXFutureUpdater. Definition at line 295 of file cmxexdc.cpp. 00296 { 00297 StartPos = -1; 00298 }
|
|
sets the start position of the length which is to be written
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 }
|
|
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.
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 }
|
|
|