RTI Connext Modern C++ API Version 7.3.0

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

#include <Offset.hpp>

Inheritance diagram for MyFlatMutableOffset:
rti::flat::MutableOffset rti::flat::OffsetBase

Public Types

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

Public Member Functions

 MyFlatMutableOffset ()
 Creates a null Offset. More...
 
int32_t my_primitive () const
 Retrieves the value for a primitive member. More...
 
rti::flat::PrimitiveConstOffset< int32_t > my_optional_primitive () const
 Retrieves a const Offset to an optional primitive. More...
 
const rti::flat::PrimitiveArrayOffset< int32_t, 10 > my_primitive_array () const
 Retrieves a const Offset to a primitive array. More...
 
const rti::flat::PrimitiveSequenceOffset< int32_t > my_primitive_seq () const
 Retrieves a const Offset to a primitive sequence. More...
 
MyFlatFinal::ConstOffset my_final () const
 Retrieves a const Offset to a complex member. More...
 
rti::flat::FinalAlignedArrayOffset< MyFlatFinal::ConstOffset, 10 > my_final_array () const
 Retrieves a const Offset to a complex array. More...
 
rti::flat::SequenceOffset< MyFlatFinal::ConstOffsetmy_final_seq () const
 Retrieves a const Offset to a complex sequence. More...
 
FlatMutableBar::ConstOffset my_mutable () const
 Retrieves a const Offset to a complex member. More...
 
rti::flat::MutableArrayOffset< FlatMutableBar::ConstOffset, 10 > my_mutable_array () const
 Retrieves a const Offset to a complex array. More...
 
rti::flat::SequenceOffset< FlatMutableBar::ConstOffset > my_mutable_seq () const
 Retrieves a const Offset to a complex sequence. More...
 
const rti::flat::StringOffset my_string () const
 Retrieves a const Offset to a string. More...
 
rti::flat::SequenceOffset< const rti::flat::StringOffsetmy_string_seq () const
 Retrieves a const Offset to a sequence of strings. More...
 
bool my_primitive (int32_t value)
 Sets the value of a primitive member. More...
 
rti::flat::PrimitiveArrayOffset< int32_t, 10 > my_primitive_array ()
 Retrieves a non-const Offset to a primitive array. More...
 
rti::flat::PrimitiveSequenceOffset< int32_t > my_primitive_seq ()
 Retrieves a non-const Offset to a primitive sequence. More...
 
MyFlatFinal::Offset my_final ()
 Retrieves a non-const Offset to a complex member. More...
 
rti::flat::FinalAlignedArrayOffset< MyFlatFinal::Offset, 10 > my_final_array ()
 Retrieves a non-const Offset to a complex array. More...
 
rti::flat::SequenceOffset< MyFlatFinal::Offsetmy_final_seq ()
 Retrieves a non-const Offset to a complex sequence. More...
 
FlatMutableBar::Offset my_mutable ()
 Retrieves a non-const Offset to a complex member. More...
 
rti::flat::MutableArrayOffset< FlatMutableBar::Offset, 10 > my_mutable_array ()
 Retrieves a non-const Offset to a complex array. More...
 
rti::flat::SequenceOffset< FlatMutableBar::Offset > my_mutable_seq ()
 Retrieves a non-const Offset to a complex sequence. More...
 
rti::flat::StringOffset my_string ()
 Retrieves a non-const Offset to a string. More...
 
rti::flat::SequenceOffset< rti::flat::StringOffsetmy_string_seq ()
 Retrieves a non-const Offset to a sequence of strings. 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 mutable IDL struct.

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

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

Member Typedef Documentation

◆ ConstOffset

typedef MyFlatMutableConstOffset MyFlatMutableOffset::ConstOffset

The equivalent read-only Offset type.

Each Offset for a user type has an equivalent const Offset that doesn't allow modifying the underlying 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

◆ MyFlatMutableOffset()

MyFlatMutableOffset::MyFlatMutableOffset ( )
inline

Creates a null Offset.

Postcondition
is_null()

Member Function Documentation

◆ my_primitive() [1/2]

int32_t MyFlatMutableOffset::my_primitive ( ) const

Retrieves the value for a primitive member.

Returns
The value of the member or its default value if this member doesn't exist in this Sample.

◆ my_optional_primitive()

rti::flat::PrimitiveConstOffset< int32_t > MyFlatMutableOffset::my_optional_primitive ( ) const

Retrieves a const Offset to an optional primitive.

Unlike the non-optional my_primitive(), which accesses the integer directly, for an optional primitive it is possible to check whether it exists or not. If it doesn't exist, the Offset this function returns will be null (is_null()).

◆ my_primitive_array() [1/2]

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

Retrieves a const Offset to a primitive array.

◆ my_primitive_seq() [1/2]

const rti::flat::PrimitiveSequenceOffset< int32_t > MyFlatMutableOffset::my_primitive_seq ( ) const

Retrieves a const Offset to a primitive sequence.

◆ my_final() [1/2]

MyFlatFinal::ConstOffset MyFlatMutableOffset::my_final ( ) const

Retrieves a const Offset to a complex member.

◆ my_final_array() [1/2]

rti::flat::FinalAlignedArrayOffset< MyFlatFinal::ConstOffset, 10 > MyFlatMutableOffset::my_final_array ( ) const

Retrieves a const Offset to a complex array.

◆ my_final_seq() [1/2]

rti::flat::SequenceOffset< MyFlatFinal::ConstOffset > MyFlatMutableOffset::my_final_seq ( ) const

Retrieves a const Offset to a complex sequence.

◆ my_mutable() [1/2]

FlatMutableBar::ConstOffset MyFlatMutableOffset::my_mutable ( ) const

Retrieves a const Offset to a complex member.

FlatMutableBar is another arbitrary user-defined mutable FlatData type.

◆ my_mutable_array() [1/2]

rti::flat::MutableArrayOffset< FlatMutableBar::ConstOffset, 10 > MyFlatMutableOffset::my_mutable_array ( ) const

Retrieves a const Offset to a complex array.

◆ my_mutable_seq() [1/2]

rti::flat::SequenceOffset< FlatMutableBar::ConstOffset > MyFlatMutableOffset::my_mutable_seq ( ) const

Retrieves a const Offset to a complex sequence.

◆ my_string() [1/2]

const rti::flat::StringOffset MyFlatMutableOffset::my_string ( ) const

Retrieves a const Offset to a string.

◆ my_string_seq() [1/2]

rti::flat::SequenceOffset< const rti::flat::StringOffset > MyFlatMutableOffset::my_string_seq ( ) const

Retrieves a const Offset to a sequence of strings.

◆ my_primitive() [2/2]

bool MyFlatMutableOffset::my_primitive ( int32_t  value)

Sets the value of a primitive member.

◆ my_primitive_array() [2/2]

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

Retrieves a non-const Offset to a primitive array.

◆ my_primitive_seq() [2/2]

rti::flat::PrimitiveSequenceOffset< int32_t > MyFlatMutableOffset::my_primitive_seq ( )

Retrieves a non-const Offset to a primitive sequence.

◆ my_final() [2/2]

MyFlatFinal::Offset MyFlatMutableOffset::my_final ( )

Retrieves a non-const Offset to a complex member.

◆ my_final_array() [2/2]

rti::flat::FinalAlignedArrayOffset< MyFlatFinal::Offset, 10 > MyFlatMutableOffset::my_final_array ( )

Retrieves a non-const Offset to a complex array.

◆ my_final_seq() [2/2]

rti::flat::SequenceOffset< MyFlatFinal::Offset > MyFlatMutableOffset::my_final_seq ( )

Retrieves a non-const Offset to a complex sequence.

◆ my_mutable() [2/2]

FlatMutableBar::Offset MyFlatMutableOffset::my_mutable ( )

Retrieves a non-const Offset to a complex member.

FlatMutableBar is another arbitrary user-defined mutable FlatData type.

◆ my_mutable_array() [2/2]

rti::flat::MutableArrayOffset< FlatMutableBar::Offset, 10 > MyFlatMutableOffset::my_mutable_array ( )

Retrieves a non-const Offset to a complex array.

◆ my_mutable_seq() [2/2]

rti::flat::SequenceOffset< FlatMutableBar::Offset > MyFlatMutableOffset::my_mutable_seq ( )

Retrieves a non-const Offset to a complex sequence.

◆ my_string() [2/2]

rti::flat::StringOffset MyFlatMutableOffset::my_string ( )

Retrieves a non-const Offset to a string.

◆ my_string_seq() [2/2]

rti::flat::SequenceOffset< rti::flat::StringOffset > MyFlatMutableOffset::my_string_seq ( )

Retrieves a non-const Offset to a sequence of strings.