|
Astarte device API for C++ 0.8.1
Astarte device SDK for C++
|
Astarte object class, representing the Astarte object datastream data. More...
#include <object.hpp>
Public Types | |
| using | MapType = std::unordered_map<std::string, AstarteData> |
| Helper type for the map of paths and Astarte datas. | |
| using | iterator = MapType::iterator |
| Helper type for the iterator over the map of paths and Astarte datas. | |
| using | const_iterator = MapType::const_iterator |
| Helper type for the const iterator over the map of paths and Astarte datas. | |
| using | size_type = MapType::size_type |
| Helper type for size type of the map of paths and Astarte datas. | |
| using | value_type = MapType::value_type |
| Helper type for value type of the map of paths and Astarte datas. | |
Public Member Functions | |
| 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 | at (const std::string &key) -> AstarteData & |
| Access specified element with bounds checking. | |
| auto | at (const std::string &key) const -> const AstarteData & |
| Access specified element with bounds checking. | |
| auto | begin () -> iterator |
| Returns an iterator to the beginning of the specified bucket. | |
| auto | begin () const -> const_iterator |
| Returns an iterator to the beginning of the specified bucket. | |
| auto | end () -> iterator |
| Returns an iterator to the end of the specified bucket. | |
| auto | end () const -> const_iterator |
| Returns an iterator to the end of the specified bucket. | |
| auto | size () const -> size_type |
| Returns the number of elements. | |
| auto | empty () const -> bool |
| Checks whether the container is empty. | |
| void | insert (const std::string &key, const AstarteData &data) |
| Insert elements. | |
| auto | erase (const std::string &key) -> size_type |
| Erases elements. | |
| void | clear () |
| Clears the contents. | |
| auto | find (const std::string &key) -> iterator |
| Finds element with specific key. | |
| auto | find (const std::string &key) const -> const_iterator |
| Finds element with specific key. | |
| auto | get_raw_data () const -> const MapType & |
| Return the raw data contained in this class instance. | |
| auto | operator== (const AstarteDatastreamObject &other) const -> bool |
| Overloader for the comparison operator ==. | |
| auto | operator!= (const AstarteDatastreamObject &other) const -> bool |
| Overloader for the comparison operator !=. | |
Astarte object class, representing the Astarte object datastream data.
| using AstarteDeviceSdk::AstarteDatastreamObject::const_iterator = MapType::const_iterator |
Helper type for the const iterator over the map of paths and Astarte datas.
| using AstarteDeviceSdk::AstarteDatastreamObject::iterator = MapType::iterator |
Helper type for the iterator over the map of paths and Astarte datas.
| using AstarteDeviceSdk::AstarteDatastreamObject::MapType = std::unordered_map<std::string, AstarteData> |
Helper type for the map of paths and Astarte datas.
| using AstarteDeviceSdk::AstarteDatastreamObject::size_type = MapType::size_type |
Helper type for size type of the map of paths and Astarte datas.
| using AstarteDeviceSdk::AstarteDatastreamObject::value_type = MapType::value_type |
Helper type for value type of the map of paths and Astarte datas.
| AstarteDeviceSdk::AstarteDatastreamObject::AstarteDatastreamObject | ( | ) |
Constructor for the class. To instantiate an empty object.
| AstarteDeviceSdk::AstarteDatastreamObject::AstarteDatastreamObject | ( | std::initializer_list< value_type > | init | ) |
Constructor for the class. To instantiate a non-empty object.
| init | The initialize list to use as intial content. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::at | ( | const std::string & | key | ) | -> AstarteData & |
Access specified element with bounds checking.
Soft wrapper for the equivalent method in the std::unordered_map.
| key | The key to search for. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::at | ( | const std::string & | key | ) | const -> const AstarteData & |
Access specified element with bounds checking.
Soft wrapper for the equivalent method in the std::unordered_map.
| key | The key to search for. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::begin | ( | ) | -> iterator |
Returns an iterator to the beginning of the specified bucket.
Soft wrapper for the equivalent method in the std::unordered_map.
| auto AstarteDeviceSdk::AstarteDatastreamObject::begin | ( | ) | const -> const_iterator |
Returns an iterator to the beginning of the specified bucket.
Soft wrapper for the equivalent method in the std::unordered_map.
| void AstarteDeviceSdk::AstarteDatastreamObject::clear | ( | ) |
Clears the contents.
Soft wrapper for the equivalent method in the std::unordered_map.
| auto AstarteDeviceSdk::AstarteDatastreamObject::empty | ( | ) | const -> bool |
Checks whether the container is empty.
Soft wrapper for the equivalent method in the std::unordered_map.
| auto AstarteDeviceSdk::AstarteDatastreamObject::end | ( | ) | -> iterator |
Returns an iterator to the end of the specified bucket.
Soft wrapper for the equivalent method in the std::unordered_map.
| auto AstarteDeviceSdk::AstarteDatastreamObject::end | ( | ) | const -> const_iterator |
Returns an iterator to the end of the specified bucket.
Soft wrapper for the equivalent method in the std::unordered_map.
| auto AstarteDeviceSdk::AstarteDatastreamObject::erase | ( | const std::string & | key | ) | -> size_type |
Erases elements.
Soft wrapper for the equivalent method in the std::unordered_map.
| key | Key to erase. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::find | ( | const std::string & | key | ) | -> iterator |
Finds element with specific key.
Soft wrapper for the equivalent method in the std::unordered_map.
| key | Key to find. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::find | ( | const std::string & | key | ) | const -> const_iterator |
Finds element with specific key.
Soft wrapper for the equivalent method in the std::unordered_map.
| key | Key to find. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::get_raw_data | ( | ) | const -> const MapType & |
Return the raw data contained in this class instance.
| void AstarteDeviceSdk::AstarteDatastreamObject::insert | ( | const std::string & | key, |
| const AstarteData & | data ) |
Insert elements.
Soft wrapper for the equivalent method in the std::unordered_map.
| key | Key to insert. |
| data | Value to insert. |
|
nodiscard |
Overloader for the comparison operator !=.
| other | The object to compare to. |
|
nodiscard |
Overloader for the comparison operator ==.
| other | The object to compare to. |
| auto AstarteDeviceSdk::AstarteDatastreamObject::size | ( | ) | const -> size_type |
Returns the number of elements.
Soft wrapper for the equivalent method in the std::unordered_map.