RTI Connext Modern C++ API Version 7.3.0

Represents the Offset to an arbitrary user-defined FlatData final IDL struct. More...

#include <Offset.hpp>

Inheritance diagram for MyFlatFinalOffset:
rti::flat::FinalOffset< MyFlatFinalOffset > rti::flat::OffsetBase

Public Types

typedef MyFlatFinalConstOffset ConstOffset
 The equivalent read-only Offset type. More...
 

Public Member Functions

 MyFlatFinalOffset ()
 Creates a null Offset. More...
 
int32_t my_primitive () const
 Retrieves the value for a primitive member. More...
 
FlatFinalBar::ConstOffset my_complex () const
 Retrieves a const Offset to a complex member. More...
 
const rti::flat::PrimitiveArrayOffset< int32_t, 10 > my_primitive_array () const
 Retrieves a const Offset to a primitive array. More...
 
rti::flat::FinalArrayOffset< FlatFinalBar::ConstOffset, 10 > my_complex_array () const
 Retrieves a const Offset to a complex array. More...
 
bool my_primitive (int32_t value)
 Sets the value for a primitive member. More...
 
FlatFinalBar::Offset my_complex ()
 Retrieves a non-const Offset to a complex member. More...
 
rti::flat::PrimitiveArrayOffset< int32_t, 10 > my_primitive_array ()
 Retrieves a non-const Offset to a primitive array. More...
 
rti::flat::FinalArrayOffset< FlatFinalBar::Offset, 10 > my_complex_array ()
 Retrieves a non-const Offset to a complex array. More...
 
- Public Member Functions inherited from rti::flat::OffsetBase
bool is_null () const
 Indicates whether this Offset doesn't point to a valid element. More...
 
bool is_cpp_compatible () const
 Indicates whether rti::flat::plain_cast() is possible. More...
 
const unsigned char * get_buffer () const
 Gets this member's position in the buffer. More...
 
offset_t get_buffer_size () const
 Gets the size, in bytes, of this member in the buffer. More...
 

Detailed Description

Represents the Offset to an arbitrary user-defined FlatData final IDL struct.

This example type represents the Offset type that rtiddsgen would generate for MyFlatFinal.

It provides accessors for each of its members. Accessors can return other Offsets or primitive values.

An Offset to a final type may meet the requirements to be cast to its equivalent plain C++ type (see rti::flat::plain_cast()).

Member Typedef Documentation

◆ ConstOffset

typedef MyFlatFinalConstOffset MyFlatFinalOffset::ConstOffset

The equivalent read-only Offset type.

Each Offset for a user type has an equivalent const Offset that doesn't provide the methods to modify the Sample. For example, when reading data from a dds::sub::DataReader, a const Sample's Sample::root() function returns a const Offset.

Constructor & Destructor Documentation

◆ MyFlatFinalOffset()

MyFlatFinalOffset::MyFlatFinalOffset ( )
inline

Creates a null Offset.

Postcondition
is_null()

Member Function Documentation

◆ my_primitive() [1/2]

int32_t MyFlatFinalOffset::my_primitive ( ) const

Retrieves the value for a primitive member.

◆ my_complex() [1/2]

FlatFinalBar::ConstOffset MyFlatFinalOffset::my_complex ( ) const

Retrieves a const Offset to a complex member.

FlatFinalBar is another arbitrary user-defined final FlatData type.

◆ my_primitive_array() [1/2]

const rti::flat::PrimitiveArrayOffset< int32_t, 10 > MyFlatFinalOffset::my_primitive_array ( ) const

Retrieves a const Offset to a primitive array.

◆ my_complex_array() [1/2]

rti::flat::FinalArrayOffset< FlatFinalBar::ConstOffset, 10 > MyFlatFinalOffset::my_complex_array ( ) const

Retrieves a const Offset to a complex array.

◆ my_primitive() [2/2]

bool MyFlatFinalOffset::my_primitive ( int32_t  value)

Sets the value for a primitive member.

◆ my_complex() [2/2]

FlatFinalBar::Offset MyFlatFinalOffset::my_complex ( )

Retrieves a non-const Offset to a complex member.

FlatFinalBar is another arbitrary user-defined final FlatData type.

◆ my_primitive_array() [2/2]

rti::flat::PrimitiveArrayOffset< int32_t, 10 > MyFlatFinalOffset::my_primitive_array ( )

Retrieves a non-const Offset to a primitive array.

◆ my_complex_array() [2/2]

rti::flat::FinalArrayOffset< FlatFinalBar::Offset, 10 > MyFlatFinalOffset::my_complex_array ( )

Retrieves a non-const Offset to a complex array.