![]() |
IDS peak ICV v1.1.0
|
#include <peak_common/serialization/peak_common_iarchive.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 | |
| virtual | ~IArchive ()=default |
| virtual std::shared_ptr< IArchive > | CreateArchive () const =0 |
| Creates a new, empty archive instance. | |
| virtual bool | HasKey (const std::string &key) const =0 |
| Checks whether a given key exists in the archive. | |
| virtual ValueType | GetValueType (const std::string &key) const =0 |
| Retrieves the value type associated with a key. | |
| virtual std::vector< std::string > | GetKeys () const =0 |
| Returns a list of all keys currently stored in the archive. | |
| virtual size_t | GetArrayCount (const std::string &key) const =0 |
| Gets the number of elements in an array stored under the given key. | |
| virtual void | SetBool (const std::string &key, bool value)=0 |
| Stores a boolean value. | |
| virtual void | SetInt (const std::string &key, int64_t value)=0 |
| Stores a 64-bit signed integer. | |
| virtual void | SetDouble (const std::string &key, double value)=0 |
| Stores a double-precision floating point number. | |
| virtual void | SetString (const std::string &key, const std::string &value)=0 |
| Stores a UTF-8 string. | |
| virtual void | SetArchive (const std::string &key, const std::shared_ptr< IArchive > &value)=0 |
| Stores a nested archive object. | |
| virtual void | SetBoolArray (const std::string &key, const std::vector< bool > &value)=0 |
| Stores an array of boolean values. | |
| virtual void | SetIntArray (const std::string &key, const std::vector< int64_t > &value)=0 |
| Stores an array of 64-bit integers. | |
| virtual void | SetDoubleArray (const std::string &key, const std::vector< double > &value)=0 |
| Stores an array of doubles. | |
| virtual void | SetStringArray (const std::string &key, const std::vector< std::string > &value)=0 |
| Stores an array of strings. | |
| virtual void | SetArchiveArray (const std::string &key, const std::vector< std::shared_ptr< IArchive > > &value)=0 |
| Stores an array of nested archives. | |
| virtual bool | GetBool (const std::string &key) const =0 |
| Retrieves a boolean value by key. | |
| virtual int64_t | GetInt (const std::string &key) const =0 |
| Retrieves a 64-bit signed integer by key. | |
| virtual double | GetDouble (const std::string &key) const =0 |
| Retrieves a double-precision number by key. | |
| virtual std::string | GetString (const std::string &key) const =0 |
| Retrieves a string value by key. | |
| virtual std::shared_ptr< IArchive > | GetArchive (const std::string &key) const =0 |
| Retrieves a nested archive by key. | |
| virtual std::vector< bool > | GetBoolArray (const std::string &key) const =0 |
| Retrieves an array of booleans by key. | |
| virtual std::vector< int64_t > | GetIntArray (const std::string &key) const =0 |
| Retrieves an array of integers by key. | |
| virtual std::vector< double > | GetDoubleArray (const std::string &key) const =0 |
| Retrieves an array of doubles by key. | |
| virtual std::vector< std::string > | GetStringArray (const std::string &key) const =0 |
| Retrieves an array of strings by key. | |
| virtual std::vector< std::shared_ptr< IArchive > > | GetArchiveArray (const std::string &key) const =0 |
| Retrieves an array of nested archives by key. | |
Interface for a hierarchical key-value archive system.
Provides methods for storing and retrieving structured data of various types, including primitive values, arrays, and nested archives.
This interface is suitable for serialization and deserialization purposes.
Definition at line 58 of file peak_common_iarchive.hpp.
|
strong |
Enumerates supported value types that can be stored or queried in the archive.
Definition at line 64 of file peak_common_iarchive.hpp.
|
virtualdefault |
|
pure virtual |
Creates a new, empty archive instance.
Implemented in Archive.
|
pure virtual |
Retrieves a nested archive by key.
Implemented in Archive.
|
pure virtual |
Retrieves an array of nested archives by key.
Implemented in Archive.
|
pure virtual |
Gets the number of elements in an array stored under the given key.
| key | The key referencing the array. |
Implemented in Archive.
|
pure virtual |
Retrieves a boolean value by key.
Implemented in Archive.
|
pure virtual |
Retrieves an array of booleans by key.
Implemented in Archive.
|
pure virtual |
Retrieves a double-precision number by key.
Implemented in Archive.
|
pure virtual |
Retrieves an array of doubles by key.
Implemented in Archive.
|
pure virtual |
Retrieves a 64-bit signed integer by key.
Implemented in Archive.
|
pure virtual |
Retrieves an array of integers by key.
Implemented in Archive.
|
pure virtual |
Returns a list of all keys currently stored in the archive.
Implemented in Archive.
|
pure virtual |
Retrieves a string value by key.
Implemented in Archive.
|
pure virtual |
Retrieves an array of strings by key.
Implemented in Archive.
|
pure virtual |
Retrieves the value type associated with a key.
| key | The key whose value type to retrieve. |
Implemented in Archive.
|
pure virtual |
Checks whether a given key exists in the archive.
| key | The key to look for. |
Implemented in Archive.
|
pure virtual |
Stores a nested archive object.
|
pure virtual |
Stores an array of nested archives.
|
pure virtual |
Stores a boolean value.
Implemented in Archive.
|
pure virtual |
Stores an array of boolean values.
Implemented in Archive.
|
pure virtual |
Stores a double-precision floating point number.
Implemented in Archive.
|
pure virtual |
Stores an array of doubles.
Implemented in Archive.
|
pure virtual |
Stores a 64-bit signed integer.
Implemented in Archive.
|
pure virtual |
Stores an array of 64-bit integers.
Implemented in Archive.
|
pure virtual |
Stores a UTF-8 string.
Implemented in Archive.
|
pure virtual |
Stores an array of strings.
Implemented in Archive.