RTI Connext Traditional C++ API  Version 6.0.0
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
rti::flat::OffsetBase Class Reference

Base class of all Offset types. More...

#include <Offset.hpp>

Inheritance diagram for rti::flat::OffsetBase:
rti::flat::AbstractPrimitiveList< char > rti::flat::FinalOffset< MyFlatFinalOffset > rti::flat::AbstractAlignedList< ElementOffset > rti::flat::AbstractPrimitiveList< T > rti::flat::FinalArrayOffset< ElementOffset, N > rti::flat::FinalOffset< T > rti::flat::MutableOffset rti::flat::PrimitiveConstOffset< T >

Public Member Functions

bool is_null () const
 Indicates whether this Offset doesn't point to a valid element.
 
bool is_cpp_compatible () const
 Indicates whether rti::flat::plain_cast() is possible.
 
const unsigned char * get_buffer () const
 Gets this member's position in the buffer.
 
offset_t get_buffer_size () const
 Gets the size, in bytes, of this member in the buffer.
 

Friends

bool operator< (const OffsetBase &s1, const OffsetBase &s2)
 Compares two Offsets.
 
bool operator> (const OffsetBase &s1, const OffsetBase &s2)
 Compares two Offsets.
 
bool operator<= (const OffsetBase &s1, const OffsetBase &s2)
 Compares two Offsets.
 
bool operator>= (const OffsetBase &s1, const OffsetBase &s2)
 Compares two Offsets.
 
bool operator== (const OffsetBase &s1, const OffsetBase &s2)
 Determines if two offets point to the same position.
 
bool operator!= (const OffsetBase &s1, const OffsetBase &s2)
 Determines if two offets point to different positions.
 

Detailed Description

Base class of all Offset types.

See Also
FlatData Offsets

Member Function Documentation

bool rti::flat::OffsetBase::is_null ( ) const
inline

Indicates whether this Offset doesn't point to a valid element.

See Also
Offset Error Management

Referenced by get_buffer().

bool rti::flat::OffsetBase::is_cpp_compatible ( ) const
inline

Indicates whether rti::flat::plain_cast() is possible.

Returns
True only if the data pointed to by this Offset can be rti::flat::plain_cast()
See Also
rti::flat::plain_cast() for the requirements that a type needs to meet
const unsigned char* rti::flat::OffsetBase::get_buffer ( ) const
inline

Gets this member's position in the buffer.

Note
This function should be used for debugging purposes only. To access the data in this Offset use the Offset accessor methods or, if this type allows it, rti::flat::plain_cast().

Returns the position within the Sample's buffer that this Offset points to.

See Also
get_buffer_size()

References is_null().

Referenced by rti::flat::StringOffset::get_string().

offset_t rti::flat::OffsetBase::get_buffer_size ( ) const
inline

Gets the size, in bytes, of this member in the buffer.

Returns the number of bytes that this member comprises after the position returned by get_buffer().

Referenced by rti::flat::AbstractAlignedList< ElementOffset >::begin(), and rti::flat::AbstractAlignedList< ElementOffset >::end().

Friends And Related Function Documentation

bool operator< ( const OffsetBase s1,
const OffsetBase s2 
)
friend

Compares two Offsets.

Returns
True if s1 points to a position smaller than s2's.
bool operator> ( const OffsetBase s1,
const OffsetBase s2 
)
friend

Compares two Offsets.

Returns
True if s1 points to a position greater than s2's.
bool operator<= ( const OffsetBase s1,
const OffsetBase s2 
)
friend

Compares two Offsets.

Returns
True if s1 points to a position equal to or smaller than s2's.
bool operator>= ( const OffsetBase s1,
const OffsetBase s2 
)
friend

Compares two Offsets.

Returns
True if s1 points to a position equal to or greater than s2's.
bool operator== ( const OffsetBase s1,
const OffsetBase s2 
)
friend

Determines if two offets point to the same position.

Returns
True if s1 points to the same position as s2.
bool operator!= ( const OffsetBase s1,
const OffsetBase s2 
)
friend

Determines if two offets point to different positions.

Returns
True if s1 points to a different position than s2.

RTI Connext Traditional C++ API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc