Base class of all Offset types.
More...
#include <Offset.hpp>
Base class of all Offset types.
- See also
- FlatData Offsets
◆ is_null()
bool rti::flat::OffsetBase::is_null |
( |
| ) |
const |
|
inline |
Indicates whether this Offset doesn't point to a valid element.
Comparing this object with nullptr
is equivalent to calling is_null(). For example:
auto my_final_member = my_mutable.
my_final();
if (my_final_member.is_null()) { ...member doesn't exist... }
// alternative syntax:
if (my_final_member == nullptr) {...}
- See also
- Offset Error Management
Referenced by get_buffer(), and is_cpp_compatible().
◆ is_cpp_compatible()
bool rti::flat::OffsetBase::is_cpp_compatible |
( |
| ) |
const |
|
inline |
◆ get_buffer()
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().
◆ get_buffer_size()
offset_t rti::flat::OffsetBase::get_buffer_size |
( |
| ) |
const |
|
inline |
◆ operator<
Compares two Offsets.
- Returns
- True if s1 points to a position smaller than s2's.
◆ operator>
Compares two Offsets.
- Returns
- True if s1 points to a position greater than s2's.
◆ operator<=
Compares two Offsets.
- Returns
- True if s1 points to a position equal to or smaller than s2's.
◆ operator>=
Compares two Offsets.
- Returns
- True if s1 points to a position equal to or greater than s2's.
◆ operator==
Determines if two offets point to the same position.
- Returns
- True if s1 points to the same position as s2.
◆ operator!=
Determines if two offets point to different positions.
- Returns
- True if s1 points to a different position than s2.