Output binary stream. More...
Public Member Functions | |
IBinaryStream (const char *buffer, std::size_t size) | |
IBinaryStream (const std::vector< char > &buffer) | |
IBinaryStream (std::size_t size) | |
IBinaryStream (void) | |
void | open (const char *buffer, std::size_t size) |
void | open (std::size_t size) |
void | read (char *data, std::size_t size) |
Public Member Functions inherited from bitpit::BinaryStream | |
char * | data () |
const char * | data () const |
bool | eof () const |
std::size_t | getCapacity () const |
int | getChunkCount () |
int | getChunkSize () |
std::size_t | getSize () const |
bool | seekg (std::size_t pos) |
bool | seekg (std::streamoff offset, std::ios_base::seekdir way) |
virtual void | setSize (std::size_t size) |
std::streampos | tellg () const |
Friends | |
template<typename T > | |
IBinaryStream & | operator>>) (IBinaryStream &stream, T &data) |
Additional Inherited Members | |
Protected Member Functions inherited from bitpit::BinaryStream | |
BinaryStream () | |
BinaryStream (const char *buffer, std::size_t capacity) | |
BinaryStream (const std::vector< char > &buffer) | |
BinaryStream (std::size_t capacity) | |
void | open (const char *buffer, std::size_t capacity) |
void | open (std::size_t capacity) |
void | setCapacity (std::size_t capacity) |
Protected Attributes inherited from bitpit::BinaryStream | |
std::vector< char > | m_buffer |
std::size_t | m_pos |
std::size_t | m_size |
Output binary stream.
Definition at line 125 of file binary_stream.hpp.
bitpit::IBinaryStream::IBinaryStream | ( | void | ) |
bitpit::IBinaryStream::IBinaryStream | ( | std::size_t | size | ) |
Constructor.
Initialize an empty binary stream with the assigned size.
[in] | size | is the stream size |
Definition at line 361 of file binary_stream.cpp.
bitpit::IBinaryStream::IBinaryStream | ( | const char * | buffer, |
std::size_t | size ) |
Constructor.
Initialize a binary stream with the data contained in the specified buffer. The data is copied from the input buffer to the internal buffer.
[in] | buffer | is the buffer that contains the data |
[in] | size | is the data size |
Definition at line 375 of file binary_stream.cpp.
bitpit::IBinaryStream::IBinaryStream | ( | const std::vector< char > & | buffer | ) |
Constructor.
Initialize a binary stream with the data contained in the specified buffer. The data is copied from the input buffer to the internal buffer.
[in] | buffer | is the buffer that contains the data |
Definition at line 388 of file binary_stream.cpp.
void bitpit::IBinaryStream::open | ( | const char * | buffer, |
std::size_t | size ) |
Open a binary stream initializing it with the data contained in the specified buffer.
[in] | buffer | is the buffer that contains the data |
[in] | size | is the buffer size |
Definition at line 410 of file binary_stream.cpp.
void bitpit::IBinaryStream::open | ( | std::size_t | size | ) |
Open a binary stream with the specified size.
[in] | size | is the buffer size |
Definition at line 398 of file binary_stream.cpp.
void bitpit::IBinaryStream::read | ( | char * | data, |
std::size_t | size ) |
Read data from the stream.
[out] | data | is the memory location that will contain the data |
[in] | size | is the size (in bytes) of the data to be read from the stream |
Definition at line 422 of file binary_stream.cpp.