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) |
![]() | |
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 | |
![]() | |
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) |
![]() | |
std::vector< char > | m_buffer |
std::size_t | m_pos |
std::size_t | m_size |
Detailed Description
Output binary stream.
Definition at line 125 of file binary_stream.hpp.
Constructor & Destructor Documentation
◆ IBinaryStream() [1/4]
bitpit::IBinaryStream::IBinaryStream | ( | void | ) |
◆ IBinaryStream() [2/4]
bitpit::IBinaryStream::IBinaryStream | ( | std::size_t | size | ) |
Constructor.
Initialize an empty binary stream with the assigned size.
- Parameters
-
[in] size is the stream size
Definition at line 361 of file binary_stream.cpp.
◆ IBinaryStream() [3/4]
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.
- Parameters
-
[in] buffer is the buffer that contains the data [in] size is the data size
Definition at line 375 of file binary_stream.cpp.
◆ IBinaryStream() [4/4]
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.
- Parameters
-
[in] buffer is the buffer that contains the data
Definition at line 388 of file binary_stream.cpp.
Member Function Documentation
◆ open() [1/2]
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.
- Parameters
-
[in] buffer is the buffer that contains the data [in] size is the buffer size
Definition at line 410 of file binary_stream.cpp.
◆ open() [2/2]
void bitpit::IBinaryStream::open | ( | std::size_t | size | ) |
Open a binary stream with the specified size.
- Parameters
-
[in] size is the buffer size
Definition at line 398 of file binary_stream.cpp.
◆ read()
void bitpit::IBinaryStream::read | ( | char * | data, |
std::size_t | size ) |
Read data from the stream.
- Parameters
-
[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.
The documentation for this class was generated from the following files:
- src/containers/binary_stream.hpp
- src/containers/binary_stream.cpp
