66 m_file.open(
m_fileName.c_str(),std::ofstream::trunc | std::ofstream::binary);
71 "File writer: could not create file " <<
m_fileName
92 m_file.seekp(0,std::ios::beg);
#define CEPS_ABORT_IF(condition, message)
Stops the execution with a message if condition is true. If testing is enabled, only throws a runtime...
std::basic_string< CepsChar > CepsString
C++ format string.
Base class for other (big) CEPS classes. All classes can get a pointer to this base class and also co...
void open()
Creates file or cleans previous content.
void reset()
The file stream is placed at the beginning of the file.
CepsString m_fileName
file to write
std::ofstream m_file
corresponding stream
void close()
Close current file.
FileWriter(CepsBool binary=false)
Constructor.
void write(const CepsString &s)
Single line writing.
CepsString getFileName()
Name of parsed file.
CepsBool good()
Tells if file is ok.
CepsBool m_binary
binary output if true
~FileWriter() override
Constructor.
A namespace for all utility methods.
CepsString getDir(const CepsString &str)
Get a substring of s, from beginning of s to the last '/' character. Example: "/home/someone/file....
CepsString execute(CepsString command, CepsBool withErr=false, CepsBool abortOnErr=false)
Not really a parallel thing. Calls system() and deals with return code.
CepsString getFilename(const CepsString &str)
Returns a substring corresponding to the string after the last '/' character. Example: "/home/someone...