GEOS
Classes | Public Member Functions | List of all members
geos::LogPart Class Reference

Class for displaying section for different steps of simulation. More...

#include <LogPart.hpp>

Public Member Functions

 LogPart (string_view logPartTitle, bool enableOutput)
 Initialize a LogPart given a title. More...
 
template<typename ... Args>
void addDescription (string_view name, Args const &... args)
 Add a description to the top LogPart. More...
 
void addDescription (string_view description)
 Add a description to the top logPart. No specific format will be apply the this description. More...
 
template<typename ... Args>
void addEndDescription (string_view name, Args const &... args)
 Add a description to the bottom logPart by concatening a description name and descriptions values. More...
 
void addEndDescription (string_view description)
 Add a description to the top logPart. No specific format will be apply the this description. More...
 
void setMinWidth (size_t const &minWidth)
 Set the minimal width of the LogPart. More...
 
void setMaxWidth (size_t const &maxWidth)
 Set the maximal width of the LogPart. More...
 
void begin (std::ostream &os=std::cout)
 Draw the first part of the logPart. It include the title and optionnaly the description(s). More...
 
void end (std::ostream &oss=std::cout)
 Draw the last part of the logPart. It include the title and optionnaly the end description(s). More...
 
void enableOutput (bool enabled)
 Toggles the CSV output feature. More...
 

Detailed Description

Class for displaying section for different steps of simulation.

Definition at line 33 of file LogPart.hpp.

Constructor & Destructor Documentation

◆ LogPart()

geos::LogPart::LogPart ( string_view  logPartTitle,
bool  enableOutput 
)

Initialize a LogPart given a title.

Parameters
logPartTitleThe title who will be used for top and bottom LogPart
enableOutputBoolean to activate or not csv output

Member Function Documentation

◆ addDescription() [1/2]

void geos::LogPart::addDescription ( string_view  description)

Add a description to the top logPart. No specific format will be apply the this description.

Parameters
descriptionThe string value of the description.

◆ addDescription() [2/2]

template<typename ... Args>
void geos::LogPart::addDescription ( string_view  name,
Args const &...  args 
)

Add a description to the top LogPart.

Parameters
nameThe first part of the description
argsThe remaining part of the description,all remaining values will be concatened and aligned
Note
Descriptions values can be be any formatted types.

Definition at line 225 of file LogPart.hpp.

◆ addEndDescription() [1/2]

void geos::LogPart::addEndDescription ( string_view  description)

Add a description to the top logPart. No specific format will be apply the this description.

Parameters
descriptionThe string value of the description

◆ addEndDescription() [2/2]

template<typename ... Args>
void geos::LogPart::addEndDescription ( string_view  name,
Args const &...  args 
)

Add a description to the bottom logPart by concatening a description name and descriptions values.

Parameters
nameThe first part of the description
argsThe remaining part of the description, all remaining values will be concatened and aligned
Note
Descriptions values can be be any formatted types.

Definition at line 231 of file LogPart.hpp.

◆ begin()

void geos::LogPart::begin ( std::ostream &  os = std::cout)

Draw the first part of the logPart. It include the title and optionnaly the description(s).

Parameters
osAn output stream (by default, std::cout)

◆ enableOutput()

void geos::LogPart::enableOutput ( bool  enabled)
inline

Toggles the CSV output feature.

Parameters
enabledBoolean to activate csv output

Definition at line 102 of file LogPart.hpp.

◆ end()

void geos::LogPart::end ( std::ostream &  oss = std::cout)

Draw the last part of the logPart. It include the title and optionnaly the end description(s).

Parameters
ossAn output stream (by default, std::cout)

◆ setMaxWidth()

void geos::LogPart::setMaxWidth ( size_t const &  maxWidth)

Set the maximal width of the LogPart.

Parameters
maxWidthThe maximal width to apply

◆ setMinWidth()

void geos::LogPart::setMinWidth ( size_t const &  minWidth)

Set the minimal width of the LogPart.

Parameters
minWidthThe minimal width to apply

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