MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
numeric.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef NUMERIC_H
37 #define NUMERIC_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "../xmeas_global.h"
46 #include "sngchnmeasurement.h"
47 
48 
49 //*************************************************************************************************************
50 //=============================================================================================================
51 // Qt INCLUDES
52 //=============================================================================================================
53 
54 #include <QSharedPointer>
55 
56 
57 //*************************************************************************************************************
58 //=============================================================================================================
59 // DEFINE NAMESPACE XMEASLIB
60 //=============================================================================================================
61 
62 namespace XMEASLIB
63 {
64 
65 
66 //=============================================================================================================
73 {
74 public:
75  typedef QSharedPointer<Numeric> SPtr;
76  typedef QSharedPointer<const Numeric> ConstSPtr;
78  //=========================================================================================================
82  Numeric();
83  //=========================================================================================================
87  virtual ~Numeric();
88 
89  //=========================================================================================================
95  inline void setUnit(const QString& unit);
96  //=========================================================================================================
102  inline const QString& getUnit() const;
103  //=========================================================================================================
110  virtual void setValue(double v);
111  //=========================================================================================================
118  virtual double getValue() const;
119 
120 private:
121  QString m_qString_Unit;
122  double m_dValue;
123 };
124 
125 
126 //*************************************************************************************************************
127 //=============================================================================================================
128 // INLINE DEFINITIONS
129 //=============================================================================================================
130 
131 inline void Numeric::setUnit(const QString& unit)
132 {
133  m_qString_Unit = unit;
134 }
135 
136 
137 //*************************************************************************************************************
138 
139 inline const QString& Numeric::getUnit() const
140 {
141  return m_qString_Unit;
142 }
143 
144 } // NAMESPACE
145 
146 #endif // NUMERIC_H
#define XMEASSHARED_EXPORT
Definition: xmeas_global.h:54
QSharedPointer< Numeric > SPtr
Definition: numeric.h:75
void setUnit(const QString &unit)
Definition: numeric.h:131
QSharedPointer< const Numeric > ConstSPtr
Definition: numeric.h:76
The Numeric class is the base class of every Numeric Measurement.
Definition: numeric.h:72
The SngChnMeasurement class is the base class of every SngChnMeasurement.
const QString & getUnit() const
Definition: numeric.h:139
Contains the declaration of the SngChnMeasurement base class.