RTI Connext Modern C++ API
Version 5.3.0
|
<<value-type>> Represents a UnionType member More...
#include "dds/core/xtypes/MemberType.hpp"
Public Types | |
typedef DDS_Long | DiscriminatorType |
The type to represent a union discriminator. | |
typedef std::vector < DiscriminatorType > | LabelSeq |
A sequence of values for the discriminator that select a member. | |
Public Member Functions | |
UnionMember (const std::string &name, const DynamicTypeImpl &type, const LabelSeq &labels) | |
Creates a union member with a name, type and selected by one or more labels. | |
UnionMember (const std::string &name, const DynamicTypeImpl &type, DiscriminatorType label) | |
Creates a union member with a name, type and selected by a single label. | |
UnionMember (const std::string &the_name, DynamicTypeImpl &&the_type, const LabelSeq &the_labels) | |
<<C++11>> Creates a union member with a name, type and selected by one or more labels. | |
UnionMember (const std::string &the_name, DynamicTypeImpl &&the_type, DiscriminatorType the_label) | |
<<C++11>> Creates a union member with a name, type and selected by a single label. | |
const dds::core::string & | name () const |
Gets the member name. | |
dds::core::string & | name () |
Gets the member name. | |
const DynamicType & | type () |
Gets the member type. | |
bool | has_id () const |
Indicates it the member has an ID annotation. | |
int32_t | get_id () const |
Returns the ID annotation of this member. | |
bool | is_pointer () const |
<<extension>> Indicates if this member is a pointer | |
uint32_t | label_count () const |
Gets the number of labels that select this member. | |
LabelSeq | labels () const |
Gets a copy of all the labels that select this member. | |
UnionMember & | labels (const LabelSeq &values) |
Sets the labels that select this member. | |
UnionMember & | label (DiscriminatorType value) |
Sets a single label that selects this member. | |
UnionMember & | name (const dds::core::string &value) |
Sets the name. | |
UnionMember & | id (int32_t value) |
Sets the ID annotation of a member. | |
UnionMember & | pointer (bool value) |
<<extension>> Makes a member a pointer | |
Static Public Attributes | |
static OMG_DDS_API_CLASS_VARIABLE DiscriminatorType | DEFAULT_LABEL |
Special value for the default: union label. | |
static const int32_t | INVALID_ID |
The special ID of a member without the ID annotation. | |
<<value-type>> Represents a UnionType member
Encapsulates the name, type and labels of a UnionType member along with several IDL annotations such as id.
typedef DDS_Long dds::core::xtypes::UnionMember::DiscriminatorType |
The type to represent a union discriminator.
typedef std::vector<DiscriminatorType> dds::core::xtypes::UnionMember::LabelSeq |
A sequence of values for the discriminator that select a member.
dds::core::xtypes::UnionMember::UnionMember | ( | const std::string & | name, |
const DynamicTypeImpl & | type, | ||
const LabelSeq & | labels | ||
) |
Creates a union member with a name, type and selected by one or more labels.
dds::core::xtypes::UnionMember::UnionMember | ( | const std::string & | name, |
const DynamicTypeImpl & | type, | ||
DiscriminatorType | label | ||
) |
Creates a union member with a name, type and selected by a single label.
|
inline |
<<C++11>> Creates a union member with a name, type and selected by one or more labels.
It moves the type.
|
inline |
<<C++11>> Creates a union member with a name, type and selected by a single label.
It moves the type.
const dds::core::string& dds::core::xtypes::UnionMember::name | ( | ) | const |
Gets the member name.
dds::core::string& dds::core::xtypes::UnionMember::name | ( | ) |
Gets the member name.
const DynamicType& dds::core::xtypes::UnionMember::type | ( | ) |
Gets the member type.
bool dds::core::xtypes::UnionMember::has_id | ( | ) | const |
Indicates it the member has an ID annotation.
int32_t dds::core::xtypes::UnionMember::get_id | ( | ) | const |
Returns the ID annotation of this member.
bool dds::core::xtypes::UnionMember::is_pointer | ( | ) | const |
<<extension>> Indicates if this member is a pointer
uint32_t dds::core::xtypes::UnionMember::label_count | ( | ) | const |
Gets the number of labels that select this member.
LabelSeq dds::core::xtypes::UnionMember::labels | ( | ) | const |
Gets a copy of all the labels that select this member.
UnionMember& dds::core::xtypes::UnionMember::labels | ( | const LabelSeq & | values | ) |
Sets the labels that select this member.
UnionMember& dds::core::xtypes::UnionMember::label | ( | DiscriminatorType | value | ) |
Sets a single label that selects this member.
If more than one label selects this case, use labels(const LabelSeq&)
UnionMember& dds::core::xtypes::UnionMember::name | ( | const dds::core::string & | value | ) |
Sets the name.
UnionMember& dds::core::xtypes::UnionMember::id | ( | int32_t | value | ) |
Sets the ID annotation of a member.
[default] Automatically assigned as the ID of the previous member plus one previous member
UnionMember& dds::core::xtypes::UnionMember::pointer | ( | bool | value | ) |
<<extension>> Makes a member a pointer
[default] false
|
static |
Special value for the default:
union label.
|
static |
The special ID of a member without the ID annotation.