OpenSim::Constant Class Reference

A class for representing a constant value. More...

#include <Constant.h>

Inheritance diagram for OpenSim::Constant:
OpenSim::Function OpenSim::Object

List of all members.

Public Member Functions

 Constant ()
 Default constructor.
 Constant (double value)
 Constant (const Constant &aSpline)
 Copy constructor.
virtual ~Constant ()
 Destructor.
virtual Objectcopy () const
 Copy this object.
Constantoperator= (const Constant &aConstant)
 Assignment operator.
void setValue (double aValue)
virtual double calcValue (const SimTK::Vector &xUnused) const
 Calculate the value of this function at a particular point.
const double getValue () const
SimTK::Function * createSimTKFunction () const
 OPENSIM_DECLARE_DERIVED (Constant, Function)

Protected Attributes

PropertyDbl _valueProp
double & _value

Detailed Description

A class for representing a constant value.

This class inherits from Function and so can be used as input to any class requiring a Fuction as input.

Author:
Peter Loan, Ajay Seth
Version:
1.0

Constructor & Destructor Documentation

Constant::Constant (  ) 

Default constructor.

Constant::Constant ( double  value  ) 
Constant::Constant ( const Constant aConstant  ) 

Copy constructor.

All data members of the specified Constant are copied.

Parameters:
aConstant Constant object to be copied.
Constant::~Constant (  )  [virtual]

Destructor.


Member Function Documentation

virtual double OpenSim::Constant::calcValue ( const SimTK::Vector &  x  )  const [inline, virtual]

Calculate the value of this function at a particular point.

Parameters:
x the Vector of input arguments. Its size must equal the value returned by getArgumentSize().

Reimplemented from OpenSim::Function.

Object * Constant::copy (  )  const [virtual]

Copy this object.

Returns:
Pointer to a copy of this object.

Implements OpenSim::Function.

SimTK::Function * Constant::createSimTKFunction (  )  const [virtual]

Implements OpenSim::Function.

const double OpenSim::Constant::getValue (  )  const [inline]
OpenSim::Constant::OPENSIM_DECLARE_DERIVED ( Constant  ,
Function   
)
Constant & Constant::operator= ( const Constant aConstant  ) 

Assignment operator.

Note that data members of the base class are also assigned.

Parameters:
aConstant Constant to be copied.
Returns:
Reference to this object.

Reimplemented from OpenSim::Function.

void Constant::setValue ( double  aValue  ) 

Member Data Documentation

double& OpenSim::Constant::_value [protected]

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

Generated on Wed Dec 16 15:03:40 2009 for OpenSim by  doxygen 1.6.1