BCObservable.h
1 #ifndef __BCOBSERVABLE__H
2 #define __BCOBSERVABLE__H
3 
16 /*
17  * Copyright (C) 2007-2013, the BAT core developer team
18  * All rights reserved.
19  *
20  * For the licensing terms see doc/COPYING.
21  * For documentation see http://mpp.mpg.de/bat
22  */
23 
24 // ---------------------------------------------------------
25 #include <string>
26 
27 #include "BCVariable.h"
28 #include "BCVariableSet.h"
29 
30 // ---------------------------------------------------------
31 
32 class BCObservable : public BCVariable
33 {
34 
35 public:
36 
42  BCObservable();
43 
51  BCObservable(const std::string& name, double lowerlimit, double upperlimit, const std::string& latexname = "", const std::string& unitstring = "");
52 
59  BCObservable& operator=(const double& value)
60  { Value(value); return *this; }
61 
69  double Value() const
70  { return fObservableValue; }
71 
80  virtual void Value(double val)
81  { fObservableValue = val; }
82 
85 private:
86 
87  double fObservableValue;
88 
89 };
90 
92 
93 #endif
A class representing a variable of a model.
Definition: BCVariable.h:35
A class representing a variable of a model.
Definition: BCObservable.h:32
double Value() const
Definition: BCObservable.h:69
BCObservable()
The default constructor.
virtual void Value(double val)
Set value of observable.
Definition: BCObservable.h:80
BCObservable & operator=(const double &value)
assignment to a double operator
Definition: BCObservable.h:59