#include <builder.hpp>
osmium::builder::Builder::Builder |
( |
const Builder & |
| ) |
|
|
privatedelete |
osmium::builder::Builder::Builder |
( |
Builder && |
| ) |
|
|
privatedelete |
osmium::builder::Builder::~Builder |
( |
| ) |
|
|
protecteddefault |
void osmium::builder::Builder::add_padding |
( |
bool |
self = false | ) |
|
|
inline |
Add padding to buffer (if needed) to align data properly.
This calculates how many padding bytes are needed and adds as many zero bytes to the buffer. It also adds this number to the size of the current item (if the "self" param is true) and recursively to all the parent items.
- Parameters
-
self | If true add number of padding bytes to size of current item. Size is always added to parent item (if any). |
void osmium::builder::Builder::add_size |
( |
uint32_t |
size | ) |
|
|
inline |
Append data to buffer.
- Parameters
-
data | Pointer to data. |
length | Length of data in bytes. If data is a \0-terminated string, length must contain the \0 byte. |
Append \0-terminated string to buffer.
Return the buffer this builder is using.
template<class T >
T* osmium::builder::Builder::reserve_space_for |
( |
| ) |
|
|
inline |
Reserve space for an object of class T in buffer and return pointer to it.
uint32_t osmium::builder::Builder::size |
( |
| ) |
const |
|
inlinenoexcept |
size_t osmium::builder::Builder::m_item_offset |
|
private |
Builder* osmium::builder::Builder::m_parent |
|
private |
The documentation for this class was generated from the following file: