A Tool is an OpenSim abstraction that encapsulates an analysis or series of modeling and analysis steps. More...
#include <Tool.h>
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. | |
Tool & | operator= (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. |
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.
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.
aFileName | File name of the document. |
OpenSim::Tool::Tool | ( | const Tool & | aTool | ) | [inline] |
Copy constructor.
aTool | to be copied. |
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.
Assignment operator.
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] |
std::string& OpenSim::Tool::_inputsDir [protected] |
PropertyStr OpenSim::Tool::_inputsDirProp [protected] |
Directory for reading inputs (model, settings, etc.
..) from.
std::string& OpenSim::Tool::_resultsDir [protected] |
PropertyStr OpenSim::Tool::_resultsDirProp [protected] |
Directory for writing results (new model, states, etc.
..) to.
VerboseLevel OpenSim::Tool::_verboseLevel [protected] |
How much details to put out while running.