#include <rechinfo.h>
Inheritance diagram for DocInfoRecordHandler:
Public Member Functions | |
DocInfoRecordHandler () | |
~DocInfoRecordHandler () | |
virtual BOOL | BeginImport () |
Initialises the units record handler. | |
virtual UINT32 * | GetTagList () |
Provides the record handler system with a list of records handled by this handler. | |
virtual BOOL | HandleRecord (CXaraFileRecord *pCXaraFileRecord) |
Handles the given record. | |
Protected Attributes | |
DocInfoComponent * | pInfoComponent |
Private Member Functions | |
CC_DECLARE_DYNAMIC (DocInfoRecordHandler) |
Definition at line 124 of file rechinfo.h.
|
Definition at line 130 of file rechinfo.h. 00130 : CamelotRecordHandler() {}
|
|
Definition at line 131 of file rechinfo.h.
|
|
Initialises the units record handler.
Reimplemented from CXaraFileRecordHandler. Definition at line 136 of file rechinfo.cpp. 00137 { 00138 pInfoComponent = GetDocInfoComponent(); 00139 00140 return (pInfoComponent != NULL); 00141 }
|
|
|
|
Provides the record handler system with a list of records handled by this handler.
Implements CXaraFileRecordHandler. Definition at line 157 of file rechinfo.cpp. 00158 { 00159 static UINT32 TagList[] = {TAG_DOCUMENTCOMMENT, TAG_DOCUMENTDATES, 00160 TAG_DOCUMENTUNDOSIZE, 00161 TAG_DOCUMENTFLAGS, 00162 CXFRH_TAG_LIST_END}; 00163 00164 return (UINT32*)&TagList; 00165 }
|
|
Handles the given record.
Implements CXaraFileRecordHandler. Definition at line 181 of file rechinfo.cpp. 00182 { 00183 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"DocInfoRecordHandler::HandleRecord pCXaraFileRecord is NULL"); 00184 00185 BOOL ok = TRUE; 00186 Document * pDoc = GetDocument(); 00187 INT32 Tag = pCXaraFileRecord->GetTag(); 00188 if (pInfoComponent == NULL) 00189 { 00190 ERROR3("DocInfoRecordHandler::HandleRecord no pInfoComponent"); 00191 return FALSE; 00192 } 00193 00194 // If we are just importing data from this document into an existing one, 00195 // then don't import any of this data. 00196 if (IsImporting()) 00197 return TRUE; 00198 00199 switch (Tag) 00200 { 00201 case TAG_DOCUMENTCOMMENT: 00202 // Ask the document information component class to import that data for us 00203 pInfoComponent->ImportDocumentComment(pCXaraFileRecord, pDoc); 00204 break; 00205 00206 case TAG_DOCUMENTDATES: 00207 // Ask the document information component class to import that data for us 00208 pInfoComponent->ImportDocumentDates(pCXaraFileRecord, pDoc); 00209 break; 00210 00211 case TAG_DOCUMENTUNDOSIZE: 00212 // Ask the document information component class to import that data for us 00213 pInfoComponent->ImportUndoBufferSize(pCXaraFileRecord, pDoc); 00214 break; 00215 00216 case TAG_DOCUMENTFLAGS: 00217 // Ask the document information component class to import that data for us 00218 pInfoComponent->ImportDocumentFlags(pCXaraFileRecord, pDoc); 00219 break; 00220 00221 default: 00222 ok = FALSE; 00223 ERROR3_PF(("DocInfoRecordHandler::HandleRecord I don't handle records with the tag (%d)\n",Tag)); 00224 break; 00225 } 00226 00227 return ok; 00228 }
|
|
Definition at line 146 of file rechinfo.h. |