<<value-type>> Represents and IDL enum
type
More...
#include <dds/core/xtypes/EnumType.hpp>
<<value-type>> Represents and IDL enum
type
AbstractConstructedType<EnumMember>
- Examples
- Foo.hpp.
◆ EnumType() [1/4]
dds::core::xtypes::EnumType::EnumType |
( |
const std::string & |
name | ) |
|
Creates an empty enum type.
Members can be added after creation.
- Parameters
-
◆ EnumType() [2/4]
template<typename Container >
dds::core::xtypes::EnumType::EnumType |
( |
const std::string & |
the_name, |
|
|
const Container & |
the_members |
|
) |
| |
|
inline |
Creates an enum with the members in a container.
- Template Parameters
-
Container | A container that provides the member functions begin() and end() to iterate over EnumMember elements. |
- Parameters
-
the_name | The name of the type |
the_members | A container with the members for this enum type |
◆ EnumType() [3/4]
template<typename MemberIter >
dds::core::xtypes::EnumType::EnumType |
( |
const std::string & |
the_name, |
|
|
MemberIter |
begin, |
|
|
MemberIter |
end |
|
) |
| |
|
inline |
Creates a enum with the members in an iterator range.
- Template Parameters
-
MemberIter | A forward iterator of EnumMember elements |
- Parameters
-
the_name | The name of the type |
begin | The beginning of the range of EnumMembers |
end | The end of the range of EnumMembers |
◆ EnumType() [4/4]
dds::core::xtypes::EnumType::EnumType |
( |
const std::string & |
the_name, |
|
|
std::initializer_list< EnumMember > |
the_members |
|
) |
| |
Creates an enum with the members in an initializer_list.
- Parameters
-
the_name | The name of the type |
the_members | An ininitalizer_list of EnumMembers |
◆ find_member_by_ordinal()
MemberIndex dds::core::xtypes::EnumType::find_member_by_ordinal |
( |
int32_t |
ordinal | ) |
const |
Gets the index of the member with this ordinal value.
- Returns
- The index (which can be passed to member(uint32_t) of the member with this ordinal value or INVALID_INDEX if that ordinal doesn't exist
◆ add_member()
Adds a member at the end.
◆ add_members() [1/3]
template<typename Container >
EnumType & dds::core::xtypes::EnumType::add_members |
( |
const Container & |
the_members | ) |
|
|
inline |
Adds all the members of a container at the end.
◆ add_members() [2/3]
EnumType & dds::core::xtypes::EnumType::add_members |
( |
std::initializer_list< EnumMember > |
the_members | ) |
|
Adds all the members of an initializer_list at the end.
◆ add_members() [3/3]
template<typename MemberIter >
EnumType & dds::core::xtypes::EnumType::add_members |
( |
MemberIter |
begin, |
|
|
MemberIter |
end |
|
) |
| |
|
inline |
Adds all the members in an iterator range at the end.
◆ extensibility_kind()
Gets the extensibility kind.