Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

SPARK::Variable::TInterface Class Reference

Base class for all interfaces to a SPARK::TVariable object. Read and write methods for the current values are provided as protected methods to can be used in the derived classes to implement the proper behavior for each type of interface. More...

#include <variable.h>

Inheritance diagram for SPARK::Variable::TInterface:

Inheritance graph
[legend]
Collaboration diagram for SPARK::Variable::TInterface:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Structors
 TInterface ()
 Default constructor.

 TInterface (SPARK::TVariable *variable)
 Normal constructor using a pointer to a SPARK::TVariable object.

 TInterface (const TInterface &interf)
 Copy constructor.

virtual ~TInterface () throw ()
 Destructor.

Restricted access methods for variable properties
unsigned GetHandle () const
 Returns the unique handle as unsigned.

SPARK::VariableTypes GetType () const
 Returns the variable type as SPARK::VariableTypes.

unsigned GetFlag () const
 Returns internal flag.

double GetPastValue (unsigned idx) const
 Returns the past value from idx steps ago.

double operator[] (unsigned idx) const
 Returns the past value from idx steps ago.

const std::string & GetName () const
 Returns the variable name of the underlying SPARK::TVariable object as const std::string&.

const std::string & GetUnit () const
 Returns the variable unit string of the underlying SPARK::TVariable object as const std::string&.

void SetUnit (const char *unit)
 Sets the unit string for the underlying variable.

double GetInit () const
 Returns the inital value of the underlying SPARK::TVariable object as double.

void SetInit (double init)
 Sets the initial value to init.

double GetMin () const
 Returns the minimum value of the underlying SPARK::TVariable object as double.

void SetMin (double min)
 Sets the minimum value to min.

double GetMax () const
 Returns the maximum value of the underlying SPARK::TVariable object as double.

void SetMax (double max)
 Sets the maximum value to max.

double GetAbsTolerance () const
 Returns the absolute tolerance of the underlying SPARK::TVariable object as double.

void SetAbsTolerance (double atol)
 Sets the absolute tolerance to atol.

double GetScale () const
 Returns the current scale.

const char * GetReadUrlString () const
 Returns Read URL string.

int GetReadUrlHandle () const
 Returns Read URL handle.

const char * GetWriteUrlString () const
 Returns Write URL string.

int GetWriteUrlHandle () const
 Returns Write URL handle.

Predicate methods
IO methods
void Write (std::ostream &os) const
 Writes the variable name, unit and current value to the output stream os.


Protected Member Functions

SPARK::TVariableGetVariable ()
 Returns underlying pointer.

void SetValue (double scalar)
 Sets the current value to scalar.

double GetValue () const
 Allows implicit conversion to double by returning the current value.

void SetTarget (double scalar)
 Sets the current target value to scalar.

double GetTarget () const
 Returns value from evaluating the matched object (used by TEquationSystem and TJacobian internally).

double GetArgument () const
 Returns the current argument value as a double.

double GetInnerValue (unsigned innerStep) const
 Returns the inner value for innerStep.

void Bind (SPARK::TVariable *variable)
 Used by derived classes if required (see TUnknown).


Detailed Description

Base class for all interfaces to a SPARK::TVariable object. Read and write methods for the current values are provided as protected methods to can be used in the derived classes to implement the proper behavior for each type of interface.


Constructor & Destructor Documentation

SPARK::Variable::TInterface::TInterface  ) 
 

Default constructor.

SPARK::Variable::TInterface::TInterface SPARK::TVariable variable  )  [explicit]
 

Normal constructor using a pointer to a SPARK::TVariable object.

SPARK::Variable::TInterface::TInterface const TInterface interf  ) 
 

Copy constructor.

virtual SPARK::Variable::TInterface::~TInterface  )  throw () [inline, virtual]
 

Destructor.


Member Function Documentation

unsigned SPARK::Variable::TInterface::GetHandle  )  const
 

Returns the unique handle as unsigned.

SPARK::VariableTypes SPARK::Variable::TInterface::GetType  )  const
 

Returns the variable type as SPARK::VariableTypes.

unsigned SPARK::Variable::TInterface::GetFlag  )  const
 

Returns internal flag.

double SPARK::Variable::TInterface::GetPastValue unsigned  idx  )  const
 

Returns the past value from idx steps ago.

double SPARK::Variable::TInterface::operator[] unsigned  idx  )  const [inline]
 

Returns the past value from idx steps ago.

const std::string& SPARK::Variable::TInterface::GetName  )  const
 

Returns the variable name of the underlying SPARK::TVariable object as const std::string&.

const std::string& SPARK::Variable::TInterface::GetUnit  )  const
 

Returns the variable unit string of the underlying SPARK::TVariable object as const std::string&.

void SPARK::Variable::TInterface::SetUnit const char *  unit  ) 
 

Sets the unit string for the underlying variable.

double SPARK::Variable::TInterface::GetInit  )  const
 

Returns the inital value of the underlying SPARK::TVariable object as double.

void SPARK::Variable::TInterface::SetInit double  init  ) 
 

Sets the initial value to init.

double SPARK::Variable::TInterface::GetMin  )  const
 

Returns the minimum value of the underlying SPARK::TVariable object as double.

void SPARK::Variable::TInterface::SetMin double  min  ) 
 

Sets the minimum value to min.

double SPARK::Variable::TInterface::GetMax  )  const
 

Returns the maximum value of the underlying SPARK::TVariable object as double.

void SPARK::Variable::TInterface::SetMax double  max  ) 
 

Sets the maximum value to max.

double SPARK::Variable::TInterface::GetAbsTolerance  )  const
 

Returns the absolute tolerance of the underlying SPARK::TVariable object as double.

void SPARK::Variable::TInterface::SetAbsTolerance double  atol  ) 
 

Sets the absolute tolerance to atol.

double SPARK::Variable::TInterface::GetScale  )  const
 

Returns the current scale.

const char* SPARK::Variable::TInterface::GetReadUrlString  )  const
 

Returns Read URL string.

int SPARK::Variable::TInterface::GetReadUrlHandle  )  const
 

Returns Read URL handle.

const char* SPARK::Variable::TInterface::GetWriteUrlString  )  const
 

Returns Write URL string.

int SPARK::Variable::TInterface::GetWriteUrlHandle  )  const
 

Returns Write URL handle.

void SPARK::Variable::TInterface::Write std::ostream &  os  )  const
 

Writes the variable name, unit and current value to the output stream os.

SPARK::TVariable* SPARK::Variable::TInterface::GetVariable  )  [inline, protected]
 

Returns underlying pointer.

void SPARK::Variable::TInterface::SetValue double  scalar  )  [protected]
 

Sets the current value to scalar.

double SPARK::Variable::TInterface::GetValue  )  const [protected]
 

Allows implicit conversion to double by returning the current value.

void SPARK::Variable::TInterface::SetTarget double  scalar  )  [protected]
 

Sets the current target value to scalar.

double SPARK::Variable::TInterface::GetTarget  )  const [protected]
 

Returns value from evaluating the matched object (used by TEquationSystem and TJacobian internally).

Reimplemented in SPARK::TUnknown.

double SPARK::Variable::TInterface::GetArgument  )  const [protected]
 

Returns the current argument value as a double.

double SPARK::Variable::TInterface::GetInnerValue unsigned  innerStep  )  const [protected]
 

Returns the inner value for innerStep.

void SPARK::Variable::TInterface::Bind SPARK::TVariable variable  )  [protected]
 

Used by derived classes if required (see TUnknown).


The documentation for this class was generated from the following file:

Generated on 5 Nov 2003 for VisualSPARK 2.01