Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:43:50

0001 #ifndef PARAMETER_H
0002 #define PARAMETER_H
0003 
0004 /**
0005  * @file Parameter.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date October 26, 2016
0008  * @version 1.0
0009  */
0010 
0011 #include <string>
0012 
0013 #include "GenericType.h"
0014 
0015 namespace ElemUtils {
0016 
0017 /**
0018  * @class Parameter
0019  *
0020  * @brief A piece of data of generic type which is given a simply readable name (a string variable).
0021  * As it is the case for GenericType, a parameter can be defined from any class.
0022  */
0023 class Parameter: public GenericType {
0024 public:
0025     template<class T>
0026     Parameter(const std::string &name, const T &value) :
0027             GenericType(value), m_name(name) {
0028     }
0029 
0030     virtual ~Parameter();
0031 
0032     std::string toString() const;
0033 
0034     const std::string& getName() const;
0035 
0036 private:
0037     std::string m_name;
0038 };
0039 
0040 } /* namespace ElemUtils */
0041 
0042 #endif /* PARAMETER_H */