Class FileWriterBase

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class FileWriterBase : public bitrl::utils::io::FileHandlerBase<std::ofstream>

The FileWriterBase class.

Subclassed by bitrl::utils::io::CSVWriter

Public Functions

FileWriterBase() = default

Default ctor.

FileWriterBase(const std::string &file_name, FileFormats::Type t)

Constructor. Construct by passing the name of the file to write into.

virtual ~FileWriterBase()

Destructor.

virtual void open() override

Open the file for writing.

inline char get_comment_mark() const

Return the mark that signifies the beginning of a comment line.

inline void set_comment_mark(char mark)

Set the comment mark.

virtual void write_header()

Write the header of the file. By default some information such as date and time the file was created is written.

Public Static Functions

static inline char default_comment_mark()

The default comment mark.

Protected Attributes

char comment_mark_

The mark that signifies the beginning of a comment line. The default is #.