iVS3D v2.0.0
Loading...
Searching...
No Matches
LogFile Class Reference

The LogFile class logs progress as well as information about a process (e.g. Inport, Algorithm, Exoprt,...) More...

#include <logfile.h>

Inheritance diagram for LogFile:
LogFileParent

Public Member Functions

 LogFile (const QString &name, bool isPlugin)
 Default constructor.
 
QString getName () override
 getName Returns the name
 
QString getCreationTime () override
 getCreationTime Returns the time and date when the file was initalized
 
bool getIsPlugin () override
 getIsPlugin Returns true if the logged process is a plugin
 
void setSettings (QMap< QString, QVariant > settings) override
 setSettings Allows to log the used settings
 
void setInputInfo (std::vector< uint > inputFrames) override
 setInputInfo allows to log the used input
 
void setResultsInfo (std::vector< uint > keyframes) override
 setResultsInfo allows to log the returned result of the process
 
void addCustomEntry (QString entryName, QVariant entryValue, QString type=EMPTY_TYPE) override
 addCustomEntry allows to log with custom entries and types
 
void startTimer (QString timerName) override
 startTimer Starts a timer to measure a specific internal process
 
void stopTimer () override
 stopTimer Stops the currently running timer and logs the surpassed timespan
 
QJsonObject toQJSON () override
 toQJSON Returns the current state of the log file in form of a QJsonObject
 
bool print (QString path) override
 print Saves the current sate of the log file as a file at the given path
 

Detailed Description

The LogFile class logs progress as well as information about a process (e.g. Inport, Algorithm, Exoprt,...)

Author
Dominic Zahn
Date
2021/06/24

Constructor & Destructor Documentation

◆ LogFile()

LogFile::LogFile ( const QString &  name,
bool  isPlugin 
)

Default constructor.

Parameters
nameof the logged process
isPluginis true if the logged process is a plugin

Member Function Documentation

◆ addCustomEntry()

void LogFile::addCustomEntry ( QString  entryName,
QVariant  entryValue,
QString  type = EMPTY_TYPE 
)
overridevirtual

addCustomEntry allows to log with custom entries and types

Parameters
entryNameis a QString which identifies the entry
entryValueis a QVaraint that holds the custom value
typeis an optional QString which could be used to classify custom entries

Implements LogFileParent.

◆ getCreationTime()

QString LogFile::getCreationTime ( )
overridevirtual

getCreationTime Returns the time and date when the file was initalized

Returns
QString in form "dd.MM.yyyy h:m:s ap" which holds creation time and date

Implements LogFileParent.

◆ getIsPlugin()

bool LogFile::getIsPlugin ( )
overridevirtual

getIsPlugin Returns true if the logged process is a plugin

Returns
bool with is true if the logged process is a plugin

Implements LogFileParent.

◆ getName()

QString LogFile::getName ( )
overridevirtual

getName Returns the name

Returns
QString with the name

Implements LogFileParent.

◆ print()

bool LogFile::print ( QString  path)
overridevirtual

print Saves the current sate of the log file as a file at the given path

Parameters
pathis the place where the log file will be saved
Returns
true if creation was successfull

Implements LogFileParent.

◆ setInputInfo()

void LogFile::setInputInfo ( std::vector< uint >  inputFrames)
overridevirtual

setInputInfo allows to log the used input

Parameters
inputInfois a QVariant which holds a summary of information about the result which is the process is generating

Implements LogFileParent.

◆ setResultsInfo()

void LogFile::setResultsInfo ( std::vector< uint >  keyframes)
overridevirtual

setResultsInfo allows to log the returned result of the process

Parameters
resultInfois a QVariant which holds a summary of information about the input which is given to the process

Implements LogFileParent.

◆ setSettings()

void LogFile::setSettings ( QMap< QString, QVariant >  settings)
overridevirtual

setSettings Allows to log the used settings

Parameters
settingsIncludes all used settings in form of a QMap<QString, QVariant>

Implements LogFileParent.

◆ startTimer()

void LogFile::startTimer ( QString  timerName)
overridevirtual

startTimer Starts a timer to measure a specific internal process

Parameters
timerNameis a QString which identifies the internal process and is later displayed in the log file

Implements LogFileParent.

◆ toQJSON()

QJsonObject LogFile::toQJSON ( )
overridevirtual

toQJSON Returns the current state of the log file in form of a QJsonObject

Returns
QJsonObject which holds all currently locked informationf from this process

Implements LogFileParent.


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