RTI Connext Modern C++ API  Version 6.1.0
rti::core::xtypes::DynamicDataMemberInfo Class Reference

Contains information about a DynamicData member. More...

#include <DynamicDataMemberInfo.hpp>

Public Member Functions

uint32_t member_index () const
 The member index. More...
 
const dds::core::stringmember_name () const
 The member name. More...
 
dds::core::xtypes::TypeKind member_kind () const
 The type kind of this member. More...
 
uint32_t element_count () const
 The number of elements in this member. More...
 
dds::core::xtypes::TypeKind element_kind () const
 If this member is a collection, this function returns the type kind of its elements. More...
 
bool member_exists () const
 Indicates if this member is present in this sample. More...
 

Detailed Description

Contains information about a DynamicData member.

See also
dds::core::xtypes::DynamicData::member_info()

Member Function Documentation

◆ member_index()

uint32_t rti::core::xtypes::DynamicDataMemberInfo::member_index ( ) const

The member index.

See also
Member Names and Indexes.

◆ member_name()

const dds::core::string& rti::core::xtypes::DynamicDataMemberInfo::member_name ( ) const

The member name.

See also
Member Names and Indexes.

◆ member_kind()

dds::core::xtypes::TypeKind rti::core::xtypes::DynamicDataMemberInfo::member_kind ( ) const

The type kind of this member.

This a convenience function, equivalent to looking up the member's DynamicType::kind().

See also
dds::core::xtypes::DynamicData::type()
dds::core::xtypes::DynamicType::kind()

◆ element_count()

uint32_t rti::core::xtypes::DynamicDataMemberInfo::element_count ( ) const

The number of elements in this member.

Only applies to members of ArrayType and SequenceType. For any other type this is always zero.

◆ element_kind()

dds::core::xtypes::TypeKind rti::core::xtypes::DynamicDataMemberInfo::element_kind ( ) const

If this member is a collection, this function returns the type kind of its elements.

This function provides the same information as dds::core::xtypes::CollectionType::content_type().

See also
dds::core::xtypes::DynamicData::type()
dds::core::xtypes::CollectionType::content_type()

◆ member_exists()

bool rti::core::xtypes::DynamicDataMemberInfo::member_exists ( ) const

Indicates if this member is present in this sample.

A member that is defined in a type may not exist in a sample of that type in the following situations

  • The member is optional and is unset
  • Being part of a union, the discriminator doesn't select this member
  • When getting the information about a sequence element, with index i, and i is greater than the current sequence length but smaller than its maximum length.
See also
dds::core::xtypes::DynamicData::member_exists_in_type