#include <bitmapcachekey.h>
Public Member Functions | |
CBitmapCacheKey () | |
CBitmapCacheKey (LPVOID pNewOwner, double dNewPixelWidth, UINT32 nNewOption=0) | |
CBitmapCacheKey (const CBitmapCacheKey &key) | |
virtual | ~CBitmapCacheKey () |
BOOL | IsValid () const |
UINT32 | Hash () const |
void | SetOwner (LPVOID pNewOwner) |
double | GetPixelWidth () const |
bool | operator== (const CBitmapCacheKey &key) const |
Private Attributes | |
LPVOID | pOwner |
double | dPixelWidth |
UINT32 | nOption |
Friends | |
class | CBitmapCache |
Definition at line 105 of file bitmapcachekey.h.
|
Definition at line 110 of file bitmapcachekey.cpp. 00111 { 00112 memset(&pOwner, 0, sizeof(CBitmapCacheKey)-((LPBYTE)&pOwner-(LPBYTE)this)); 00113 pOwner = NULL; 00114 dPixelWidth = 0; 00115 nOption = 0; 00116 }
|
|
Definition at line 118 of file bitmapcachekey.cpp. 00119 { 00120 memset(&pOwner, 0, sizeof(CBitmapCacheKey)-((LPBYTE)&pOwner-(LPBYTE)this)); 00121 pOwner = pNewOwner; 00122 dPixelWidth = dNewPixelWidth; 00123 nOption = nNewOption; 00124 }
|
|
Definition at line 128 of file bitmapcachekey.cpp. 00129 { 00130 memset(&pOwner, 0, sizeof(CBitmapCacheKey)-((LPBYTE)&pOwner-(LPBYTE)this)); 00131 pOwner = key.pOwner; 00132 dPixelWidth = key.dPixelWidth; 00133 nOption = key.nOption; 00134 }
|
|
Definition at line 136 of file bitmapcachekey.cpp.
|
|
Definition at line 120 of file bitmapcachekey.h. 00120 {return dPixelWidth;}
|
|
Definition at line 205 of file bitmapcachekey.cpp. 00206 { 00207 UINT32 nHash = 0; 00208 //LPBYTE pThis = (LPBYTE)this; 00209 LPBYTE pThis = (LPBYTE)&pOwner; 00210 // Can't use sizeof class because that includes alignment bytes which contain random values 00211 //const INT32 bytesize = sizeof(CBitmapCacheKey); 00212 const size_t bytesize = sizeof(CBitmapCacheKey)-((LPBYTE)&pOwner-(LPBYTE)this); 00213 00214 for(unsigned i=0; i<bytesize; i++) 00215 { 00216 nHash = (nHash<<5)+nHash + *pThis++; 00217 } 00218 00219 return nHash; 00220 }
|
|
Definition at line 183 of file bitmapcachekey.cpp. 00184 { 00185 return (pOwner!=NULL && dPixelWidth!=0); 00186 }
|
|
Definition at line 158 of file bitmapcachekey.cpp. 00159 { 00160 return (pOwner == key.pOwner && 00161 dPixelWidth == key.dPixelWidth && 00162 nOption == key.nOption 00163 ); 00164 }
|
|
Definition at line 119 of file bitmapcachekey.h. 00119 {pOwner = pNewOwner;}
|
|
Definition at line 107 of file bitmapcachekey.h. |
|
Definition at line 127 of file bitmapcachekey.h. |
|
Definition at line 128 of file bitmapcachekey.h. |
|
Definition at line 126 of file bitmapcachekey.h. |