OpenSim::Tool Class Reference

A Tool is an OpenSim abstraction that encapsulates an analysis or series of modeling and analysis steps. More...

#include <Tool.h>

Inheritance diagram for OpenSim::Tool:
OpenSim::Object OpenSim::DynamicsTool OpenSim::InverseKinematicsTool OpenSim::InverseDynamicsTool

List of all members.

Public Types

enum  VerboseLevel { Quiet = 0, Progress = 1, DetailedProgress = 2, Debug = 3 }
 

Perturbation types.

More...

Public Member Functions

virtual ~Tool ()
 Destructor.
 Tool ()
 Default constructor.
 Tool (const std::string &aFileName, bool aUpdateFromXMLNode=true)
 Construct from file.
 Tool (const Tool &aTool)
 Copy constructor.
Tooloperator= (const Tool &aTool)
 Assignment operator.
virtual bool run () SWIG_DECLARE_EXCEPTION=0
 The run() method of a Tool embodies what would be the main() routine for a standalone program.
const std::string & getInputsDir () const
 Get/set Inputs Directory.
void setInputsDir (const std::string &aString)
const std::string & getResultsDir () const
 Get/set Results Directory.
void setResultsDir (const std::string &aString)
const VerboseLevel getVerboseLevel () const
 Get/Set verbose level.
void setVerboseLevel (const VerboseLevel aVerboseLevel)

Protected Attributes

PropertyStr _inputsDirProp
 Directory for reading inputs (model, settings, etc.
std::string & _inputsDir
PropertyStr _resultsDirProp
 Directory for writing results (new model, states, etc.
std::string & _resultsDir
VerboseLevel _verboseLevel
 How much details to put out while running.

Detailed Description

A Tool is an OpenSim abstraction that encapsulates an analysis or series of modeling and analysis steps.

Its primary duty is to provide an interface for use by the GUI or as a standalone command line executable. It includes common methods for invoking the tool and performing routine I/O.

Author:
Ajay Seth
Version:
1.0

Member Enumeration Documentation

Perturbation types.

See setPerturbation().

Enumerator:
Quiet 
Progress 
DetailedProgress 
Debug 

Constructor & Destructor Documentation

virtual OpenSim::Tool::~Tool (  )  [inline, virtual]

Destructor.

OpenSim::Tool::Tool (  )  [inline]

Default constructor.

OpenSim::Tool::Tool ( const std::string &  aFileName,
bool  aUpdateFromXMLNode = true 
) [inline]

Construct from file.

The object is constructed from the root element of the XML document. The type of object is the tag name of the XML root element.

Parameters:
aFileName File name of the document.
OpenSim::Tool::Tool ( const Tool aTool  )  [inline]

Copy constructor.

Parameters:
aTool to be copied.

Member Function Documentation

const std::string& OpenSim::Tool::getInputsDir (  )  const [inline]

Get/set Inputs Directory.

const std::string& OpenSim::Tool::getResultsDir (  )  const [inline]

Get/set Results Directory.

const VerboseLevel OpenSim::Tool::getVerboseLevel (  )  const [inline]

Get/Set verbose level.

Tool& OpenSim::Tool::operator= ( const Tool aTool  )  [inline]

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Object.

Reimplemented in OpenSim::DynamicsTool, OpenSim::InverseDynamicsTool, and OpenSim::InverseKinematicsTool.

virtual bool OpenSim::Tool::run (  )  [pure virtual]

The run() method of a Tool embodies what would be the main() routine for a standalone program.

Therefore, any OpenSim main program can become a Tool executable from the GUI by making it a run() method for a new Tool.

It is expected that the run() method be composed of a sequence of calls to underlying computational and reporting objects and should

Implemented in OpenSim::DynamicsTool, OpenSim::InverseDynamicsTool, and OpenSim::InverseKinematicsTool.

void OpenSim::Tool::setInputsDir ( const std::string &  aString  )  [inline]
void OpenSim::Tool::setResultsDir ( const std::string &  aString  )  [inline]
void OpenSim::Tool::setVerboseLevel ( const VerboseLevel  aVerboseLevel  )  [inline]

Member Data Documentation

std::string& OpenSim::Tool::_inputsDir [protected]

Directory for reading inputs (model, settings, etc.

..) from.

std::string& OpenSim::Tool::_resultsDir [protected]

Directory for writing results (new model, states, etc.

..) to.

How much details to put out while running.


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

Generated on Sun Sep 25 00:20:07 2011 for OpenSim by  doxygen 1.6.1