RTI Connext Modern C++ API
Version 5.3.0
|
<<value-type>> Represents and IDL enum
type
More...
#include <dds/core/xtypes/EnumType.hpp>
Public Member Functions | |
EnumType (const std::string &name) | |
Creates an empty enum type. | |
template<typename Container > | |
EnumType (const std::string &the_name, const Container &the_members) | |
Creates a enum with the members in a container. | |
template<typename MemberIter > | |
EnumType (const std::string &the_name, MemberIter begin, MemberIter end) | |
Creates a enum with the members in an iterator range. | |
EnumType (const std::string &the_name, std::initializer_list< EnumMemberImpl > the_members) | |
Creates a enum with the members in an initializer_list. | |
MemberIndex | find_member_by_ordinal (int32_t ordinal) const |
Gets the index of the member with this ordinal value. | |
EnumType & | add_member (const EnumMemberImpl &member) |
Adds a member at the end. | |
template<typename Container > | |
EnumType & | add_members (const Container &the_members) |
Adds all the members of a container at the end. | |
EnumType & | add_members (std::initializer_list< EnumMemberImpl > the_members) |
Adds all the members of an initializer_list at the end. | |
template<typename MemberIter > | |
EnumType & | add_members (MemberIter begin, MemberIter end) |
Adds all the members in an iterator range at the end. | |
Public Member Functions inherited from dds::core::xtypes::AbstractConstructedType< EnunMember > | |
dds::core::xtypes::ExtensibilityKind | extensibility_kind () const |
Gets the extensibility kind. | |
size_t | member_count () const |
Gets the number of members. | |
const EnunMember & | member (MemberIndex index) const |
Gets a member by its index. | |
const EnunMember & | member (const std::string &name) const |
Gets a member by its name. | |
MemberIndex | find_member_by_name (const std::string &name) const |
Obtains the member index from its name. | |
std::vector< EnunMember > | members () const |
Gets a copy of all the members. | |
Public Member Functions inherited from dds::core::xtypes::DynamicType | |
dds::core::xtypes::TypeKind | kind () const |
Gets the type kind. | |
std::string | name () const |
Gets the name. | |
Additional Inherited Members | |
Public Types inherited from dds::core::xtypes::AbstractConstructedType< EnunMember > | |
typedef EnunMember | Member |
The member type (specified by the subclasses of this class) | |
typedef uint32_t | MemberIndex |
The meber index type. | |
Static Public Attributes inherited from dds::core::xtypes::AbstractConstructedType< EnunMember > | |
static OMG_DDS_API_CLASS_VARIABLE const MemberIndex | INVALID_INDEX |
Indicates that a member doesn't exist. | |
Related Functions inherited from dds::core::xtypes::DynamicType | |
bool | is_primitive_type (const DynamicType &t) |
Determines if a DynamicType is a PrimitiveType. | |
bool | is_constructed_type (const DynamicType &t) |
Determines if a DynamicType is a constructed type. | |
bool | is_collection_type (const DynamicType &t) |
Determines if a DynamicType is a CollectionType. | |
bool | is_aggregation_type (const DynamicType &t) |
Determines if a DynamicType is an aggregation type. | |
void | print_idl (const DynamicType &type, unsigned int indent=0) |
<<extension>> Prints the IDL representation of this type to the standard output | |
<<value-type>> Represents and IDL enum
type
dds::core::xtypes::EnumType::EnumType | ( | const std::string & | name | ) |
Creates an empty enum type.
Members can be added after creation.
name | The name of the type |
|
inline |
Creates a enum with the members in a container.
Container | A container that provides the member functions begin() and end() to iterate over EnumMember elements. |
the_name | The name of the type |
the_members | A container with the members for this enum type |
|
inline |
Creates a enum with the members in an iterator range.
MemberIter | A forward iterator of EnumMember elements |
the_name | The name of the type |
begin | The beginning of the range of EnumMembers |
end | The end of the range of EnumMembers |
|
inline |
Creates a enum with the members in an initializer_list.
the_name | The name of the type |
the_members | An ininitalizer_list of EnumMembers |
MemberIndex dds::core::xtypes::EnumType::find_member_by_ordinal | ( | int32_t | ordinal | ) | const |
Gets the index of the member with this ordinal value.
EnumType& dds::core::xtypes::EnumType::add_member | ( | const EnumMemberImpl & | member | ) |
Adds a member at the end.
|
inline |
Adds all the members of a container at the end.
|
inline |
Adds all the members of an initializer_list at the end.
|
inline |
Adds all the members in an iterator range at the end.