5#ifndef ASTARTE_DEVICE_SDK_OBJECT_H
6#define ASTARTE_DEVICE_SDK_OBJECT_H
13#include <initializer_list>
15#include <unordered_map>
25 using MapType = std::unordered_map<std::string, AstarteData>;
Astarte data class, representing the basic Astarte types.
Definition data.hpp:39
MapType::value_type value_type
Helper type for value type of the map of paths and Astarte datas.
Definition object.hpp:33
MapType::size_type size_type
Helper type for size type of the map of paths and Astarte datas.
Definition object.hpp:31
std::unordered_map< std::string, AstarteData > MapType
Helper type for the map of paths and Astarte datas.
Definition object.hpp:25
auto begin() -> iterator
Returns an iterator to the beginning of the specified bucket.
MapType::iterator iterator
Helper type for the iterator over the map of paths and Astarte datas.
Definition object.hpp:27
AstarteDatastreamObject()
Constructor for the class. To instantiate an empty object.
AstarteDatastreamObject(std::initializer_list< value_type > init)
Constructor for the class. To instantiate a non-empty object.
auto empty() const -> bool
Checks whether the container is empty.
MapType::const_iterator const_iterator
Helper type for the const iterator over the map of paths and Astarte datas.
Definition object.hpp:29
auto erase(const std::string &key) -> size_type
Erases elements.
auto at(const std::string &key) const -> const AstarteData &
Access specified element with bounds checking.
void clear()
Clears the contents.
void insert(const std::string &key, const AstarteData &data)
Insert elements.
auto size() const -> size_type
Returns the number of elements.
auto get_raw_data() const -> const MapType &
Return the raw data contained in this class instance.
auto begin() const -> const_iterator
Returns an iterator to the beginning of the specified bucket.
auto at(const std::string &key) -> AstarteData &
Access specified element with bounds checking.
auto find(const std::string &key) -> iterator
Finds element with specific key.
auto end() -> iterator
Returns an iterator to the end of the specified bucket.
Astarte data class and its related methods.
Umbrella namespace for the Astarte device SDK.
Definition data.hpp:22