CoreDX DDS Modern C++ API
|
A UnionMember is a member of a Union type. More...
Public Member Functions | |
UnionMember (const std::string &name, const dds::core::xtypes::DynamicType &type) | |
Construct a UnionMember with the provided name, type. | |
UnionMember (const std::string &name, const dds::core::xtypes::DynamicType &type, int32_t label) | |
Construct a UnionMember with the provided name, type, and label. | |
bool | optional () const |
Access the 'optional' flag. | |
UnionMember< DELEGATE > & | optional (bool v) |
Set the 'optional' flag. | |
bool | must_understand () const |
Access the 'must_understand' flag. | |
UnionMember< DELEGATE > & | must_understand (bool v) |
Set the 'must_understand' flag. | |
int32_t | id () const |
Access the member 'id' flag. | |
UnionMember< DELEGATE > & | id (int32_t v) |
Set the member 'id' flag. | |
bool | is_default_case () const |
Access the 'is_default_case' flag. | |
UnionMember< DELEGATE > & | is_default_case (bool v) |
Set the 'is_default_case' flag. | |
const std::vector< int32_t > & | labels () const |
Access the set of labels assigned to this member. | |
UnionMember< DELEGATE > & | labels (const std::vector< int32_t > &l) |
Set the set of labels assigned to this member. | |
Public Member Functions inherited from dds::core::xtypes::MemberType | |
MemberType (const std::string &name, const dds::core::xtypes::DynamicType &type) | |
Construct a MemberType with the provided name and type. | |
const std::string | name () const |
Access the name of the MemberType. | |
const dds::core::xtypes::DynamicType & | type () const |
Access the type of the MemberType. | |
bool | key () const |
Access the 'key' flag. More... | |
MemberType< DELEGATE > & | key (bool v) |
Set the 'key' flag. | |
bool | optional () const |
Access the 'optional' flag. | |
MemberType< DELEGATE > & | optional (bool v) |
Set the 'optional' flag. | |
bool | must_understand () const |
Access the 'must_understand' flag. | |
MemberType< DELEGATE > & | must_understand (bool v) |
Set the 'must_understand' flag. | |
int32_t | id () const |
Access the member 'id' value. | |
MemberType< DELEGATE > & | id (int32_t v) |
Set the member 'id' value. | |
MemberType | add_annotation (const Annotation &annotation) |
MemberType | remove_annotation (const Annotation &annotation) |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
Additional Inherited Members | |
Related Functions inherited from dds::core::xtypes::MemberType | |
template<typename T > | |
bool | isOptional (const MemberType< T > &m) |
Test if the MemberType is optional. | |
template<typename T > | |
bool | isShared (const MemberType< T > &m) |
Test if the MemberType is shared (pointer). More... | |
template<typename T > | |
bool | isKey (const MemberType< T > &m) |
Test if the MemberType is key. | |
template<typename T > | |
bool | isMustUnderstand (const MemberType< T > &m) |
Test if the MemberType is a 'must-understand' member. | |
template<typename T > | |
bool | hasId (const MemberType< T > &m) |
Test if the MemberType has a member ID assigned. More... | |
template<typename T > | |
int32_t | getId (const MemberType< T > &m) |
Access the member ID of the MemberType. | |
A UnionMember is a member of a Union type.
It has a set of labels (values of the union discriminator) which 'select' the member. A UnionMember may be marked as the 'default' case of the union.