RTI Connext Modern C++ API  Version 5.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::core::xtypes::AliasType Class Reference

<<value-type>> Represents and IDL typedef More...

#include <dds/core/xtypes/AliasType.hpp>

Inheritance diagram for dds::core::xtypes::AliasType:
dds::core::xtypes::DynamicType

Public Member Functions

 AliasType (const std::string &name, const DynamicTypeImpl &related_type, bool is_pointer=false)
 Creates an alias with a name and a related type.
 
const
dds::core::xtypes::DynamicType
related_type () const
 Gets the related type.
 
bool is_pointer () const
 <<extension>> Gets whether this alias makes related_type a pointer.
 
- 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.
 

Related Functions

(Note that these are not member functions.)

const
dds::core::xtypes::DynamicType
resolve_alias (const dds::core::xtypes::DynamicType &type)
 <<extension>> If the type is an alias returns its related type recursively until it is not an alias.
 

Detailed Description

<<value-type>> Represents and IDL typedef

Constructor & Destructor Documentation

dds::core::xtypes::AliasType::AliasType ( const std::string &  name,
const DynamicTypeImpl &  related_type,
bool  is_pointer = false 
)

Creates an alias with a name and a related type.

Parameters
nameThe name of this alias
related_typeThe aliased type
is_pointerWhether this alias makes the type a pointer

For example, to create the following two IDL aliases:

typedef long my_long;
typedef long * my_long_ptr;

We can use the following code:

AliasType my_long("my_long", primitive_type<int32_t>());
AliasType my_long_ptr("my_long_ptr", primitive_type<int32_t>(), true);

Member Function Documentation

const dds::core::xtypes::DynamicType& dds::core::xtypes::AliasType::related_type ( ) const

Gets the related type.

bool dds::core::xtypes::AliasType::is_pointer ( ) const

<<extension>> Gets whether this alias makes related_type a pointer.

Friends And Related Function Documentation

const dds::core::xtypes::DynamicType & resolve_alias ( const dds::core::xtypes::DynamicType type)
related

<<extension>> If the type is an alias returns its related type recursively until it is not an alias.


RTI Connext Modern C++ API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc