Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
BlamReportFile Class Reference

Class representing a report file. More...

#include <logger.h>

Public Member Functions

 BlamReportFile (BlamLogFileFormat file_format, std::string base_dir, BlamReport *_report)
 Creates a new BlamReportFile. More...
 
 BlamReportFile (BlamLogFileFormat file_format, std::string base_dir, BlamReport *_report, bool is_timestamped_file)
 Creates a new BlamReportFile. More...
 
 ~BlamReportFile ()
 
bool PrepareFile ()
 Prepares the log file for writing. More...
 
bool AppendMessage (BlamLogMessage message)
 Appends a message to the log file. More...
 
void Flush ()
 Flushes current report contents to disk. More...
 

Detailed Description

Class representing a report file.

When generating reports and log files, each file on disk has one of these classes associated with it.

Constructor & Destructor Documentation

◆ BlamReportFile() [1/2]

BlamReportFile::BlamReportFile ( BlamLogFileFormat  file_format,
std::string  base_dir,
BlamReport _report 
)

Creates a new BlamReportFile.

Parameters
file_format- The file format of this log file.
base_dir- The base directory of this log file.
_report- Pointer to the report that this log file belongs to.

◆ BlamReportFile() [2/2]

BlamReportFile::BlamReportFile ( BlamLogFileFormat  file_format,
std::string  base_dir,
BlamReport _report,
bool  is_timestamped_file 
)

Creates a new BlamReportFile.

Parameters
file_format- The file format of this log file.
base_dir- The base directory of this log file.
_report- Pointer to the report that this log file belongs to.
is_timestamped_file- Whether or not this report file should be created as a timestamped/multi-log file.
+ Here is the call graph for this function:

◆ ~BlamReportFile()

BlamReportFile::~BlamReportFile ( )
+ Here is the call graph for this function:

Member Function Documentation

◆ AppendMessage()

bool BlamReportFile::AppendMessage ( BlamLogMessage  message)

Appends a message to the log file.

Parameters
message- The message to add to the file.
Returns
true if the message was written successfully, otherwise returns false.

◆ Flush()

void BlamReportFile::Flush ( )

Flushes current report contents to disk.

Note
This does not clear all existing log data - file_contents will still be valid even after calling this method.
+ Here is the caller graph for this function:

◆ PrepareFile()

bool BlamReportFile::PrepareFile ( )

Prepares the log file for writing.

Returns
true if the file was prepared successfully, otherwise returns false.
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: