#include <cxfmap.h>
Inheritance diagram for CXaraFileMapTagToHandler:
Public Member Functions | |
CXaraFileMapTagToHandler () | |
The default constructor. | |
virtual | ~CXaraFileMapTagToHandler () |
The destructor. | |
void | Add (UINT32 Tag, CXaraFileRecordHandler *pHandler) |
Adds a map entry, associating the tag with the handler. | |
CXaraFileRecordHandler * | LookUp (UINT32 Tag) |
Returns the handler associated with the given tag. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CXaraFileMapTagToHandler) | |
Private Attributes | |
CMapLongToPtr * | pMap |
Definition at line 117 of file cxfmap.h.
|
The default constructor.
Definition at line 122 of file cxfmap.cpp.
|
|
The destructor.
Definition at line 138 of file cxfmap.cpp.
|
|
Adds a map entry, associating the tag with the handler.
Definition at line 159 of file cxfmap.cpp. 00160 { 00161 if (pHandler == NULL) 00162 return; 00163 00164 if (pMap == NULL) 00165 pMap = new CMapLongToPtr; 00166 00167 if (pMap != NULL) 00168 (*pMap)[INT32(Tag)] = (void *)pHandler; 00169 }
|
|
|
|
Returns the handler associated with the given tag.
Definition at line 184 of file cxfmap.cpp. 00185 { 00186 CXaraFileRecordHandler* pHandler = NULL; 00187 00188 if (pMap != NULL) 00189 { 00190 CMapLongToPtr::iterator iter = pMap->find( INT32(Tag) ); 00191 if( iter == pMap->end() ) 00192 return NULL; 00193 00194 pHandler = (CXaraFileRecordHandler *)iter->second; 00195 } 00196 00197 return pHandler; 00198 }
|
|
|