#include <cmxexdc.h>
Inheritance diagram for CMXFutureUpdater:
Public Member Functions | |
CMXFutureUpdater () | |
constructor | |
~CMXFutureUpdater () | |
destructor | |
BOOL | Init (CMXExportDC *pDC, INT32 RelativePos, UINT32 DataSize) |
initialises a updater object | |
virtual BOOL | Write (CMXExportDC *pDC)=0 |
Protected Member Functions | |
BOOL | WriteValue (CMXExportDC *pDC, INT32 Value) |
writes a value to the file | |
virtual void | Reset (void) |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CMXFutureUpdater) | |
Private Attributes | |
INT32 | AbsPosition |
UINT32 | DataSize |
Definition at line 138 of file cmxexdc.h.
|
constructor
Definition at line 156 of file cmxexdc.cpp. 00157 { 00158 AbsPosition = -1; 00159 DataSize = 0; 00160 }
|
|
destructor
Definition at line 176 of file cmxexdc.cpp. 00177 { 00178 if(AbsPosition >= 0) 00179 TRACEUSER( "Ben", _T("AWWOOOOGA! CMXFutureUpdated deleted, but not written\n\n")); 00180 }
|
|
|
|
initialises a updater object
Definition at line 196 of file cmxexdc.cpp. 00197 { 00198 ERROR2IF(AbsPosition >= 0, FALSE, "Updater already initialised"); 00199 ERROR2IF(pDC == 0, FALSE, "No pDC, chaps"); 00200 ERROR2IF(DataSize < 0 || DataSize > 4, FALSE, "Bit of a data size problem really"); 00201 00202 INT32 CurrentPos = pDC->GetFilePosition(); 00203 ERROR2IF(CurrentPos < 0, FALSE, "Whoops -- negative file position here"); 00204 AbsPosition = CurrentPos + RelativePos; 00205 ERROR2IF(AbsPosition < 0, FALSE, "Serious Bummer -- expected to update a position before the start of the file"); 00206 DataSize = tDataSize; 00207 00208 return TRUE; 00209 }
|
|
Reimplemented in CMXFutureLength. Definition at line 149 of file cmxexdc.h.
|
|
Implemented in CMXFutureLength, CMXFutureNumber, and CMXFutureIndex. |
|
writes a value to the file
Definition at line 224 of file cmxexdc.cpp. 00225 { 00226 ERROR2IF(pDC == 0, FALSE, "No pDC, chaps"); 00227 00228 // write the number 00229 if(!pDC->WriteNumber(AbsPosition, DataSize, Value)) 00230 return FALSE; 00231 00232 // reset everything for the next run, should we want one. 00233 AbsPosition = -1; 00234 DataSize = 0; 00235 Reset(); // get the derivedness to reset itself too. 00236 00237 return TRUE; 00238 }
|
|
|
|
|