#include <impbmp.h>
Inheritance diagram for ImportedBitmaps:
Public Member Functions | |
ImportedBitmaps () | |
Construct the class which encapsulates a list of exported Bitmaps. | |
~ImportedBitmaps () | |
Destroy the class which encapsulates a list of exported Bitmaps. | |
BOOL | AddBitmap (KernelBitmap *pNewBmp, INT32 RecordNumber) |
Add the specified Bitmap to the list of already exported Bitmaps. | |
KernelBitmap * | GetBitmap (INT32 ReqRecordNumber) |
Searches for a previously imported bitmap definition. Used by the native/web filter to convert a bitmap reference in a record to an KernelBitmap. This must have already been imported in the file as the rule is that reference to bitmaps can only be made if the bitmap definition has already been output. | |
Protected Attributes | |
ImportBitmapList | Bitmaps |
Definition at line 175 of file impbmp.h.
|
Construct the class which encapsulates a list of exported Bitmaps.
Definition at line 212 of file impbmp.cpp.
|
|
Destroy the class which encapsulates a list of exported Bitmaps.
Definition at line 230 of file impbmp.cpp. 00231 { 00232 // Delete all the bitmaps in the list, as copies will have been made to 00233 // put in the tree 00234 00235 ImportBitmap* pBitmap = (ImportBitmap *)Bitmaps.GetHead(); 00236 while (pBitmap != NULL) 00237 { 00238 if (pBitmap->pBmp && 00239 pBitmap->pBmp->GetParentBitmapList() == NULL) 00240 { 00241 // Only delete the bitmap if it has a NULL parent bitmap list, 00242 // because otherwise it means they are being used 00243 delete pBitmap->pBmp; 00244 } 00245 00246 // Try the next Bitmap in the list 00247 pBitmap = (ImportBitmap *)Bitmaps.GetNext(pBitmap); 00248 } 00249 00250 }
|
|
Add the specified Bitmap to the list of already exported Bitmaps.
Definition at line 269 of file impbmp.cpp. 00270 { 00271 // Add the Bitmap onto our list 00272 ImportBitmap * pNewBmp = Bitmaps.AddBitmap(pBmp, RecordNumber); 00273 if (pNewBmp) 00274 return TRUE; 00275 00276 return FALSE; 00277 }
|
|
Searches for a previously imported bitmap definition. Used by the native/web filter to convert a bitmap reference in a record to an KernelBitmap. This must have already been imported in the file as the rule is that reference to bitmaps can only be made if the bitmap definition has already been output.
Definition at line 297 of file impbmp.cpp. 00298 { 00299 // Work our way through the list of imported bitmaps until we find the required record number 00300 ImportBitmap* pBitmap = (ImportBitmap *)Bitmaps.GetHead(); 00301 while (pBitmap != NULL) 00302 { 00303 if (pBitmap->RecordNumber == ReqRecordNumber) 00304 return pBitmap->pBmp; 00305 00306 // Try the next Bitmap in the list 00307 pBitmap = (ImportBitmap *)Bitmaps.GetNext(pBitmap); 00308 } 00309 00310 // Something went a bit wrong and we didn't find the requested record number 00311 // return NULL to the caller 00312 return NULL; 00313 }
|
|
|