Template Class optional
Defined in File Optional.hpp
Inheritance Relationships
Base Type
public dds::core::Value< DELEGATE< T > >
(Template Class Value)
Class Documentation
-
template<typename T, template<typename Q> class DELEGATE>
class optional : public dds::core::Value<DELEGATE<T>> The optional class is used to wrap attributes annotated in the idl with the @optional annotation. This class provides a simple and safe way of accessing, setting and resetting the stored attribute.
IDL:
struct RadarTrack { string id; long x; long y; long z; //@Optional };
C++ Representation:
class RadarTrack { public: RadarTrack(); RadarTrack(const std::string& id, int32_t x, int32_t y, int32_t z); public: std::string& id() const; void id(const std::string& s); int32_t x() const; void x(int32_t v); int32_t y() const; void y(int32_t v); dds::core::optional<int32_t>& z() const; void z(int32_t v); void z(const dds::core::optional<int32_t>& z) };