OpenSim::ModelComponentSet< T > Class Template Reference

This is the base class for sets of ModelComponent subclasses. More...

#include <ModelComponentSet.h>

Inheritance diagram for OpenSim::ModelComponentSet< T >:
OpenSim::Set< T > OpenSim::Object

List of all members.

Public Member Functions

 ModelComponentSet ()
 ModelComponentSet (Model &model)
 ModelComponentSet (Model &model, const std::string &aFileName, bool aUpdateFromXMLNode=true)
 Construct from file.
 ModelComponentSet (const ModelComponentSet< T > &aSet)
 Copy constructor.
Objectcopy () const
 Create a duplicate of this set.
const ModelgetModel () const
 Get this Model this set is part of.
ModelupdModel ()
 Get a modifiable reference to the Model this set is part of.
bool append (T *aObject)
 Adding an object to the set causes its Model field to be set.
bool append (T &aObject)
bool insert (int aIndex, T *aObject)
 Adding an object to the set causes its Model field to be set.
bool set (int aIndex, T *aObject, bool preserveGroups=false)
 Adding an object to the set causes its Model field to be set.

Protected Member Functions

void setModel (Model &model)
 Set the Model this object is part of.
virtual void setupFromXML ()
 Invoke setupFromXML() on each element of the Set.
virtual void createSystem (SimTK::MultibodySystem &system) const
 Invoke createSystem() on each element of the Set.
virtual void initState (SimTK::State &state) const
 Invoke initState() on each element of the Set.
virtual void setDefaultsFromState (const SimTK::State &state)
 Invoke setDefaultsFromState() on each element of the Set.

Protected Attributes

Model_model

Friends

class Model

Detailed Description

template<class T>
class OpenSim::ModelComponentSet< T >

This is the base class for sets of ModelComponent subclasses.

It provides methods for invoking all of the ModelComponent methods on each member of the set.


Constructor & Destructor Documentation

template<class T>
OpenSim::ModelComponentSet< T >::ModelComponentSet (  )  [inline]
template<class T>
OpenSim::ModelComponentSet< T >::ModelComponentSet ( Model model  )  [inline]
template<class T>
OpenSim::ModelComponentSet< T >::ModelComponentSet ( Model model,
const std::string &  aFileName,
bool  aUpdateFromXMLNode = true 
) [inline]

Construct from file.

Parameters:
aFileName Name of the file.
template<class T>
OpenSim::ModelComponentSet< T >::ModelComponentSet ( const ModelComponentSet< T > &  aSet  )  [inline]

Copy constructor.

Parameters:
aSet Set to be copied.

Member Function Documentation

template<class T>
bool OpenSim::ModelComponentSet< T >::append ( T &  aObject  )  [inline]
template<class T>
bool OpenSim::ModelComponentSet< T >::append ( T *  aObject  )  [inline, virtual]

Adding an object to the set causes its Model field to be set.

Reimplemented from OpenSim::Set< T >.

Reimplemented in OpenSim::ForceSet.

template<class T>
Object* OpenSim::ModelComponentSet< T >::copy (  )  const [inline, virtual]

Create a duplicate of this set.

Reimplemented from OpenSim::Set< T >.

Reimplemented in OpenSim::ControllerSet, and OpenSim::ForceSet.

template<class T>
virtual void OpenSim::ModelComponentSet< T >::createSystem ( SimTK::MultibodySystem &  system  )  const [inline, protected, virtual]

Invoke createSystem() on each element of the Set.

Reimplemented in OpenSim::JointSet.

template<class T>
const Model& OpenSim::ModelComponentSet< T >::getModel (  )  const [inline]

Get this Model this set is part of.

template<class T>
virtual void OpenSim::ModelComponentSet< T >::initState ( SimTK::State &  state  )  const [inline, protected, virtual]

Invoke initState() on each element of the Set.

template<class T>
bool OpenSim::ModelComponentSet< T >::insert ( int  aIndex,
T *  aObject 
) [inline, virtual]

Adding an object to the set causes its Model field to be set.

Reimplemented from OpenSim::Set< T >.

Reimplemented in OpenSim::ForceSet.

template<class T>
bool OpenSim::ModelComponentSet< T >::set ( int  aIndex,
T *  aObject,
bool  preserveGroups = false 
) [inline, virtual]

Adding an object to the set causes its Model field to be set.

Reimplemented from OpenSim::Set< T >.

template<class T>
virtual void OpenSim::ModelComponentSet< T >::setDefaultsFromState ( const SimTK::State &  state  )  [inline, protected, virtual]

Invoke setDefaultsFromState() on each element of the Set.

template<class T>
void OpenSim::ModelComponentSet< T >::setModel ( Model model  )  [inline, protected]

Set the Model this object is part of.

template<class T>
virtual void OpenSim::ModelComponentSet< T >::setupFromXML (  )  [inline, protected, virtual]

Invoke setupFromXML() on each element of the Set.

template<class T>
Model& OpenSim::ModelComponentSet< T >::updModel (  )  [inline]

Get a modifiable reference to the Model this set is part of.


Friends And Related Function Documentation

template<class T>
friend class Model [friend]

Member Data Documentation

template<class T>
Model* OpenSim::ModelComponentSet< T >::_model [protected]

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

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