Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
Public Member Functions | Public Attributes | Static Private Member Functions | Friends | List of all members
JCOMPAREHISTOGRAMS::JResultTitle Class Reference

Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes. More...

#include <JResultTitle.hh>

Public Member Functions

 JResultTitle ()
 Default constructor. More...
 
 JResultTitle (const std::string &testName, const std::string &parameterName, const bool passed, const double value)
 Constructor. More...
 
std::string getTitle () const
 Returns a standard string to be used as title of a graphical root object. More...
 

Public Attributes

std::string testName
 
std::string parameterName
 
std::string passed
 
double value
 

Static Private Member Functions

template<class JResultTitle_t >
static JProperties getProperties (JResultTitle_t &object)
 Get properties of this class. More...
 

Friends

std::istream & operator>> (std::istream &in, JResultTitle &title)
 Stream input. More...
 
std::ostream & operator<< (std::ostream &out, const JResultTitle &title)
 Stream output. More...
 

Detailed Description

Class dedicated to standardize the title of the graphical objects produced by the JTest_t() derived classes.

Definition at line 25 of file JResultTitle.hh.

Constructor & Destructor Documentation

◆ JResultTitle() [1/2]

JCOMPAREHISTOGRAMS::JResultTitle::JResultTitle ( )
inline

Default constructor.

Definition at line 31 of file JResultTitle.hh.

32  {}

◆ JResultTitle() [2/2]

JCOMPAREHISTOGRAMS::JResultTitle::JResultTitle ( const std::string &  testName,
const std::string &  parameterName,
const bool  passed,
const double  value 
)
inline

Constructor.

Parameters
testNameTest name
parameterNameName of the parameter used to decide if the test passes.
passedTrue if the test passes, false if it fails.
valueValue of the parameter used to decide if the test passes.

Definition at line 43 of file JResultTitle.hh.

Member Function Documentation

◆ getTitle()

std::string JCOMPAREHISTOGRAMS::JResultTitle::getTitle ( ) const
inline

Returns a standard string to be used as title of a graphical root object.

Definition at line 57 of file JResultTitle.hh.

58  {
59  return MAKE_STRING(getProperties(*this));
60  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:63
static JProperties getProperties(JResultTitle_t &object)
Get properties of this class.

◆ getProperties()

template<class JResultTitle_t >
static JProperties JCOMPAREHISTOGRAMS::JResultTitle::getProperties ( JResultTitle_t &  object)
inlinestaticprivate

Get properties of this class.

Parameters
objectresult title object
Returns
properties

Definition at line 103 of file JResultTitle.hh.

104  {
105  JProperties properties;
106 
107  properties.setEndOfLine(":");
108 
109  properties.insert(gmake_property(object.testName));
110  properties.insert(gmake_property(object.parameterName));
111  properties.insert(gmake_property(object.passed));
112  properties.insert(gmake_property(object.value));
113 
114  return properties;
115  }
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Utility class to parse parameter values.
Definition: JProperties.hh:501
void setEndOfLine(const std::string &eol)
Set end of line characters.

Friends And Related Function Documentation

◆ operator>>

std::istream& operator>> ( std::istream &  in,
JResultTitle title 
)
friend

Stream input.

Parameters
ininput stream
titleresult title
Returns
input stream

Definition at line 70 of file JResultTitle.hh.

71  {
72  return in >> getProperties(title);
73  }

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const JResultTitle title 
)
friend

Stream output.

Parameters
outoutput stream
titleresult title
Returns
output stream

Definition at line 83 of file JResultTitle.hh.

84  {
85  return out << getProperties(title);
86  }

Member Data Documentation

◆ testName

std::string JCOMPAREHISTOGRAMS::JResultTitle::testName

Test name.

Definition at line 89 of file JResultTitle.hh.

◆ parameterName

std::string JCOMPAREHISTOGRAMS::JResultTitle::parameterName

Name of the parameter used to evaluate the test.

Definition at line 90 of file JResultTitle.hh.

◆ passed

std::string JCOMPAREHISTOGRAMS::JResultTitle::passed

Human readable version of "passed".

Definition at line 91 of file JResultTitle.hh.

◆ value

double JCOMPAREHISTOGRAMS::JResultTitle::value

Value of the parameter used to evaluate the test.

Definition at line 92 of file JResultTitle.hh.


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