![]() |
Open Lighting Architecture 0.10.9
|
Public Member Functions | |
| IOStack () | |
| IOStack (class MemoryBlockPool *block_pool) | |
| ~IOStack () | |
| unsigned int | Size () const |
| bool | Empty () const |
| void | Write (const uint8_t *data, unsigned int length) |
| unsigned int | Read (uint8_t *data, unsigned int length) |
| unsigned int | Read (std::string *output, unsigned int length) |
| const struct IOVec * | AsIOVec (int *io_count) const |
| void | Pop (unsigned int n) |
| void | MoveToIOQueue (class IOQueue *queue) |
| void | Purge () |
| void | Dump (std::ostream *output) |
Additional Inherited Members | |
| Static Public Member Functions inherited from ola::io::IOVecInterface | |
| static void | FreeIOVec (const struct IOVec *iov) |
Clean up
|
virtual |
Return this IOStack as an array of IOVec structures. Note: The IOVec array points at internal memory structures. This array is invalidated when any non-const methods are called (Append, Pop etc.)
Is the IOStack is empty, this will return NULL and set iocnt to 0.
Use FreeIOVec() to release the IOVec array.
Implements ola::io::IOVecInterface.
| void ola::io::IOStack::Dump | ( | std::ostream * | output | ) |
Dump this IOStack as a human readable string
|
inlinevirtual |
Implements ola::io::OutputBufferInterface.
| void ola::io::IOStack::MoveToIOQueue | ( | class IOQueue * | queue | ) |
Append the memory blocks in this stack to the IOQueue. This transfers ownership of the MemoryBlocks to the queue, so the IOQueue and IOStack should have the same MemoryBlockPool (or at the very least, the same implementation).
|
virtual |
Remove bytes from the stack
Implements ola::io::IOVecInterface.
|
virtual |
Read up to n bytes into the string output.
Implements ola::io::InputBufferInterface.
|
virtual |
Read up to n bytes into the memory location data and shrink the IOQueue by the amount read.
Implements ola::io::InputBufferInterface.
|
virtual |
Return the amount of data in the buffer
Implements ola::io::OutputBufferInterface.
|
virtual |
Append (length) bytes of data to the front of the buffer.
Implements ola::io::OutputBufferInterface.