SophiaFramework UNIVERSE 5.3 |
SFXLinkedHashMap is a hashmap class which preserve the insertion order.
This class replaces the current SFXOldHashmap class whose name was "SFXHashmap" in SophiaFramework UNIVERSE 5.1.8 or below. The performance of rehashing, merging, and comparing is dramatically improved for large number of the elements.
Each key element of the SFXLinkedHashMap instance(hashmap) needs to be data not more than 4 byte, the SFXAnsiString instance, or the SFXWideString instance. In order to process data more than 4 byte(such as UInt64 type, Float64 type, and so on) or class instance as a value element of the SFXLinkedHashMap instance(hashmap), a pointer should be used.
When element occupancy rate for a hash table exceeds DEFAULT_THRESHOLD (45) %, the size of the hash table will be automatically expanded.
// data more than 4 byte or class instance cannot be a value element of the SFXLinkedHashMap instance ( hashmap ) // SFXLinkedHashMap<SFXAnsiString, SInt64> map64; NG // SFXLinkedHashMap<SFXAnsiString, SFXAnsiString> mapstr; NG // but a pointer to the data more than 4 byte or class instance can be a value element of the SFXLinkedHashMap instance ( hashmap ) SFXLinkedHashMap<SFXAnsiString, SInt64Ptr> map64; // OK SFXLinkedHashMap<<SFXAnsiString, SFXAnsiStringPtr> mapstr; // OK
SFXHashmap | SFXFlatHashMap | SFXAnsiString | SFXWideString | Hashmap
Constructor/Destructor |
---|
SFXLinkedHashMap( Void ) Constructor of the SFXLinkedHashMap class.
|
SFXLinkedHashMap(
UInt16 threshold
, UInt16 ratio
) Constructor of the SFXLinkedHashMap class.
|
Public Functions | |
---|---|
Void |
Clear( Void ) Clear this hashmap.
|
Bool |
ContainsKey(
KeyType key
) Check whether or not this hashmap contains the specified key as the key of the pair element.
|
Bool |
ContainsValue(
ValueType value
) Check whether or not this hashmap contains the specified value as the value of the pair element.
|
static SFXLinkedHashMap< K, V > const & |
EmptyInstance( Void ) Get the empty hashmap.
|
Bool |
Equals(
SFXLinkedHashMap< K, V > const & collection
) Check whether or not this hashmap equals the specified hashmap.
|
ValueType |
Get(
KeyType key
, BoolPtr found = null
) Get the value of the key-value pair with the specified key from this hashmap.
|
KeyEnumerator |
GetFirstKeyEnumerator( Void ) Get the key enumerator that points to the key of the first pair element.
|
KeyIterator |
GetFirstKeyIterator( Void ) Get the key iterator that points to the key of the first pair element.
|
ValueEnumerator |
GetFirstValueEnumerator( Void ) Get the value enumerator that points to the value of the first pair element.
|
ValueIterator |
GetFirstValueIterator( Void ) Get the value iterator that points to the value of the first pair element.
|
KeyEnumerator |
GetKeyEnumerator(
SInt32 index
) Get the key enumerator that points to the key of the pair element at the specified index.
|
KeyEnumerator |
GetKeyEnumerator( Void ) Get the key enumerator that points to the key of the pair element at the specified index.
|
KeyIterator |
GetKeyIterator(
SInt32 index
) Get the key iterator that points to the key of the pair element at the specified index.
|
KeyIterator |
GetKeyIterator( Void ) Get the key iterator that points to the key of the pair element at the specified index.
|
KeyEnumerator |
GetLastKeyEnumerator( Void ) Get the key enumerator that points to the key of the last pair element.
|
KeyIterator |
GetLastKeyIterator( Void ) Get the key iterator that points to the key of the last pair element.
|
ValueEnumerator |
GetLastValueEnumerator( Void ) Get the value enumerator that points to the value of the last pair element.
|
ValueIterator |
GetLastValueIterator( Void ) Get the value iterator that points to the value of the last pair element.
|
UInt16 |
GetRatio( Void ) [DEPRECATED] Get the expansion ratio of hash table size.
|
SInt32 |
GetSize( Void ) Get the size of this hashmap.
|
UInt16 |
GetThreshold( Void ) [DEPRECATED] Get the threshold to expand the hash table size.
|
ValueEnumerator |
GetValueEnumerator(
SInt32 index
) Get the value enumerator that points to the value of the pair element at the specified index.
|
ValueEnumerator |
GetValueEnumerator( Void ) Get the value enumerator that points to the value of the pair element at the specified index.
|
ValueIterator |
GetValueIterator(
SInt32 index
) Get the value iterator that points to the value of the pair element at the specified index.
|
ValueIterator |
GetValueIterator( Void ) Get the value iterator that points to the value of the pair element at the specified index.
|
Bool |
IsEmpty( Void ) Check whether or not this hashmap is empty.
|
SFCError |
Merge(
SFXLinkedHashMap< K, V > const & collection
) Merge this hashmap with the specified hashmap.
|
Void |
Remove(
KeyType key
) Remove the key-value pair with the specified key from this hashmap.
|
SFCError |
Set(
SFXLinkedHashMap< K, V > const & collection
)
Set the specified key-value pair or hashmap into this hashmap.
|
SFCError |
Set(
KeyType key
, ValueType value
)
Set the specified key-value pair or hashmap into this hashmap.
|
Void |
SetRatio(
UInt16 ratio
) [DEPRECATED] Set the expansion ratio of hash table size.
|
Void |
SetThreshold(
UInt16 threshold
) [DEPRECATED] Set the threshold to expand the hash table size.
|
SFCError |
Swap(
KeyType destination
, KeyType source
) Swap the value of two pair elements with the specified keys.
|
ValueType |
operator[](
KeyType key
) Get the value of the key-value pair with the specified key index from this hashmap.
|
Types |
---|
DefaultEnum [DEPRECATED] Default threshold to expand the hash table.
|
KeyEnumerator Class for managing the key enumerator for the keys of the pair elements of this hashmap.
|
KeyIterator Class for managing the key iterator for the keys of the pair elements of this hashmap.
|
ValueEnumerator Class for managing the value enumerator for the values of the pair elements of this hashmap.
|
ValueIterator Class for managing the value iterator for the values of the pair elements of this hashmap.
|
[ public, explicit ] SFXLinkedHashMap(Void);
[ public, explicit ] SFXLinkedHashMap( UInt16 threshold // unused UInt16 ratio // unused );
Default implementation does nothing.
The arguments of this constructor are only for preserving the compatibility with the SFXOldHashmap class and will not be used inside this SFXLinkedHashMap class.
[ public ] Void Clear(Void);
This function clears this hashmap. All the internal buffer allocated to this hashmap will be released.
After this function is executed, the size of this hashmap will become 0.
If the key is a string(SFXAnsiString / SFXWideString), the string itself will be released automatically.
Caution | |
---|---|
If the type of the key or the value of the pair element is a pointer to a class instance or data bigger than 4 bytes, memory area that the pointer points to will not be released automatically. Before clearing this hashmap, it is necessary to release that area explicitly using the delete statement. Otherwise, memory leakage will occur. |
Note | |
---|---|
This function will be called automatically when this hashmap goes out of scope. |
SFXLinkedHashMap<SFXAnsiString, SInt32> strmap;
...
strmap.Clear(); // clear the hashmap
[ public, const ] Bool ContainsKey( KeyType key // key to check );
This function checks whether or not this hashmap contains the specified key as the key of the pair element.
Note | |
---|---|
If the type of the element is a pointer to a class instance or data bigger than 4 bytes, their addresses will be compared with. |
SFXLinkedHashMap<SFXAnsiString, SInt32> strmap; // set a key-value pair element of (key: "mike", value: 2) into the hashmap if (strmap.Set("mike", 2) == SFERR_NO_ERROR) { // set a key-value pair element of (key: "john", value: 1) into the hashmap if (strmap.Set("john", 1) == SFERR_NO_ERROR) { // check whether or not the hashmap contains the keys below TRACE("ContainsKey(\"mike\") = %s", (strmap.ContainsKey("mike")) ? ("true") : ("false")); // containsKey("mike") = true TRACE("ContainsKey(\"tom\") = %s", (strmap.ContainsKey("tom")) ? ("true") : ("false")); // containsKey("tom") = false } }
[ public, const ] Bool ContainsValue( ValueType value // value to check );
This function checks whether or not this hashmap contains the specified value as the value of the pair element.
Note | |
---|---|
If the type of the element is a pointer to a class instance or data bigger than 4 bytes, their addresses will be compared with. |
SFXLinkedHashMap<SFXAnsiString, SInt32> strmap; // set a key-value pair element of (key: "mike", value: 2) into the hashmap if (strmap.Set("mike", 2) == SFERR_NO_ERROR) { // set a key-value pair element of (key: "john", value: 1) into the hashmap if (strmap.Set("john", 1) == SFERR_NO_ERROR) { // check whether or not the hashmap contains the values below TRACE("ContainsValue(2) = %s", (strmap.ContainsValue(2)) ? ("true") : ("false")); // containsValue(2) = true TRACE("ContainsValue(5) = %s", (strmap.ContainsValue(5)) ? ("true") : ("false")); // containsValue(5) = false } }
[ public, static ] SFXLinkedHashMap< K, V > const & EmptyInstance(Void);
Empty hashmap
This function gets the empty hashmap.
[ public, const ] Bool Equals( SFXLinkedHashMap< K, V > const & collection // hashmap to compare with );
This function checks whether or not this hashmap equals the specified hashmap.
Note | |
---|---|
If the type of the element is a pointer, its address will be compared with. |
[ public, const ] ValueType Get( KeyType key // key to get the value element BoolPtr found = null // whether the key exists (optional) );
If there is the key-value pair with the specified key in this hashmap, the corresponding value will be returned.
Otherwise, null or 0 will be returned.
This function gets the value of the key-value pair with the specified key from this hashmap.
When a key-value pair with the specified key exists, the second parameter "found" is set to true. Otherwise, false.
Caution | |
---|---|
In case no key-value pair with the specified key exists, no error will occur but this function will return 0 or null. |
SFXLinkedHashMap<SFXAnsiString, SInt32> strmap; // set a key-value pair element of (key: "mike", value: 2) into the hashmap if (strmap.Set("mike", 2) == SFERR_NO_ERROR) { // set a key-value pair element of (key: "john", value: 1) into the hashmap if (strmap.Set("john", 1) == SFERR_NO_ERROR) { // display the value of the key-value pair with the specified key in BREW Output Window TRACE("%d", strmap.Get("mike")); // 2 } }
[ public, const ] KeyEnumerator GetFirstKeyEnumerator(Void);
Key enumerator that points to the key of the first pair element
This function gets the key enumerator of this hashmap that points to the key of the first pair element.
SFXLinkedHashMap::GetFirstKeyIterator | SFXLinkedHashMap::GetFirstValueIterator | SFXLinkedHashMap::GetFirstValueEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public ] KeyIterator GetFirstKeyIterator(Void);
Key iterator that points to the key of the first pair element
This function gets the key iterator of this hashmap that points to the key of the first pair element.
SFXLinkedHashMap::GetFirstKeyEnumerator | SFXLinkedHashMap::GetFirstValueEnumerator | SFXLinkedHashMap::GetFirstValueIterator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public, const ] ValueEnumerator GetFirstValueEnumerator(Void);
Value enumerator that points to the value of the first pair element
This function gets the value enumerator of this hashmap that points to the value of the first pair element.
SFXLinkedHashMap::GetFirstValueIterator | SFXLinkedHashMap::GetFirstKeyIterator | SFXLinkedHashMap::GetFirstKeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public ] ValueIterator GetFirstValueIterator(Void);
Value iterator that points to the value of the first pair element
This function gets the value iterator of this hashmap that points to the value of the first pair element.
SFXLinkedHashMap::GetFirstValueEnumerator | SFXLinkedHashMap::GetFirstKeyIterator | SFXLinkedHashMap::GetFirstKeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public, const ] KeyEnumerator GetKeyEnumerator( SInt32 index // index to start );
[ public, const ] KeyEnumerator GetKeyEnumerator(Void);
Key enumerator that points to the key of the pair element at the specified index
This function gets the key enumerator of this hashmap that points to the key of the pair element at the specified index.
Note | |
---|---|
If the specified index is less than or equals 0, this function is same as the SFXLinkedHashMap::GetFirstKeyEnumerator function. If the specified index is more than or equals the size of this hashmap, this function is same as the SFXLinkedHashMap::GetLastKeyEnumerator function. |
If no argument is specified, this function is same as SFXLinkedHashMap::GetFirstKeyEnumerator.
SFXLinkedHashMap::GetFirstKeyEnumerator | SFXLinkedHashMap::GetLastKeyEnumerator | SFXLinkedHashMap::GetKeyIterator | SFXLinkedHashMap::GetValueIterator | SFXLinkedHashMap::GetValueEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public ] KeyIterator GetKeyIterator( SInt32 index // index to start );
[ public ] KeyIterator GetKeyIterator(Void);
Key iterator that points to the key of the pair element at the specified index
This function gets the key iterator of this hashmap that points to the key of the pair element at the specified index.
Note | |
---|---|
If the specified index is less than or equals 0, this function is same as the SFXLinkedHashMap::GetFirstKeyIterator function. If the specified index is more than or equals the size of this hashmap, this function is same as the SFXLinkedHashMap::GetLastKeyIterator function. |
If no argument is specified, this function is same as SFXLinkedHashMap::GetFirstKeyIterator.
SFXLinkedHashMap::GetFirstKeyIterator | SFXLinkedHashMap::GetLastKeyIterator | SFXLinkedHashMap::GetKeyEnumerator | SFXLinkedHashMap::GetValueEnumerator | SFXLinkedHashMap::GetValueIterator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public, const ] KeyEnumerator GetLastKeyEnumerator(Void);
Key enumerator that points to the key of the last pair element
This function gets the key enumerator of this hashmap that points to the key of the last pair element.
SFXLinkedHashMap::GetLastKeyIterator | SFXLinkedHashMap::GetLastValueIterator | SFXLinkedHashMap::GetLastValueEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public ] KeyIterator GetLastKeyIterator(Void);
Key iterator that points to the key of the last pair element
This function gets the key iterator of this hashmap that points to the key of the last pair element.
SFXLinkedHashMap::GetLastKeyEnumerator | SFXLinkedHashMap::GetLastValueEnumerator | SFXLinkedHashMap::GetLastValueIterator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public, const ] ValueEnumerator GetLastValueEnumerator(Void);
Value enumerator that points to the value of the last pair element
This function gets the value enumerator of this hashmap that points to the value of the last pair element.
SFXLinkedHashMap::GetLastValueIterator | SFXLinkedHashMap::GetLastKeyIterator | SFXLinkedHashMap::GetLastKeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public ] ValueIterator GetLastValueIterator(Void);
Value iterator that points to the value of the last pair element
This function gets the value iterator of this hashmap that points to the value of the last pair element.
SFXLinkedHashMap::GetLastValueEnumerator | SFXLinkedHashMap::GetLastKeyIterator | SFXLinkedHashMap::GetLastKeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public, const ] UInt16 GetRatio(Void);
Always return 0.
This function always returns 0.
This API exists only for the compatibility with the SFXOldHashmap class which had been called as SFXHashmap in SophiaFramework UNIVERSE 5.1.8 or below.
DEPRECATED | |
---|---|
It is recommended not to use this API since it will be deprecated in SophiaFramework UNIVERSE 6.0. |
[ public, const ] SInt32 GetSize(Void);
Size of this hashmap
This function gets the size of this hashmap(i.e., the number of the key-value pair elements of this hashmap).
[ public, const ] UInt16 GetThreshold(Void);
Always return 45. [unit: %]
This function always returns 45. [unit: %]
This API exists only for the compatibility with the SFXOldHashmap class which had been called as SFXHashmap in SophiaFramework UNIVERSE 5.1.8 or below.
DEPRECATED | |
---|---|
It is recommended not to use this API since it will be deprecated in SophiaFramework UNIVERSE 6.0. |
[ public, const ] ValueEnumerator GetValueEnumerator( SInt32 index // index to start );
[ public, const ] ValueEnumerator GetValueEnumerator(Void);
Value enumerator that points to the value of the pair element at the specified index
This function gets the value enumerator of this hashmap that points to the value of the pair element at the specified index.
Note | |
---|---|
If the specified index is less than or equals 0, this function is same as the SFXLinkedHashMap::GetFirstValueEnumerator function. If the specified index is more than or equals the size of this hashmap, this function is same as the SFXLinkedHashMap::GetLastValueEnumerator function. |
If no argument is specified, this function is same as SFXLinkedHashMap::GetFirstValueEnumerator.
SFXLinkedHashMap::GetFirstValueEnumerator | SFXLinkedHashMap::GetLastValueEnumerator | SFXLinkedHashMap::GetValueIterator | SFXLinkedHashMap::GetKeyIterator | SFXLinkedHashMap::GetKeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public ] ValueIterator GetValueIterator( SInt32 index // starting index of the value iterator );
[ public ] ValueIterator GetValueIterator(Void);
Value iterator that points to the value of the pair element at the specified index
This function gets the value iterator of this hashmap that points to the value of the pair element at the specified index.
Note | |
---|---|
If the specified index is less than or equals 0, this function is same as the SFXLinkedHashMap::GetFirstValueIterator function. If the specified index is more than or equals the size of this hashmap, this function is same as the SFXLinkedHashMap::GetLastValueIterator function. |
If no argument is specified, this function is same as SFXLinkedHashMap::GetFirstValueIterator.
SFXLinkedHashMap::GetFirstValueIterator | SFXLinkedHashMap::GetLastValueIterator | SFXLinkedHashMap::GetValueEnumerator | SFXLinkedHashMap::GetKeyIterator | SFXLinkedHashMap::GetKeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator
[ public, const ] Bool IsEmpty(Void);
This function checks whether or not this hashmap is empty.
[ public ] SFCError Merge( SFXLinkedHashMap< K, V > const & collection // hashmap to merge );
This function merges this hashmap with the specified this hashmap.
* In case an error occurs during processing, this hashmap will be restored.
[ public ] Void Remove( KeyType key // key to remove );
This function removes the key-value pair with the specified key from this hashmap.
If the key is of the SFXAnsiString / SFXWideString type, the string as the key will be released automatically.
Caution | |
---|---|
If the key or the value is a pointer to a class instance or data bigger than 4 bytes, data the pointer points to will not be released automatically. These data need to be released explicitly using the delete statement. Otherwise, memory leakage will occur. |
[ public ] SFCError Set( SFXLinkedHashMap< K, V > const & collection // hashmap to set );
[ public ] SFCError Set( KeyType key // key to set ValueType value // value to set );
This function sets the specified key-value pair or hashmap into this hashmap.
* In case an error occurs during processing, this hashmap will be restored.
Null string | |
---|---|
The null string is the return value of the SFXAnsiString::EmptyInstance / SFXWideString::EmptyInstance function. |
SFXLinkedHashMap<SFXAnsiString, SInt32> strmap; // set a key-value pair element of (key: "mike", value: 2) into the hashmap if (strmap.Set("mike", 2) == SFERR_NO_ERROR) { // set a key-value pair element of (key: "john", value: 1) into the hashmap if (strmap.Set("john", 1) == SFERR_NO_ERROR) { // check whether or not this hashmap contains the key-value pair with the specified key TRACE("ContainsKey(\"mike\") = %s", (strmap.ContainsKey("mike")) ? ("true") : ("false")); // containsKey("mike") = true TRACE("ContainsKey(\"tom\") = %s", (strmap.ContainsKey("tom")) ? ("true") : ("false")); // containsKey("tom") = false } }
SFXLinkedHashMap::Get | SFXLinkedHashMap::operator[] | SFXAnsiString::EmptyInstance | SFXWideString::EmptyInstance
This function does nothing.
This API exists only for the compatibility with the SFXOldHashmap class which had been called as SFXHashmap in SophiaFramework UNIVERSE 5.1.8 or below.
DEPRECATED | |
---|---|
It is recommended not to use this API since it will be deprecated in SophiaFramework UNIVERSE 6.0. |
This function does nothing.
This API exists only for the compatibility with the SFXOldHashmap class which had been called as SFXHashmap in SophiaFramework UNIVERSE 5.1.8 or below.
DEPRECATED | |
---|---|
It is recommended not to use this API since it will be deprecated in SophiaFramework UNIVERSE 6.0. |
[ public ] SFCError Swap( KeyType destination // destination key KeyType source // source key );
This function swaps the value of two pair elements with the specified keys.
SFXLinkedHashMap<SFXAnsiString, SInt32> strmap; // set a key-value pair element of (key: "mike", value: 2) into the hashmap if (strmap.Set("mike", 2) == SFERR_NO_ERROR) { // set a key-value pair element of (key: "john", value: 1) into the hashmap if (strmap.Set("john", 1) == SFERR_NO_ERROR) { // swap the values of two pair elements if (strmap.Swap("mike", "john") == SFERR_NO_ERROR) { // display the value of the pair element with "mike" as the key on BREW Output Window TRACE("%d", strmap.Get("mike")); // 1 } } }
[ public, const ] ValueType operator[]( KeyType key // key index to get );
If there is the key-value pair with the specified key index in this hashmap, the corresponding value will be returned.
Otherwise, null or 0 will be returned.
This operator gets the value of the key-value pair with the specified key from this hashmap.
Caution | |
---|---|
In case no key-value pair with the specified key exists, no error will occur but this operator will return 0 or null. |
enum DefaultEnum { DEFAULT_THRESHOLD = 45 // default threshold value to expand the hash table };
[ public ] SFMTYPEDEFCLASS(KeyEnumerator) class KeyEnumerator { public: explicit KeyEnumerator (Void); KeyEnumerator (KeyIteratorConstRef iterator); KeyEnumeratorRef operator= (KeyIteratorConstRef iterator); KeyType GetNext (Void); KeyType GetPrevious (Void); ValueType GetValue (Void) const; Bool HasNext (Void) const; Bool HasPrevious (Void) const; Bool IsValid (Void) const; };
This class is for managing the key enumerator for the keys of the pair elements of this hashmap.
This class has the following member functions.
GetNext | Get the next element. If no next element exists, null or 0 will be returned. |
GetPrevious | Get the previous element. If no previous element exists, null or 0 will be returned. |
HasNext | Check whether or not the next element exists. |
HasPrevious | Check whether or not the previous element exists. |
IsValid | Check whether or not the enumerator is valid. |
SFXLinkedHashMap::KeyIterator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::GetKeyEnumerator | SFXLinkedHashMap::GetKeyIterator | SFXLinkedHashMap::GetValueEnumerator | SFXLinkedHashMap::GetValueIterator
[ public ] SFMTYPEDEFCLASS(KeyIterator) class KeyIterator { public: explicit KeyIterator (Void); SFCError SetValue (ValueType value); KeyType GetNext (Void); KeyType GetPrevious (Void); ValueType GetValue (Void) const; Bool HasNext (Void) const; Bool HasPrevious (Void) const; Bool IsValid (Void) const; SFCError Insert (KeyType key, ValueType value); Void Remove (Void); };
This class is for managing the key iterator for the keys of the pair elements of this hashmap.
This class has the following member functions.
SetValue | Set a value to the value element of current iterator. |
GetNext | Get the next element. If no next element exists, null or 0 will be returned. |
GetPrevious | Get the previous element. If no previous element exists, null or 0 will be returned. |
GetValue | Get the value element of current iterator. If invalid, return null. |
HasNext | Check whether or not the next element exists. |
HasPrevious | Check whether or not the previous element exists. |
IsValid | Check whether or not the iterator is valid. |
Insert | Insert a new element at the next element of current iterator. |
Remove | Remove the element of current iterator. |
SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::ValueEnumerator | SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::GetKeyEnumerator | SFXLinkedHashMap::GetKeyIterator | SFXLinkedHashMap::GetValueEnumerator | SFXLinkedHashMap::GetValueIterator
[ public ] SFMTYPEDEFCLASS(ValueEnumerator) class ValueEnumerator { public: explicit ValueEnumerator (Void); ValueEnumerator (ValueIteratorConstRef iterator); ValueEnumeratorRef operator= (ValueIteratorConstRef iterator); ValueType GetNext (Void); ValueType GetPrevious (Void); KeyType GetKey (Void) const; Bool HasNext (Void) const; Bool HasPrevious (Void) const; Bool IsValid (Void) const; };
This class is for managing the value enumerator for the values of the pair elements of this hashmap.
This class has the following member functions.
GetNext | Get the next element. If no next element exists, null or 0 will be returned. |
GetPrevious | Get the previous element. If no previous element exists, null or 0 will be returned. |
HasNext | Check whether or not the next element exists. |
HasPrevious | Check whether or not the previous element exists. |
IsValid | Check whether or not the enumerator is valid. |
SFXLinkedHashMap::ValueIterator | SFXLinkedHashMap::KeyEnumerator | SFXLinkedHashMap::KeyIterator | SFXLinkedHashMap::GetKeyEnumerator | SFXLinkedHashMap::GetKeyIterator | SFXLinkedHashMap::GetValueEnumerator | SFXLinkedHashMap::GetValueIterator
[ public ] SFMTYPEDEFCLASS(ValueIterator) class ValueIterator { public: explicit ValueIterator (Void); SFCError Set (ValueType value); ValueType GetNext (Void); ValueType GetPrevious (Void); KeyType GetKey (Void) const; Bool HasNext (Void) const; Bool HasPrevious (Void) const; Bool IsValid (Void) const; SFCError Insert (KeyType key, ValueType value); Void Remove (Void); };
This class is for managing the value iterator for the values of the pair elements of this hashmap.
This class has the following member functions.
Set | Set a value to the value element of current iterator. |
GetNext | Get the next element. If no next element exists, null or 0 will be returned. |
GetPrevious | Get the previous element. If no previous element exists, null or 0 will be returned. |
GetKey | Get the key element of current iterator. If invalid, return null. |
HasNext | Check whether or not the next element exists. |
HasPrevious | Check whether or not the previous element exists. |
IsValid | Check whether or not the iterator is valid. |
Insert | Insert a new element at the next element of current iterator. |
Remove | Remove the element of current iterator. |
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |