#include <rechcomp.h>
Inheritance diagram for CompressionRecordHandler:
Public Member Functions | |
CompressionRecordHandler () | |
~CompressionRecordHandler () | |
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. | |
virtual BOOL | HandleStreamedRecord (CXaraFile *pCXFile, UINT32 Tag, UINT32 Size, UINT32 RecordNumber) |
This is the streamed record handler. It is used when. | |
virtual BOOL | IsStreamed (UINT32 Tag) |
Function to find out if the record is streamed or not. | |
virtual void | IncProgressBarCount (UINT32 n) |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CompressionRecordHandler) |
Definition at line 122 of file rechcomp.h.
|
Definition at line 128 of file rechcomp.h. 00128 : CamelotRecordHandler() {}
|
|
Definition at line 129 of file rechcomp.h.
|
|
|
|
Provides the record handler system with a list of records handled by this handler.
Implements CXaraFileRecordHandler. Definition at line 137 of file rechcomp.cpp. 00138 { 00139 static UINT32 TagList[] = {TAG_STARTCOMPRESSION, TAG_ENDCOMPRESSION, CXFRH_TAG_LIST_END}; 00140 00141 return (UINT32*)&TagList; 00142 }
|
|
Handles the given record.
Implements CXaraFileRecordHandler. Definition at line 158 of file rechcomp.cpp. 00159 { 00160 ERROR2IF(pCXaraFileRecord == NULL,FALSE,"CompressionRecordHandler::HandleRecord pCXaraFileRecord is NULL"); 00161 00162 // This should be unused and we should error if this is called 00163 ERROR2(FALSE,"CompressionRecordHandler::HandleRecord called! Use Streamed form instead"); 00164 00165 BOOL ok = TRUE; 00166 00167 switch (pCXaraFileRecord->GetTag()) 00168 { 00169 case TAG_STARTCOMPRESSION: 00170 // Ask the compression system to be turned on 00171 TRACEUSER( "Neville", _T("Turn compression on\n")); 00172 ok = SetCompression(TRUE); 00173 break; 00174 case TAG_ENDCOMPRESSION: 00175 // Ask the compression system to be turned off 00176 TRACEUSER( "Neville", _T("Turn compression on\n")); 00177 ok = SetCompression(FALSE); 00178 break; 00179 00180 default: 00181 ok = FALSE; 00182 ERROR3_PF(("CompressionRecordHandler::HandleRecord I don't handle records with the tag (%d)\n",pCXaraFileRecord->GetTag())); 00183 break; 00184 } 00185 00186 return ok; 00187 }
|
|
This is the streamed record handler. It is used when.
Reimplemented from CXaraFileRecordHandler. Definition at line 207 of file rechcomp.cpp. 00208 { 00209 ERROR2IF(Tag <= 0,FALSE,"CompressionRecordHandler::HandleStreamedRecord Tag is negative!"); 00210 00211 BOOL ok = TRUE; 00212 00213 switch (Tag) 00214 { 00215 case TAG_STARTCOMPRESSION: 00216 // Ask the compression system to be turned on 00217 TRACEUSER( "Neville", _T("Turn compression on\n")); 00218 ok = SetCompression(TRUE); 00219 break; 00220 case TAG_ENDCOMPRESSION: 00221 // Ask the compression system to be turned off 00222 TRACEUSER( "Neville", _T("Turn compression off\n")); 00223 ok = SetCompression(FALSE); 00224 break; 00225 00226 default: 00227 ok = FALSE; 00228 ERROR3_PF(("CompressionRecordHandler::HandleStreamedRecord I don't handle records with the tag (%d)\n",Tag)); 00229 break; 00230 } 00231 00232 return ok; 00233 }
|
|
Reimplemented from CamelotRecordHandler. Definition at line 139 of file rechcomp.h.
|
|
Function to find out if the record is streamed or not.
Reimplemented from CamelotRecordHandler. Definition at line 251 of file rechcomp.cpp. 00252 { 00253 // We don't want these records read in or handled by any outsiders as the ZLib code 00254 // reads things like the CRC and uncompressed size itself when compression is stopped 00255 return TRUE; 00256 }
|