|
ADTF
|
#include <hashedvaluemap.h>
Inherits adtf::base::ant::IHashValueMap.
Classes | |
| struct | tHashValueStorageType |
Public Types | |
| typedef tHashValueStorageType | value_type |
Public Types inherited from adtf::base::ant::IHashValueMap | |
| using | tHashKey = adtf::util::cStringUtil::tHashKey32 |
| Type for the HashKey of the Value. | |
Public Member Functions | |
| hash_value_map () | |
| CTOR. | |
| hash_value_map (size_t szPreAllocatedKeyValueSize) | |
| virtual | ~hash_value_map () |
| DTOR. | |
| hash_value_map (const hash_value_map &oToCopy) | |
| hash_value_map & | operator= (const hash_value_map &oToCopy) |
| hash_value_map (hash_value_map &&oToCopy)=delete | |
| no move DTOR | |
| hash_value_map & | operator= (hash_value_map &&oToCopy)=delete |
| no move operator | |
| bool | Exists (const IHashValueMap::tHashKey &oKey) const override |
| tResult | Get (IHashValueMap &oHashMap) const override |
| tResult | GetValue (const IHashValueMap::tHashKey &oHashKey, IHashValueMapValue &oValue) const override |
| void | Reset () override |
| tResult | SetValue (const IHashValueMap::tHashKey &oHashKey, const IHashValueMapValue &oValue) override |
| size_t | GetCapacity () const |
| bool | IsEmpty () const override |
| tResult | FromRaw (const IRawMemory &oRawValue) override |
| tResult | ToRaw (IRawMemory &&oRawValue) const override |
| uint8_t | GetRawMemoryLayoutVersion () const |
| void * | GetPtr () const |
Protected Member Functions | |
| hash_value_map (size_t szPreallocateMemorySize, bool bZeroMemory) | |
Protected Member Functions inherited from adtf::base::ant::IHashValueMap | |
| virtual | ~IHashValueMap ()=default |
| protected DTOR | |
Protected Member Functions inherited from adtf::base::ant::IRawValue | |
| virtual | ~IRawValue ()=default |
| protected DTOR | |
Protected Attributes | |
| size_t | m_szPreAllocatedKeyValueSize = 0 |
| Value count for preallocation of the memory. | |
implementation of the IHashValueMap.
| STORAGE | Memory storage type |
| INTERFACE | interface derived from |
|
inline |
CTOR
| [in] | szPreAllocatedKeyValueSize | count of values to preallocate memory |
|
inline |
Copy CTOR
| [in] | oToCopy | map to copy from |
|
inlineoverridevirtual |
Tests is a value for the oKey exists.
| [in] | oKey | hash key to check. |
| true | value exists |
| false | value does not exists |
Implements adtf::base::ant::IHashValueMap.
|
inlineoverridevirtual |
Implement to create a fast value copy in memory. Usually this method is called if types are equal implementation is within the same binary!
| oRawValue | [in] Memory representation of the value |
| ERR_NOERROR | Successfully copied. |
| ERR_MEMORY | You have to return ERR_MEMORY if size of oRawValue does not fit !! |
| any_error | Depends on the implementation. |
Implements adtf::base::ant::IRawValue.
|
inlineoverridevirtual |
Copy operation to the oHashMap.
| [in] | oHashMap | hash map to copy values to another hash map |
| ERR_NOERROR | copy operation succeeded |
| ERR_MEMORY | IRawValue::FromRaw or SetValue returned error |
Implements adtf::base::ant::IHashValueMap.
|
inline |
Retrieve the current count of value can be stored
|
inlinevirtual |
Return the Version of the memory layout used to store the values.
Implements adtf::base::ant::IHashValueMap.
|
inlineoverridevirtual |
Retrieves the value for the hash key oHashKey to oValue if exists.
| [in] | oHashKey | hashkey |
| [out] | oValue | value |
| ERR_NOERROR | succedded |
| ERR_INVALID_TYPE | Type not supported |
| any | depends on implementation of IHashedValue. |
Implements adtf::base::ant::IHashValueMap.
|
inlineoverridevirtual |
Tests if value map is empty.
| false | values exist |
| true | no values exist, map is empty. |
Implements adtf::base::ant::IHashValueMap.
|
inline |
Copy operator
| [in] | oToCopy | map to copy from |
|
inlineoverridevirtual |
Clears the value map.
Implements adtf::base::ant::IHashValueMap.
|
inlineoverridevirtual |
Sets or resets the value for the hash key oHashKey as copy of oValue.
| [in] | oHashKey | hashkey |
| [in] | oValue | value to set |
| ERR_NOERROR | copy operation succeeded |
| ERR_MEMORY | IRawValue::FromRaw returned error |
Implements adtf::base::ant::IHashValueMap.
|
inlineoverridevirtual |
Implement to create a fast value copy in memory. Usually this method is called if types are equal implementation is within the same binary!
| oRawValue | [oRawValue] copy of the memory representation of the value |
| ERR_NOERROR | Successfully copied. |
| any_error | Depends on the implementation. You are adviced to return the return value of IRawMemory::Set. |
Implements adtf::base::ant::IRawValue.