This is the base class for sets of ModelComponent subclasses. More...
#include <ModelComponentSet.h>
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. | |
Object * | copy () const |
Create a duplicate of this set. | |
const Model & | getModel () const |
Get this Model this set is part of. | |
Model & | updModel () |
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 | |
virtual void | setup (Model &model) |
Set the Model this object is part of. | |
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 |
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.
OpenSim::ModelComponentSet< T >::ModelComponentSet | ( | ) | [inline] |
OpenSim::ModelComponentSet< T >::ModelComponentSet | ( | Model & | model | ) | [inline] |
OpenSim::ModelComponentSet< T >::ModelComponentSet | ( | Model & | model, | |
const std::string & | aFileName, | |||
bool | aUpdateFromXMLNode = true | |||
) | [inline] |
Construct from file.
aFileName | Name of the file. |
OpenSim::ModelComponentSet< T >::ModelComponentSet | ( | const ModelComponentSet< T > & | aSet | ) | [inline] |
Copy constructor.
aSet | Set to be copied. |
bool OpenSim::ModelComponentSet< T >::append | ( | T & | aObject | ) | [inline] |
Reimplemented in OpenSim::ForceSet.
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.
Object* OpenSim::ModelComponentSet< T >::copy | ( | ) | const [inline, virtual] |
Create a duplicate of this set.
Reimplemented from OpenSim::Set< T >.
Reimplemented in OpenSim::ControllerSet, OpenSim::ExternalLoads, and OpenSim::ForceSet.
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.
const Model& OpenSim::ModelComponentSet< T >::getModel | ( | ) | const [inline] |
Get this Model this set is part of.
Reimplemented in OpenSim::ExternalLoads.
virtual void OpenSim::ModelComponentSet< T >::initState | ( | SimTK::State & | state | ) | const [inline, protected, virtual] |
Invoke initState() on each element of the Set.
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.
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 >.
virtual void OpenSim::ModelComponentSet< T >::setDefaultsFromState | ( | const SimTK::State & | state | ) | [inline, protected, virtual] |
Invoke setDefaultsFromState() on each element of the Set.
virtual void OpenSim::ModelComponentSet< T >::setup | ( | Model & | model | ) | [inline, protected, virtual] |
Set the Model this object is part of.
Reimplemented in OpenSim::BodySet, OpenSim::ConstraintSet, OpenSim::ContactGeometrySet, OpenSim::ControllerSet, OpenSim::CoordinateSet, OpenSim::ExternalLoads, and OpenSim::ForceSet.
Model& OpenSim::ModelComponentSet< T >::updModel | ( | ) | [inline] |
Get a modifiable reference to the Model this set is part of.
friend class Model [friend] |
Model* OpenSim::ModelComponentSet< T >::_model [protected] |