CaseDescriptor.h
Go to the documentation of this file.
1
9/*====================================================================================================================*/
10/*== Guards, Includes ==============================================================================================*/
11/*====================================================================================================================*/
12
13// INCLUDE GUARDS
14//
15#ifndef LIBPF_USER_CASEDESCRIPTOR_H
16#define LIBPF_USER_CASEDESCRIPTOR_H
17
18/* SYSTEM INCLUDES */
19//
20#include <string>
21
22/* PROJECT INCLUDES */
23//
24
25/* LOCAL INCLUDES */
26//
27#include <libpf/persistency/Defaults.h>
28
29/* FORWARD REFERENCES */
30//
31
32namespace Libpf {
33namespace User {
34
35/*====================================================================================================================*/
36/*== struct CaseDescriptor declaration ==============================================================================*/
37/*====================================================================================================================*/
38
40class CaseDescriptor : public Libpf::Persistency::Defaults {
42 std::string type_;
43
45 std::map<std::string, double> quantities_;
46public:
47 CaseDescriptor(std::string type, std::string tag, std::string description);
50 CaseDescriptor(const std::string &jcd);
51
53 bool operator==(const CaseDescriptor &rhs) const;
54
55 // getter functions
57 const std::string &type(void) const;
59 std::string json(void) const;
63 bool sqCheck(const std::string &s) const;
65 const std::map<std::string, double> &msq(void) const;
66
67 // setter functions
70 void set(const std::string &jcd);
72 void addQuantity(std::string name, double value);
73}; // struct CaseDescriptor
74
75} // namespace User
76} // namespace Libpf
77
78#endif // LIBPF_USER_CASEDESCRIPTOR_H
Extends Defaults to include the name of the type and a list of quantities.
Definition: CaseDescriptor.h:40
CaseDescriptor(const std::string &jcd)
std::string json(void) const
void addQuantity(std::string name, double value)
set Quantity with name to the value, but only if that option is not already set
const std::string & type(void) const
return type
bool sqCheck(const std::string &s) const
CaseDescriptor(std::string type, std::string tag, std::string description)
void set(const std::string &jcd)
bool operator==(const CaseDescriptor &rhs) const
comparison
const std::map< std::string, double > & msq(void) const
const std::string & name(void)
const std::string & description(void)
Definition: Case.h:35