5#ifndef ASTARTE_DEVICE_SDK_PROPERTY_H
6#define ASTARTE_DEVICE_SDK_PROPERTY_H
55 std::optional<
Data> data_;
69 template <
typename ParseContext>
70 constexpr auto parse(ParseContext& ctx)
const {
81 template <
typename FormatContext>
84 if (opt_data.has_value()) {
85 return astarte_fmt::format_to(ctx.out(),
"{}", opt_data.value());
101 out << astarte_fmt::format(
"{}", data);
Represents a single Astarte data value.
Definition data.hpp:61
Representing the Astarte individual property data.
Definition property.hpp:22
auto get_value() const -> const std::optional< Data > &
Gets the value contained within the object.
PropertyIndividual(const std::optional< Data > &data)
Constructor for the PropertyIndividual class.
Astarte data class and its related methods.
auto operator<<(std::ostream &out, const astarte::device::Data &data) -> std::ostream &
Stream insertion operator for Data.
Definition data.hpp:243
Umbrella namespace for the Astarte device library.
Definition data.hpp:29
Namespace alias for the formatting library (std or fmt).
Definition formatter.hpp:45
Global namespace for all Astarte related functionality.
Definition data.hpp:29