Hopsan
|
Public Member Functions | |
ParameterEvaluator (const HString &rName, const HString &rValue, const HString &rDescription, const HString &rQuantity, const HString &rUnit, const HString &rType, const bool internal=false, void *pDataPtr=0, ParameterEvaluatorHandler *pParameterEvalHandler=0) | |
Constructor. | |
bool | setParameterValue (const HString &rValue, ParameterEvaluator **ppNeedEvaluation=0, bool force=false) |
Set the parameter value for an existing parameter. | |
bool | setParameter (const HString &rValue, const HString &rDescription, const HString &rQuantity, const HString &rUnit, const HString &rType, ParameterEvaluator **pNeedEvaluation=0, bool internal=false, bool force=false) |
bool | evaluate (HString &rResult) |
Evaluate the parameter. | |
bool | evaluate () |
Evaluate the parameter. | |
bool | refreshParameterValueText () |
void * | getDataPtr () |
Returns a pointer directly to the parameter data variable. | |
const HString & | getType () const |
Returns the type of the parameter. | |
const HString & | getName () const |
const HString & | getValue () const |
const HString & | getUnit () const |
const HString & | getDescription () const |
const HString & | getQuantity () const |
const std::vector< HString > & | getConditions () const |
bool | isInternal () const |
void | setTriggersReconfiguration () |
bool | triggersReconfiguration () |
Protected Member Functions | |
void | resolveSignPrefix (HString &rSignPrefix) const |
void | splitSignPrefix (const HString &rString, HString &rPrefix, HString &rValue) |
Protected Attributes | |
HString | mParameterName |
HString | mParameterValue |
HString | mDescription |
HString | mUnit |
HString | mQuantity |
HString | mType |
void * | mpData |
size_t | mDepthCounter |
ParameterEvaluatorHandler * | mpParameterEvaluatorHandler |
std::vector< HString > | mConditions |
bool | mInternal |
bool | mTriggersReconfiguration |
Friends | |
class | ParameterEvaluatorHandler |
ParameterEvaluator | ( | const HString & | rName, |
const HString & | rValue, | ||
const HString & | rDescription, | ||
const HString & | rQuantity, | ||
const HString & | rUnit, | ||
const HString & | rType, | ||
const bool | internal = false, | ||
void * | pDataPtr = 0, | ||
ParameterEvaluatorHandler * | pParameterEvalHandler = 0 ) |
Constructor.
[in] | rName | The desired parameter name, e.g. m |
[in] | rValue | The value of the parameter, always a string |
[in] | rDescription | The description of the parameter e.g. Mass |
[in] | rQuantity | The physical quantity of the parameter e.g. Mass |
[in] | rUnit | The physical unit of the parameter e.g. kg |
[in] | rType | The type of the parameter e.g. double |
[in] | pDataPtr | Only used by Components, system parameters don't use this, default: 0 |
[in] | pParentParameters | A pointer to the Parameters object that contains the Parameter |
bool evaluate | ( | ) |
Evaluate the parameter.
This function is used by Parameters. The point with run this function is to write the right value to the mData pointer.
bool evaluate | ( | HString & | rResult | ) |
Evaluate the parameter.
[out] | rResult | The result of the evaluation |
This function is used by Parameters
void * getDataPtr | ( | ) |
Returns a pointer directly to the parameter data variable.
const HString & getType | ( | ) | const |
Returns the type of the parameter.
bool setParameterValue | ( | const HString & | rValue, |
ParameterEvaluator ** | ppNeedEvaluation = 0, | ||
bool | force = false ) |
Set the parameter value for an existing parameter.
[in] | rValue | The new value for the parameter |
[out] | ppNeedEvaluation | Tell if the parameter needs evaluation, e.g. is a system parameter or an expression |
This function is used by Parameters