#include <block.hh>
Public Member Functions | |
Block () | |
Block (void *mem, std::size_t size) | |
void | SetValidSize (std::size_t to) |
std::size_t | ValidSize () const |
void * | Get () |
const void * | Get () const |
const void * | ValidEnd () const |
operator bool () const | |
bool | operator! () const |
Friends | |
class | Link |
class | RewindableStream |
Definition at line 13 of file block.hh.
util::stream::Block::Block | ( | ) | [inline] |
util::stream::Block::Block | ( | void * | mem, | |
std::size_t | size | |||
) | [inline] |
const void* util::stream::Block::Get | ( | ) | const [inline] |
void* util::stream::Block::Get | ( | ) | [inline] |
Gets a void pointer to the memory underlying this block.
Definition at line 43 of file block.hh.
Referenced by util::stream::RewindableStream::operator++().
util::stream::Block::operator bool | ( | ) | const [inline] |
Returns true if this block encapsulates a valid (non-NULL) block of memory.
This method is a user-defined implicit conversion function to boolean; among other things, this method enables bare instances of this class to be used as the condition of an if statement.
Definition at line 64 of file block.hh.
References NULL.
bool util::stream::Block::operator! | ( | ) | const [inline] |
void util::stream::Block::SetValidSize | ( | std::size_t | to | ) | [inline] |
const void* util::stream::Block::ValidEnd | ( | ) | const [inline] |
std::size_t util::stream::Block::ValidSize | ( | ) | const [inline] |
Gets the number of bytes in this block that should be interpreted as valid. This is important because read might fill in less than Allocated at EOF.
Definition at line 40 of file block.hh.
Referenced by util::stream::RewindableStream::operator++(), and util::stream::Link::operator++().
friend class RewindableStream [friend] |