#include <Variable.h>
Collaboration diagram for Variable:

Public Member Functions | ||||
| Variable () | ||||
| Default constructor. | ||||
| Variable (std::string sName, double dLowerVariableBound, double dUpperVariableBound, double dReferenceValue=0.0) | ||||
This constructor requires 3 parameters :
| ||||
| virtual | ~Variable () | |||
| Destructor. | ||||
| virtual void | setValue (double dNewValue) | |||
| Change the value of the variable. | ||||
| virtual void | setUncheckValue (double dNewValue) | |||
| Change the value of the variable without checking the boundaries conditions. | ||||
| virtual double | getValue () const | |||
| Return the value of the variable. | ||||
| virtual void | setName (std::string sNewName) | |||
| Set the name of the variable. | ||||
| virtual std::string | getName () const | |||
| Return the name of the variable. | ||||
| virtual Bound * | getBound () | |||
Return a reference to the variable bound
| ||||
| virtual void | printInfos () | |||
| Print infos about Variable object Used mainly in DEBUG mode. | ||||
| void | changeBound (Bound *mNewBound) | |||
| Change the bound value of the variable with the mNewBound values. | ||||
| double | getReferenceValue () const | |||
| virtual void | setSimulatedValue (double dSimulatedNewValue) | |||
| Change the Simulated value of the variable. | ||||
| virtual double | getSimulatedValue () const | |||
| Return the Simulated value of the variable. | ||||
Private Attributes | ||||
| std::string | _sName | |||
| double | _dValue | |||
| double | _dSimulatedValue | |||
| Bound * | _mBound | |||
| double | _dReferenceValue | |||
Definition at line 21 of file Variable.h.
|
|
Default constructor.
Definition at line 16 of file Variable.cpp.
|
|
||||||||||||||||||||
|
This constructor requires 3 parameters :
Definition at line 26 of file Variable.cpp. References _mBound. 00026 : 00027 _sName(sName), 00028 _dValue(-1.0), 00029 _dSimulatedValue(-1.0), 00030 _dReferenceValue(dReferenceValue) 00031 { 00032 _mBound = new Bound(sName,dLowerVariableBound,dUpperVariableBound); 00033 }
|
|
|
Destructor.
Definition at line 37 of file Variable.cpp. References _mBound.
|
|
|
Change the bound value of the variable with the mNewBound values.
Definition at line 139 of file Variable.cpp. References _mBound, and Bound::setBound().
Here is the call graph for this function: ![]() |
|
|
Return a reference to the variable bound
ModelId=43834ABD0297 Definition at line 121 of file Variable.cpp. References _mBound. Referenced by setValue(). 00122 { 00123 if (_mBound==0) throw NullPointerException("_mBound","Variable::getBound()",__FILE__,__LINE__); 00124 return _mBound; 00125 }
|
|
|
Return the name of the variable.
Definition at line 113 of file Variable.cpp. References _sName. Referenced by printInfos(), and setValue(). 00114 { 00115 return _sName; 00116 }
|
|
|
Definition at line 74 of file Variable.cpp. References _dReferenceValue. 00075 { 00076 return _dReferenceValue; 00077 }
|
|
|
Return the Simulated value of the variable.
Definition at line 90 of file Variable.cpp. References _dSimulatedValue. 00091 { 00092 return _dSimulatedValue; 00093 }
|
|
|
Return the value of the variable.
Definition at line 68 of file Variable.cpp. References _dValue. Referenced by printInfos(). 00069 { 00070 return _dValue; 00071 }
|
|
|
Print infos about Variable object ModelId=43834ABD029C Definition at line 131 of file Variable.cpp. References _mBound, getName(), getValue(), and Bound::printInfos(). 00132 { 00133 std::cout << "\n##### VARIABLE " << endl; 00134 std::cout << "\tVariable --> " << getName() << " : " << getValue() << std::endl; 00135 _mBound->printInfos(); 00136 }
Here is the call graph for this function: ![]() |
|
|
Set the name of the variable.
Definition at line 106 of file Variable.cpp. References _sName. 00107 { 00108 _sName = sNewName; 00109 }
|
|
|
Change the Simulated value of the variable.
Definition at line 83 of file Variable.cpp. References _dSimulatedValue. 00084 { 00085 _dSimulatedValue = dSimulatedNewValue; 00086 }
|
|
|
Change the value of the variable without checking the boundaries conditions.
Definition at line 61 of file Variable.cpp. References _dValue. 00062 { 00063 _dValue = dNewValue; 00064 }
|
|
|
Change the value of the variable.
Definition at line 49 of file Variable.cpp. References _dValue, _mBound, getBound(), Bound::getLowerBound(), getName(), and Bound::getUpperBound(). 00050 { 00051 00052 if ( getBound()->isInBound(dNewValue)) 00053 { 00054 _dValue = dNewValue; 00055 } 00056 else throw ValueOutOfBoundException(getName(),dNewValue,_mBound->getLowerBound(),_mBound->getUpperBound(),"Variable::setValue(double dNewValue)",__FILE__,__LINE__); 00057 00058 }
Here is the call graph for this function: ![]() |
|
|
Definition at line 76 of file Variable.h. Referenced by getReferenceValue(). |
|
|
Definition at line 71 of file Variable.h. Referenced by getSimulatedValue(), and setSimulatedValue(). |
|
|
Definition at line 69 of file Variable.h. Referenced by getValue(), setUncheckValue(), and setValue(). |
|
|
Definition at line 74 of file Variable.h. Referenced by changeBound(), getBound(), printInfos(), setValue(), Variable(), and ~Variable(). |
|
|
Definition at line 67 of file Variable.h. |
1.4.5