OpenSim::PerturbationTool Class Reference

An abstract class for specifying the interface for an investigation. More...

#include <PerturbationTool.h>

Inheritance diagram for OpenSim::PerturbationTool:
OpenSim::ForwardTool OpenSim::AbstractTool OpenSim::Object

List of all members.

Public Member Functions

 PerturbationTool ()
 Default constructor.
 PerturbationTool (const std::string &aFileName, bool aUpdateFromXMLNode=true, bool aLoadModel=true)
virtual ~PerturbationTool ()
 Destructor.
 PerturbationTool (const PerturbationTool &aObject)
 Copy constructor.
virtual Objectcopy () const
 Virtual copy constructor.
PerturbationTooloperator= (const PerturbationTool &aPerturbationTool)
 Assignment operator.
virtual void updateFromXMLNode ()
 Override default implementation by object to intercept and fix the XML node underneath the tool to match current version.
virtual bool run () SWIG_DECLARE_EXCEPTION
 Run the investigation.
virtual void printResults (const std::string &aBaseName, const std::string &aDir="", double aDT=-1.0, const std::string &aExtension=".sto")
 Print the results of the analysis.

Detailed Description

An abstract class for specifying the interface for an investigation.

Author:
Frank C. Anderson
Version:
1.0

Constructor & Destructor Documentation

PerturbationTool::PerturbationTool (  ) 

Default constructor.

OpenSim::PerturbationTool::PerturbationTool ( const std::string &  aFileName,
bool  aUpdateFromXMLNode = true,
bool  aLoadModel = true 
)
PerturbationTool::~PerturbationTool (  )  [virtual]

Destructor.

PerturbationTool::PerturbationTool ( const PerturbationTool aTool  ) 

Copy constructor.

Copy constructors for all Tools only copy the non-XML variable members of the object; that is, the object's DOMnode and XMLDocument are not copied but set to NULL. The reason for this is that for the object and all its derived classes to establish the correct connection to the XML document nodes, the the object would need to reconstruct based on the XML document not the values of the object's member variables.

There are three proper ways to generate an XML document for an Tool:

1) Construction based on XML file (

See also:
Tool(const char *aFileName)). In this case, the XML document is created by parsing the XML file.

2) Construction by Tool(const XMLDocument *aDocument). This constructor explictly requests construction based on an XML document. In this way the proper connection between an object's node and the corresponding node within the XML document is established. This constructor is a copy constructor of sorts because all essential Tool member variables should be held within the XML document. The advantage of this style of construction is that nodes within the XML document, such as comments that may not have any associated Tool member variable, are preserved.

3) A call to generateXMLDocument(). This method generates an XML document for the Tool from scratch. Only the essential document nodes are created (that is, nodes that correspond directly to member variables.).

Parameters:
aTool Object to be copied.
See also:
Tool(const XMLDocument *aDocument)
Tool(const char *aFileName)
generateXMLDocument()

Member Function Documentation

Object * PerturbationTool::copy (  )  const [virtual]

Virtual copy constructor.

Reimplemented from OpenSim::ForwardTool.

PerturbationTool & PerturbationTool::operator= ( const PerturbationTool aTool  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::ForwardTool.

virtual void OpenSim::PerturbationTool::printResults ( const std::string &  aBaseName,
const std::string &  aDir = "",
double  aDT = -1.0,
const std::string &  aExtension = ".sto" 
) [virtual]

Print the results of the analysis.

Parameters:
aFileName File to which to print the data.
aDT Time interval between results (linear interpolation is used). If not included as an argument or negative, all time steps are printed without interpolation.
aExtension Extension for written files.

Reimplemented from OpenSim::AbstractTool.

bool PerturbationTool::run (  )  [virtual]

Run the investigation.

Reimplemented from OpenSim::ForwardTool.

virtual void OpenSim::PerturbationTool::updateFromXMLNode (  )  [inline, virtual]

Override default implementation by object to intercept and fix the XML node underneath the tool to match current version.

Reimplemented from OpenSim::ForwardTool.


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

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