ADTF
Loading...
Searching...
No Matches
adtf::base::ant::IHashValueMap Class Referenceabstract

#include <hashedvaluemap_intf.h>

Inherits adtf::base::ant::IRawValue.

Inherited by adtf::base::ant::hash_value_map< STORAGE, INTERFACE >, and adtf::streaming::ant::ISampleInfo.

Public Types

using tHashKey = adtf::util::cStringUtil::tHashKey32
 Type for the HashKey of the Value.
 

Public Member Functions

virtual bool Exists (const tHashKey &oKey) const =0
 
virtual tResult Get (IHashValueMap &oHashMap) const =0
 
virtual tResult GetValue (const tHashKey &oHashKey, IHashValueMapValue &oValue) const =0
 
virtual tResult SetValue (const tHashKey &oHashKey, const IHashValueMapValue &oValue)=0
 
virtual bool IsEmpty () const =0
 
virtual void Reset ()=0
 
virtual uint8_t GetRawMemoryLayoutVersion () const =0
 
- Public Member Functions inherited from adtf::base::ant::IRawValue
virtual tResult FromRaw (const IRawMemory &oRawValue)=0
 
virtual tResult ToRaw (IRawMemory &&oRawValue) const =0
 

Protected Member Functions

virtual ~IHashValueMap ()=default
 protected DTOR
 
- Protected Member Functions inherited from adtf::base::ant::IRawValue
virtual ~IRawValue ()=default
 protected DTOR
 

Detailed Description

The hashed vlaue table store interface to set and retrieve values via a hash key. The hash can be generated by create_hash_value_key.

Remarks
The implemntation must support IRawValue to retrieve a simple memory representation of the whole map.
Use hashed_value_map to implement !!
See also
hashed_value_map, create_hash_value_key

Member Function Documentation

◆ Exists()

virtual bool adtf::base::ant::IHashValueMap::Exists ( const tHashKey & oKey) const
pure virtual

Tests is a value for the oKey exists.

Parameters
[in]oKeyhash key to check.
Return values
truevalue exists
falsevalue does not exists

Implemented in adtf::base::ant::hash_value_map< STORAGE, INTERFACE >, and adtf::base::hash_value_map< STORAGE, INTERFACE >.

◆ Get()

virtual tResult adtf::base::ant::IHashValueMap::Get ( IHashValueMap & oHashMap) const
pure virtual

Copy operation to the oHashMap.

Parameters
[in]oHashMaphash map to copy values to another hash map
Remarks
if the implementation is equal you should use IRawValue to copy memory other use SetValue!
Returns
returns the standard error code
Return values
ERR_NOERRORcopy operation succeeded
ERR_MEMORYIRawValue::FromRaw or SetValue returned error

Implemented in adtf::base::ant::hash_value_map< STORAGE, INTERFACE >.

◆ GetRawMemoryLayoutVersion()

virtual uint8_t adtf::base::ant::IHashValueMap::GetRawMemoryLayoutVersion ( ) const
pure virtual

Return the Version of the memory layout used to store the values.

Returns
The version number of the Memory layout.

Implemented in adtf::base::ant::hash_value_map< STORAGE, INTERFACE >, and adtf::base::hash_value_map< STORAGE, INTERFACE >.

◆ GetValue()

virtual tResult adtf::base::ant::IHashValueMap::GetValue ( const tHashKey & oHashKey,
IHashValueMapValue & oValue ) const
pure virtual

Retrieves the value for the hash key oHashKey to oValue if exists.

Parameters
[in]oHashKeyhashkey
[out]oValuevalue
Returns
returns the standard error code
Return values
ERR_NOERRORsuccedded
ERR_INVALID_TYPEType not supported
anydepends on implementation of IHashedValue.
See also
get_hashed_value

Implemented in adtf::base::ant::hash_value_map< STORAGE, INTERFACE >.

◆ IsEmpty()

virtual bool adtf::base::ant::IHashValueMap::IsEmpty ( ) const
pure virtual

Tests if value map is empty.

Return values
falsevalues exist
trueno values exist, map is empty.

Implemented in adtf::base::ant::hash_value_map< STORAGE, INTERFACE >, and adtf::base::hash_value_map< STORAGE, INTERFACE >.

◆ Reset()

virtual void adtf::base::ant::IHashValueMap::Reset ( )
pure virtual

◆ SetValue()

virtual tResult adtf::base::ant::IHashValueMap::SetValue ( const tHashKey & oHashKey,
const IHashValueMapValue & oValue )
pure virtual

Sets or resets the value for the hash key oHashKey as copy of oValue.

Parameters
[in]oHashKeyhashkey
[in]oValuevalue to set
Returns
returns the standard error code
Return values
ERR_NOERRORcopy operation succeeded
ERR_MEMORYIRawValue::FromRaw returned error
See also
set_hashed_value

Implemented in adtf::base::ant::hash_value_map< STORAGE, INTERFACE >.


The documentation for this class was generated from the following file: