a common base class for all r2 sonic message section definitions
More...
#include <section.hpp>
|
| Section (char *start_bit) |
| Section.
|
|
virtual char * | nominalType () const =0 |
| returns a chararacter array of length 2 saying the nominal type of the section class
|
|
bool | isType () const |
| Return true if your type matches the header.
|
|
bool | exists () const |
| states weather that section exists where expected
|
|
u16 | getSize () const |
| getSize returns the size of the message in system-endian order
|
|
SectionInfo * | info () const |
| info gets the reference to the common section info
|
|
char * | end () const |
| end returns a pointer to one bit beyond the current section (the first bit of the next seciton)
|
|
|
char * | start_bit_ |
| a pointer to the first bit in the message
|
|
a common base class for all r2 sonic message section definitions
- Note
- accessors with a get* prefix will return a machine-endian value accessors without the get prefix will return a reference to the raw data which will be in big-endian order as per the r2sonic spec
◆ Section()
r2sonic::sections::Section::Section |
( |
char * | start_bit | ) |
|
|
inline |
◆ end()
char * r2sonic::sections::Section::end |
( |
| ) |
const |
|
inline |
end returns a pointer to one bit beyond the current section (the first bit of the next seciton)
- Returns
- the pointer to the next section
◆ existanceErrorCheck()
void r2sonic::sections::Section::existanceErrorCheck |
( |
| ) |
const |
|
inlineprotected |
◆ exists()
bool r2sonic::sections::Section::exists |
( |
| ) |
const |
|
inline |
states weather that section exists where expected
- Returns
- true if the requested section exists
◆ getSize()
u16 r2sonic::sections::Section::getSize |
( |
| ) |
const |
|
inline |
getSize returns the size of the message in system-endian order
- Note
- this function will return 0 if your type doesn't match SectionInfo.name
- Returns
- the size of the section in system endian order. Returns 0 if your type doesn't match indicating a seciton doesn't exist.
◆ info()
SectionInfo * r2sonic::sections::Section::info |
( |
| ) |
const |
|
inline |
info gets the reference to the common section info
- Returns
- a reference to the common section info
◆ isType()
bool r2sonic::sections::Section::isType |
( |
| ) |
const |
|
inline |
Return true if your type matches the header.
- Returns
- true if your type matches the header
◆ nominalType()
virtual char * r2sonic::sections::Section::nominalType |
( |
| ) |
const |
|
pure virtual |
◆ start_bit_
char* r2sonic::sections::Section::start_bit_ |
|
protected |
a pointer to the first bit in the message
The documentation for this class was generated from the following file: