ADTF
hashedvaluemap_intf.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include "rawmemory_intf.h"
9 #include "property_intf.h"
10 
11 namespace adtf
12 {
13 namespace base
14 {
15 namespace ant
16 {
21 {
22  protected:
24  ~IHashValueMapValue() = default;
25 
26  public:
29  enum tType : uint8_t
30  {
32  HVT_Invalid = adtf::util::tVariantType::VT_Empty,
34  HVT_Bool = adtf::util::tVariantType::VT_Bool,
36  HVT_Int8 = adtf::util::tVariantType::VT_Int8,
38  HVT_UInt8 = adtf::util::tVariantType::VT_UInt8,
40  HVT_Int16 = adtf::util::tVariantType::VT_Int16,
42  HVT_UInt16 = adtf::util::tVariantType::VT_UInt16,
44  HVT_Int32 = adtf::util::tVariantType::VT_Int32,
46  HVT_UInt32 = adtf::util::tVariantType::VT_UInt32,
48  HVT_Float32 = adtf::util::tVariantType::VT_Float32,
50  HVT_Float64 = adtf::util::tVariantType::VT_Float64,
52  HVT_Int64 = adtf::util::tVariantType::VT_Int64,
54  HVT_UInt64 = adtf::util::tVariantType::VT_UInt64
55  };
56 
61  virtual tType GetType() const = 0;
69  virtual tResult Set(const IHashValueMapValue& oValue) = 0;
70 };
71 
79 class IHashValueMap : public IRawValue
80 {
81  protected:
83  virtual ~IHashValueMap() = default;
84 
85  public:
87  using tHashKey = adtf::util::cStringUtil::tHashKey32;
88 
89  public:
96  virtual bool Exists(const tHashKey& oKey) const = 0;
105  virtual tResult Get(IHashValueMap& oHashMap) const = 0;
117  virtual tResult GetValue(const tHashKey& oHashKey, IHashValueMapValue& oValue) const = 0;
128  virtual tResult SetValue(const tHashKey& oHashKey, const IHashValueMapValue& oValue) = 0;
129 
135  virtual bool IsEmpty() const = 0;
136 
140  virtual void Reset() = 0;
141 
146  virtual uint8_t GetRawMemoryLayoutVersion() const = 0;
147 
148 };
149 
150 
151 } //namespace ant
153 } //namespace base
154 } // namespace adtf
The hashed vlaue table store interface to set and retrieve values via a hash key.
virtual tResult Get(IHashValueMap &oHashMap) const =0
Copy operation to the oHashMap.
virtual ~IHashValueMap()=default
protected DTOR
virtual bool IsEmpty() const =0
Tests if value map is empty.
virtual void Reset()=0
Clears the value map.
virtual uint8_t GetRawMemoryLayoutVersion() const =0
Return the Version of the memory layout used to store the values.
virtual tResult GetValue(const tHashKey &oHashKey, IHashValueMapValue &oValue) const =0
Retrieves the value for the hash key oHashKey to oValue if exists.
virtual bool Exists(const tHashKey &oKey) const =0
Tests is a value for the oKey exists.
adtf::util::cStringUtil::tHashKey32 tHashKey
Type for the HashKey of the Value.
virtual tResult SetValue(const tHashKey &oHashKey, const IHashValueMapValue &oValue)=0
Sets or resets the value for the hash key oHashKey as copy of oValue.
Value Interface for the IHashedValueMap.
virtual tType GetType() const =0
Retrieves the type of the Value.
tType
Enumeration of variant types for the HashValueMap Values.
@ HVT_Int64
int64 type - int64_t (tTimeStamp)
virtual tResult Set(const IHashValueMapValue &oValue)=0
Sets the the Value.
~IHashValueMapValue()=default
protected DTOR
The IRawValue interface provides methods for getting and setting raw values.
Definition: property_intf.h:25
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.