A class that extends std::ofstream, adding some output functionality. Limiting the write access of the software, writing non-existing output directories, and adding a timestamp to output filenames.
#include <FStream.h>
Public Member Functions | |
ofilestream () | |
ofilestream (const char *filename, std::ios_base::openmode mode=std::ios_base::out) | |
Constructor. More... | |
ofilestream (const char *filename, const Config &cfgreader, std::ios_base::openmode mode=std::ios_base::out) | |
Constructor. More... | |
ofilestream (const std::string filename, std::ios_base::openmode mode=std::ios_base::out) | |
ofilestream (const std::string filename, const Config &cfgreader, std::ios_base::openmode mode=std::ios_base::out) | |
void | open (const char *filename, std::ios_base::openmode mode=std::ios_base::out) |
The actual writing function. More... | |
Static Public Member Functions | |
static void | createDirectoriesOfFile (const char *filename) |
static bool | getDefault () |
static std::string | getLimitBaseDir () |
Friends | |
void | IOManager::setOfstreamDefault (const Config &i_cfg) |
|
inline |
mio::ofilestream::ofilestream | ( | const char * | filename, |
std::ios_base::openmode | mode = std::ios_base::out |
||
) |
Constructor.
filename | file to write |
mode | mode to open the file in |
mio::ofilestream::ofilestream | ( | const char * | filename, |
const Config & | cfgreader, | ||
std::ios_base::openmode | mode = std::ios_base::out |
||
) |
Constructor.
filename | file to write |
cfgreader | instance of Config, to read the inishell config keywords |
mode | mode to open the file in |
mio::ofilestream::ofilestream | ( | const std::string | filename, |
std::ios_base::openmode | mode = std::ios_base::out |
||
) |
mio::ofilestream::ofilestream | ( | const std::string | filename, |
const Config & | cfgreader, | ||
std::ios_base::openmode | mode = std::ios_base::out |
||
) |
|
static |
|
static |
|
static |
void mio::ofilestream::open | ( | const char * | filename, |
std::ios_base::openmode | mode = std::ios_base::out |
||
) |
The actual writing function.
works the same as std::ofstream::open, but with the additional functionality
filename | file to write |
mode | mode to open the file in |
|
friend |