CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Enables the writing of files.
Definition at line 39 of file FileWriter.hpp.
#include <FileWriter.hpp>
Public Member Functions | |
FileWriter (CepsBool binary=false) | |
Constructor. More... | |
FileWriter (const CepsString &file, CepsBool binary=false) | |
Constructor. More... | |
~FileWriter () override | |
Constructor. More... | |
CepsString | getFileName () |
Name of parsed file. More... | |
void | open () |
Creates file or cleans previous content. More... | |
void | close () |
Close current file. More... | |
CepsBool | good () |
Tells if file is ok. More... | |
void | reset () |
The file stream is placed at the beginning of the file. More... | |
void | write (const CepsString &s) |
Single line writing. More... | |
template<typename T > | |
FileWriter & | operator<< (const T &content) |
Writing operator. More... | |
Public Member Functions inherited from CepsObject | |
CepsObject ()=default | |
default constructor More... | |
CepsObject (const CepsObject &)=default | |
Copy constructor. More... | |
virtual | ~CepsObject ()=default |
Destructor. More... | |
CepsObject & | operator= (const CepsObject &)=default |
Assignment operator. More... | |
CepsObject * | toBaseObject () |
Returns a pointer to CepsObject class. More... | |
const CepsObject * | toBaseObject () const |
Returns a pointer to CepsObject class, const version. More... | |
Profiler * | getProfiler () const |
Access to profiler. More... | |
Protected Attributes | |
CepsString | m_fileName |
file to write More... | |
std::ofstream | m_file |
corresponding stream More... | |
CepsBool | m_binary |
binary output if true More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from CepsObject | |
static Profiler | m_profiler |
The same profiler for each big object. More... | |
|
explicit |
Constructor.
binary | write in binary or not. Default to false |
Definition at line 35 of file FileWriter.cpp.
|
explicit |
Constructor.
file | the name of the file to write. |
binary | write in binary or not. Default to false |
Definition at line 40 of file FileWriter.cpp.
|
override |
Constructor.
binary | binary format or not |
Destructor.
Definition at line 47 of file FileWriter.cpp.
void FileWriter::close | ( | ) |
Close current file.
Definition at line 77 of file FileWriter.cpp.
CepsString FileWriter::getFileName | ( | ) |
Name of parsed file.
Definition at line 53 of file FileWriter.cpp.
CepsBool FileWriter::good | ( | ) |
Tells if file is ok.
Definition at line 84 of file FileWriter.cpp.
void FileWriter::open | ( | ) |
Creates file or cleans previous content.
Definition at line 59 of file FileWriter.cpp.
|
inline |
Writing operator.
Definition at line 89 of file FileWriter.hpp.
void FileWriter::reset | ( | ) |
The file stream is placed at the beginning of the file.
Definition at line 90 of file FileWriter.cpp.
void FileWriter::write | ( | const CepsString & | s | ) |
Single line writing.
Definition at line 96 of file FileWriter.cpp.
|
protected |
binary output if true
Definition at line 100 of file FileWriter.hpp.
|
protected |
corresponding stream
Definition at line 99 of file FileWriter.hpp.
|
protected |
file to write
Definition at line 98 of file FileWriter.hpp.