Simbody  3.4 (development)
SimTK::Measure_< T >::Constant Class Reference

This creates a Measure whose value is a Topology-stage constant of any type T. More...

#include <Measure.h>

+ Inheritance diagram for SimTK::Measure_< T >::Constant:

List of all members.

Classes

class  Implementation

Public Member Functions

 SimTK_MEASURE_HANDLE_PREAMBLE (Constant, Measure_< T >)
 Constant (const T &value)
 Create a constant measure that is not part of any Subsystem, and provide the constant value.
 Constant (Subsystem &sub, const T &value)
 Create a constant measure with the given value and install it into the given Subsystem.
ConstantsetValue (const T &value)
 Change the value returned by this Measure.
 SimTK_MEASURE_HANDLE_POSTSCRIPT (Constant, Measure_< T >)

Detailed Description

template<class T>
class SimTK::Measure_< T >::Constant

This creates a Measure whose value is a Topology-stage constant of any type T.

This does not have to be part of a Subsystem, but if it is then changing the constant's value invalidates the containing Subsystem's Topology.

Template Parameters:
TThis can be any type that supports copy construction.

Constructor & Destructor Documentation

template<class T>
SimTK::Measure_< T >::Constant::Constant ( const T &  value) [inline, explicit]

Create a constant measure that is not part of any Subsystem, and provide the constant value.

template<class T>
SimTK::Measure_< T >::Constant::Constant ( Subsystem sub,
const T &  value 
) [inline]

Create a constant measure with the given value and install it into the given Subsystem.


Member Function Documentation

template<class T>
SimTK::Measure_< T >::Constant::SimTK_MEASURE_HANDLE_PREAMBLE ( Constant  ,
Measure_< T >   
)
template<class T>
Constant& SimTK::Measure_< T >::Constant::setValue ( const T &  value) [inline]

Change the value returned by this Measure.

Note that this does not require a State since it is a Topology-stage change.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines