![]() |
IDS peak ICV v1.0.0
|
#include <peak_icv/serialization/peak_icv_archive.hpp>


Public Types | |
| enum class | ValueType { Bool , BoolArray , Int , IntArray , Double , DoubleArray , String , StringArray , Archive , ArchiveArray } |
| Enumerates supported value types that can be stored or queried in the archive. More... | |
Public Member Functions | |
| Archive () | |
| Default constructor. | |
| ~Archive () override | |
| Virtual destructor. | |
| Archive (const Archive &)=delete | |
| Deleted copy constructor. | |
| Archive & | operator= (const Archive &)=delete |
| Deleted copy assignment operator. | |
| Archive (Archive &&other) noexcept | |
| Move constructor. | |
| Archive & | operator= (Archive &&other) noexcept |
| Move assignment operator. | |
| std::shared_ptr< IArchive > | CreateArchive () const override |
| Creates a new Archive instance. | |
| bool | HasKey (const std::string &key) const override |
| Checks if a key exists in the archive. | |
| ValueType | GetValueType (const std::string &key) const override |
| Gets the type of value stored under a key. | |
| std::vector< std::string > | GetKeys () const override |
| Gets all keys stored in the archive. | |
| size_t | GetArrayCount (const std::string &key) const override |
| Gets the count of elements in an array value. | |
| void | SetBool (const std::string &key, bool value) override |
| Sets a boolean value. | |
| void | SetInt (const std::string &key, int64_t value) override |
| Sets an integer value. | |
| void | SetDouble (const std::string &key, double value) override |
| Sets a double precision floating point value. | |
| void | SetString (const std::string &key, const std::string &value) override |
| Sets a string value. | |
| void | SetArchive (const std::string &key, const std::shared_ptr< IArchive > &value) override |
| Sets a nested archive value. | |
| void | SetBoolArray (const std::string &key, const std::vector< bool > &value) override |
| Sets an array of boolean values. | |
| void | SetIntArray (const std::string &key, const std::vector< int64_t > &value) override |
| Sets an array of integer values. | |
| void | SetDoubleArray (const std::string &key, const std::vector< double > &value) override |
| Sets an array of double precision floating point values. | |
| void | SetStringArray (const std::string &key, const std::vector< std::string > &value) override |
| Sets an array of string values. | |
| void | SetArchiveArray (const std::string &key, const std::vector< std::shared_ptr< IArchive > > &value) override |
| Sets an array of nested archive values. | |
| bool | GetBool (const std::string &key) const override |
| Gets a boolean value. | |
| int64_t | GetInt (const std::string &key) const override |
| Gets an integer value. | |
| double | GetDouble (const std::string &key) const override |
| Gets a double precision floating point value. | |
| std::string | GetString (const std::string &key) const override |
| Gets a string value. | |
| std::shared_ptr< IArchive > | GetArchive (const std::string &key) const override |
| Gets a nested archive value. | |
| std::vector< bool > | GetBoolArray (const std::string &key) const override |
| Gets an array of boolean values. | |
| std::vector< int64_t > | GetIntArray (const std::string &key) const override |
| Gets an array of integer values. | |
| std::vector< double > | GetDoubleArray (const std::string &key) const override |
| Gets an array of double precision floating point values. | |
| std::vector< std::string > | GetStringArray (const std::string &key) const override |
| Gets an array of string values. | |
| std::vector< std::shared_ptr< IArchive > > | GetArchiveArray (const std::string &key) const override |
| Gets an array of nested archive values. | |
| virtual void | SetArchive (const std::string &key, const std::shared_ptr< IArchive > &value)=0 |
| Stores a nested archive object. | |
| virtual void | SetArchiveArray (const std::string &key, const std::vector< std::shared_ptr< IArchive > > &value)=0 |
| Stores an array of nested archives. | |
A simple key-value store that implements the IArchive interface.
The Archive class provides a concrete implementation of a serialization archive that stores data as key-value pairs. It supports various data types including primitives (bool, int64_t, double), strings, nested archives, and arrays of these types.
This class inherits from peak::common::serialization::IArchive.
Definition at line 46 of file peak_icv_archive.hpp.
|
stronginherited |
Enumerates supported value types that can be stored or queried in the archive.
Definition at line 64 of file peak_common_iarchive.hpp.
|
inline |
Default constructor.
Creates an empty Archive instance.
| InvalidConfigurationException | If the library is not initialized. |
Definition at line 59 of file peak_icv_archive.ipp.
|
inlineoverride |
Virtual destructor.
Ensures proper cleanup of resources when the Archive is destroyed.
Definition at line 70 of file peak_icv_archive.ipp.
Move constructor.
Creates an Archive by moving from another Archive instance.
| other | The Archive instance to move from |
Definition at line 78 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Creates a new Archive instance.
Factory method that creates a new Archive instance wrapped in a shared_ptr.
Implements IArchive.
Definition at line 149 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets a nested archive value.
| key | The key of the archive to retrieve |
Implements IArchive.
Definition at line 330 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets an array of nested archive values.
| key | The key of the array to retrieve |
Implements IArchive.
Definition at line 454 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets the count of elements in an array value.
| key | The key of the array to get the count for |
Implements IArchive.
Definition at line 140 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets a boolean value.
| key | The key of the value to retrieve |
Implements IArchive.
Definition at line 268 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets an array of boolean values.
| key | The key of the array to retrieve |
Implements IArchive.
Definition at line 341 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets a double precision floating point value.
| key | The key of the value to retrieve |
Implements IArchive.
Definition at line 290 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets an array of double precision floating point values.
| key | The key of the array to retrieve |
Implements IArchive.
Definition at line 388 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets an integer value.
| key | The key of the value to retrieve |
Implements IArchive.
Definition at line 279 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets an array of integer values.
| key | The key of the array to retrieve |
Implements IArchive.
Definition at line 368 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets all keys stored in the archive.
Implements IArchive.
Definition at line 103 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets a string value.
| key | The key of the value to retrieve |
Implements IArchive.
Definition at line 301 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets an array of string values.
| key | The key of the array to retrieve |
Implements IArchive.
Definition at line 410 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Gets the type of value stored under a key.
| key | The key to get the type for |
Implements IArchive.
Definition at line 93 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Checks if a key exists in the archive.
| key | The key to check for existence |
Implements IArchive.
Definition at line 158 of file peak_icv_archive.ipp.
Deleted copy assignment operator.
Archive instances cannot be copy-assigned.
|
pure virtualinherited |
Stores a nested archive object.
|
inlineoverride |
Sets a nested archive value.
| key | The key to store the archive under |
| value | A shared pointer to the IArchive instance to store |
Definition at line 196 of file peak_icv_archive.ipp.
|
pure virtualinherited |
Stores an array of nested archives.
|
inlineoverride |
Sets an array of nested archive values.
| key | The key to store the array under |
| value | The vector of shared pointers to IArchive instances to store |
Definition at line 250 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets a boolean value.
| key | The key to store the value under |
| value | The boolean value to store |
Implements IArchive.
Definition at line 168 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets an array of boolean values.
| key | The key to store the array under |
| value | The vector of boolean values to store |
Implements IArchive.
Definition at line 208 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets a double precision floating point value.
| key | The key to store the value under |
| value | The double value to store |
Implements IArchive.
Definition at line 182 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets an array of double precision floating point values.
| key | The key to store the array under |
| value | The vector of double values to store |
Implements IArchive.
Definition at line 230 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets an integer value.
| key | The key to store the value under |
| value | The integer value to store |
Implements IArchive.
Definition at line 175 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets an array of integer values.
| key | The key to store the array under |
| value | The vector of 64-bit integer values to store |
Implements IArchive.
Definition at line 223 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets a string value.
| key | The key to store the value under |
| value | The string value to store |
Implements IArchive.
Definition at line 189 of file peak_icv_archive.ipp.
|
inlineoverridevirtual |
Sets an array of string values.
| key | The key to store the array under |
| value | The vector of string values to store |
Implements IArchive.
Definition at line 237 of file peak_icv_archive.ipp.