|
Foxit PDF SDK
|
Inherits CFX_Object.
Classes | |
| struct | CAssoc |
| Association in CFX_MapByteStringToPtr. More... | |
Public Member Functions | |
| CFX_MapByteStringToPtr (int nBlockSize=10, IFX_Allocator *pAllocator=0) | |
| Construct with specified block size. More... | |
| ~CFX_MapByteStringToPtr () | |
| The destructor. | |
| int | GetCount () const |
| Get the number of elements. More... | |
| FX_DWORD | GetHashTableSize () const |
| Get the internal hash table size. Advanced features for derived classes. More... | |
| void | GetNextAssoc (FX_POSITION &rNextPosition, CFX_ByteString &rKey, void *&rValue) const |
| Get the current association and set the position to next association. More... | |
| FX_LPVOID | GetNextValue (FX_POSITION &rNextPosition) const |
| Get the the current value and set the position to next association. More... | |
| FX_POSITION | GetStartPosition () const |
| Get the first key-value pair position. iterating all (key, value) pairs. More... | |
| FX_DWORD | HashKey (FX_BSTR key) const |
| Routine used to user-provided hash keys. More... | |
| void | InitHashTable (FX_DWORD hashSize, FX_BOOL bAllocNow=true) |
| Initialize the hash table. More... | |
| FX_BOOL | IsEmpty () const |
| Verify whether the map is empty. More... | |
| FX_BOOL | Lookup (FX_BSTR key, void *&rValue) const |
| Lookup by a key. More... | |
| void *& | operator[] (FX_BSTR key) |
| Subscript([]) operator overload. Lookup and add if not there. More... | |
| void | RemoveAll () |
| Remove all the (key, value) pairs in the map. More... | |
| FX_BOOL | RemoveKey (FX_BSTR key) |
| Remove existing key. More... | |
| void | SetAt (FX_BSTR key, void *newValue) |
| Add a new (key, value) pair. Add if not exist, otherwise modify. More... | |
The class represents BYTE STRING MAP.
| CFX_MapByteStringToPtr::CFX_MapByteStringToPtr | ( | int | nBlockSize = 10, |
| IFX_Allocator * | pAllocator = 0 |
||
| ) |
Construct with specified block size.
| [in] | nBlockSize | The internal block. Default value: 10. |
| [in] | pAllocator | Allocator used in this class. NULL means to use default allocator. Default value: NULL. |
|
inline |
Get the number of elements.
|
inline |
Get the internal hash table size. Advanced features for derived classes.
| void CFX_MapByteStringToPtr::GetNextAssoc | ( | FX_POSITION & | rNextPosition, |
| CFX_ByteString & | rKey, | ||
| void *& | rValue | ||
| ) | const |
Get the current association and set the position to next association.
| [in,out] | rNextPosition | Input a position, and receive the next association position as result. |
| [out] | rKey | Receive a key. |
| [out] | rValue | Receive a value. |
| FX_LPVOID CFX_MapByteStringToPtr::GetNextValue | ( | FX_POSITION & | rNextPosition | ) | const |
Get the the current value and set the position to next association.
| [in,out] | rNextPosition | Input a position, and receive the next association position as result. |
|
inline |
Get the first key-value pair position. iterating all (key, value) pairs.
Routine used to user-provided hash keys.
Overwrite-able: special non-virtual (see map implementation for details).
| [in] | key | The key used to produce hash key. |
Initialize the hash table.
| [in] | hashSize | Initialize the hash table size. |
| [in] | bAllocNow | A boolean value to decide whether to allocate the hash table now. true means to allocate hash table now, while false means not. |
|
inline |
Verify whether the map is empty.
Lookup by a key.
| [in] | key | The key to lookup. |
| [out] | rValue | A reference of a typeless pointer to receive the found value. |
| void*& CFX_MapByteStringToPtr::operator[] | ( | FX_BSTR | key | ) |
Subscript([]) operator overload. Lookup and add if not there.
| [in] | key | The key to lookup. |
| void CFX_MapByteStringToPtr::RemoveAll | ( | ) |
Remove all the (key, value) pairs in the map.
Remove existing key.
| [in] | key | The key to be removed. |
|
inline |
Add a new (key, value) pair. Add if not exist, otherwise modify.
| [in] | key | The key to specify a position. |
| [in] | newValue | The new value. |