00001
00002
00004
00005 #if !defined(AFX_VARIABLE_H__04D26E63_7F48_4183_A917_EF05AB3C9CCD__INCLUDED_)
00006 #define AFX_VARIABLE_H__04D26E63_7F48_4183_A917_EF05AB3C9CCD__INCLUDED_
00007
00008 #if _MSC_VER > 1000
00009 #pragma once
00010 #endif // _MSC_VER > 1000
00011
00012 #include <string>
00013
00014 #include "Bound.h"
00015 #include "ValueOutOfBoundException.h"
00016 #include "NullPointerException.h"
00017
00018
00019
00021 class Variable
00022 {
00023 public:
00024
00025
00026 Variable();
00027
00028 Variable(std::string sName,double dLowerVariableBound,double dUpperVariableBound,double dReferenceValue=0.0);
00029
00030
00031 virtual ~Variable();
00032
00033
00034 virtual void setValue(double dNewValue);
00035
00036 virtual void setUncheckValue(double dNewValue);
00037
00038
00039 virtual double getValue() const;
00040
00041
00042
00043 virtual void setName(std::string sNewName);
00044
00045 virtual std::string getName() const;
00046
00047
00048 virtual Bound* getBound();
00049
00050
00051 virtual void printInfos();
00052
00053 void changeBound(Bound* mNewBound);
00054
00055 double getReferenceValue() const;
00056
00057
00058 virtual void setSimulatedValue(double dSimulatedNewValue);
00059 virtual double getSimulatedValue() const;
00060
00061
00062
00063
00064 private:
00065
00066
00067 std::string _sName;
00068
00069 double _dValue;
00070
00071 double _dSimulatedValue;
00072
00073
00074 Bound* _mBound;
00075
00076 double _dReferenceValue;
00077
00078 };
00079
00080 #endif // !defined(AFX_VARIABLE_H__04D26E63_7F48_4183_A917_EF05AB3C9CCD__INCLUDED_)