Ofstream Interface Facade for Binary Streams. More...
#include <itpp/base/binfile.h>
Public Member Functions | |
Ofstream_Binfile_Facade () | |
Default Constructor. | |
Ofstream_Binfile_Facade (const char *filename, std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary) | |
Constructor from filename and stream mode. | |
bool | is_open () |
Open state. | |
void | open (const char *filename, std::ios_base::openmode mode=std::ios_base::out|std::ios_base::binary) |
Method to open corresponding file. | |
void | close () |
Method to close corresponding file. | |
Ofstream_Binfile_Facade & | write (const char *c, std::streamsize n) |
Output multiple characters. | |
Ofstream_Binfile_Facade & | put (const char c) |
Output single char. | |
std::streampos | tellp () |
Get position. | |
Ofstream_Binfile_Facade & | seekp (std::streampos pos) |
Set position. | |
Ofstream_Binfile_Facade & | seekp (std::streamoff pos, std::ios_base::seekdir way) |
Set relative position. | |
Ofstream_Binfile_Facade & | flush () |
Flushes stream buffer. | |
bool | good () const |
This method returns true is stream state is good. | |
bool | eof () const |
This method returns true if eof is reached. | |
bool | fail () const |
This method returns true if either failbit or badbit is set. | |
bool | bad () const |
This method returns true if badbit is set. | |
bool | operator! () const |
Unary not operator to check the stream state. | |
operator bool () const | |
Conversion to bool to validate stream state. | |
std::ios_base::iostate | rdstate () const |
Method to read stream state flags. | |
void | setstate (std::ios_base::iostate state) |
Method to set the stream state (combines already set flags with flags provide by user) | |
void | clear (std::ios_base::iostate state=std::ios_base::goodbit) |
Method to set stream state (overwrites stream state flags) | |
std::ios_base::iostate | exceptions () const |
Method to get the exceptions mask. | |
void | exceptions (std::ios_base::iostate except) |
Method to set the exceptions mask. | |
virtual | ~Ofstream_Binfile_Facade () |
Destructor. | |
Protected Member Functions | |
std::ofstream * | stream () |
Access to internal stream for derived classes. | |
Ofstream Interface Facade for Binary Streams.
This class implements std::ofstream facade to make ITPP binary file streams exportable from dll. This facade implements basic functionality only. It does not provide an access to the following stream facilities (all of them are useless for binary streams)
itpp::binfile_details::Ofstream_Binfile_Facade::Ofstream_Binfile_Facade | ( | ) |
Default Constructor.
Definition at line 46 of file binfile.cpp.
|
explicit |
Constructor from filename and stream mode.
Definition at line 48 of file binfile.cpp.
|
virtual |
Destructor.
Definition at line 51 of file binfile.cpp.
|
inline |
|
inline |
|
inline |
Output multiple characters.
Definition at line 172 of file binfile.h.
References write().
Referenced by itpp::bofstream::operator<<(), itpp::bofstream::operator<<(), and write().
|
inline |
Output single char.
Definition at line 175 of file binfile.h.
References put().
Referenced by itpp::bofstream::operator<<(), itpp::bofstream::operator<<(), itpp::bofstream::operator<<(), and put().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.8