CoreDX DDS Modern C++ API
Public Member Functions | List of all members
dds::core::xtypes::UnionMember Class Reference

A UnionMember is a member of a Union type. More...

Inheritance diagram for dds::core::xtypes::UnionMember:
Inheritance graph
[legend]
Collaboration diagram for dds::core::xtypes::UnionMember:
Collaboration graph
[legend]

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::DynamicTypetype () 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...
 
Referenceoperator= (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

Detailed Description

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.


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.