PLaSK library
Loading...
Searching...
No Matches
plask::DataLog< ArgT, ValT > Class Template Reference

Template of base class for classes which store or log n-dimensional data. More...

#include <plask/log/data.hpp>

Public Member Functions

 DataLog (const std::string &global_prefix, const std::string &chart_name, const std::string &axis_arg_name, const std::string &axis_val_name)
 
 DataLog (const std::string &global_prefix, const std::string &axis_arg_name, const std::string &axis_val_name)
 
DataLogoperator() (const ArgT &arg, const ValT &val)
 Log a data point.
 
int count (const ArgT &arg, const ValT &val)
 Log a data point with automatic counting.
 
int counter () const
 Return current counter.
 
void resetCounter ()
 Reset the counter.
 
void throwError (const ArgT &arg) const
 Report and throw error.
 
std::string chartName () const
 Return chart name.
 

Protected Member Functions

DataLogoperator() (const ArgT &arg, const ValT &val, int counter)
 Log a data point and with specified counter.
 
DataLog< std::string, std::string > & operator() (const std::string &arg, const std::string &val, int counter)
 
DataLog< std::string, std::string > & operator() (const std::string &arg, const std::string &val)
 
DataLog< std::string, std::string > & operator() (const std::string &arg, const std::string &val, int counter)
 
DataLog< std::string, std::string > & operator() (const std::string &arg, const std::string &val)
 

Detailed Description

template<typename ArgT, typename ValT>
class plask::DataLog< ArgT, ValT >

Template of base class for classes which store or log n-dimensional data.

Definition at line 28 of file data.hpp.

Constructor & Destructor Documentation

◆ DataLog() [1/2]

template<typename ArgT , typename ValT >
plask::DataLog< ArgT, ValT >::DataLog ( const std::string &  global_prefix,
const std::string &  chart_name,
const std::string &  axis_arg_name,
const std::string &  axis_val_name 
)
inline

Definition at line 52 of file data.hpp.

◆ DataLog() [2/2]

template<typename ArgT , typename ValT >
plask::DataLog< ArgT, ValT >::DataLog ( const std::string &  global_prefix,
const std::string &  axis_arg_name,
const std::string &  axis_val_name 
)
inline

Definition at line 57 of file data.hpp.

Member Function Documentation

◆ chartName()

template<typename ArgT , typename ValT >
std::string plask::DataLog< ArgT, ValT >::chartName ( ) const
inline

Return chart name.

Definition at line 95 of file data.hpp.

◆ count()

template<typename ArgT , typename ValT >
int plask::DataLog< ArgT, ValT >::count ( const ArgT arg,
const ValT val 
)
inline

Log a data point with automatic counting.

Most probably add another point to the list.

Parameters
datadata to log (e.g. argument and value)
Returns
current counter

Definition at line 79 of file data.hpp.

◆ counter()

template<typename ArgT , typename ValT >
int plask::DataLog< ArgT, ValT >::counter ( ) const
inline

Return current counter.

Definition at line 83 of file data.hpp.

◆ operator()() [1/6]

template<typename ArgT , typename ValT >
DataLog & plask::DataLog< ArgT, ValT >::operator() ( const ArgT arg,
const ValT val 
)
inline

Log a data point.

Most probably add another point to the chart.

Parameters
datadata to log (e.g. argument and value)
Returns
*this

Definition at line 68 of file data.hpp.

◆ operator()() [2/6]

template<typename ArgT , typename ValT >
DataLog & plask::DataLog< ArgT, ValT >::operator() ( const ArgT arg,
const ValT val,
int  counter 
)
inlineprotected

Log a data point and with specified counter.

Most probably add another point to the list.

Parameters
countercurrent counter value
datadata to log (e.g. argument and value)
Returns
current counter

Definition at line 44 of file data.hpp.

◆ operator()() [3/6]

DataLog< std::string, std::string > & plask::DataLog< std::string, std::string >::operator() ( const std::string &  arg,
const std::string &  val 
)
protected

Definition at line 26 of file data.cpp.

◆ operator()() [4/6]

DataLog< std::string, std::string > & plask::DataLog< std::string, std::string >::operator() ( const std::string &  arg,
const std::string &  val 
)
protected

◆ operator()() [5/6]

DataLog< std::string, std::string > & plask::DataLog< std::string, std::string >::operator() ( const std::string &  arg,
const std::string &  val,
int  counter 
)
protected

Definition at line 19 of file data.cpp.

◆ operator()() [6/6]

DataLog< std::string, std::string > & plask::DataLog< std::string, std::string >::operator() ( const std::string &  arg,
const std::string &  val,
int  counter 
)
protected

◆ resetCounter()

template<typename ArgT , typename ValT >
void plask::DataLog< ArgT, ValT >::resetCounter ( )
inline

Reset the counter.

Definition at line 86 of file data.hpp.

◆ throwError()

template<typename ArgT , typename ValT >
void plask::DataLog< ArgT, ValT >::throwError ( const ArgT arg) const
inline

Report and throw error.

Definition at line 89 of file data.hpp.


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