![]() |
Parasol Planning Library (PPL)
|
#include <MPTools.h>
Public Member Functions | |||
Construction | |||
MPToolsType (MPLibrary *const _library) | |||
void | ParseXML (XMLNode &_node) | ||
void | Initialize () | ||
Initialize the clearance and MA tools prior to use. More... | |||
void | Uninitialize () | ||
Uninitialize the clearance and MA tools. More... | |||
~MPToolsType () | |||
Clearance Utility | |||
ClearanceUtility * | GetClearanceUtility (const std::string &_label) const | ||
void | SetClearanceUtility (const std::string &_label, ClearanceUtility *const _utility) | ||
Medial Axis Utility | |||
MedialAxisUtility * | GetMedialAxisUtility (const std::string &_label) const | ||
void | SetMedialAxisUtility (const std::string &_label, MedialAxisUtility *const _utility) | ||
Skeleton Clearance Utility | |||
SkeletonClearanceUtility * | GetSkeletonClearanceUtility (const std::string &_label) const | ||
void | SetSkeletonClearanceUtility (const std::string &_label, SkeletonClearanceUtility *const _utility) | ||
Topological Map | |||
TopologicalMap * | GetTopologicalMap (const std::string &_label) const | ||
void | SetTopologicalMap (const std::string &_label, TopologicalMap *const _utility) | ||
Safe Interval Tool | |||
SafeIntervalTool * | GetSafeIntervalTool (const std::string &_label) const | ||
void | SetSafeIntervalTool (const std::string &_label, SafeIntervalTool *const _utility) | ||
Decompositions | |||
const WorkspaceDecomposition * | GetDecomposition (const std::string &_label) | ||
void | SetDecomposition (const std::string &_label, const WorkspaceDecomposition *_decomposition) | ||
Reachability | |||
ReachabilityUtil * | GetReachabilityUtil (const std::string &_label) const | ||
void | SetReachabilityUtil (const std::string &_label, ReachabilityUtil *_util) | ||
Point Construction | |||
PointConstruction * | GetPointConstruction (const std::string &_label) const | ||
void | SetPointConstruction (const std::string &_label, PointConstruction *_util) | ||
Wrench Accessibility Tool | |||
Get a WrenchAccessibilityTool by label.
| |||
WrenchAccessibilityTool * | GetWrenchAccessibilityTool (const std::string &_label) const | ||
void | SetWrenchAccessibilityTool (const std::string &_label, WrenchAccessibilityTool *const _utility) | ||
This class is a general tool box for stateful objects that don't belong elsewhere. It gives us a way to do XML parsing and uniform access for these odd-balls like medial axis tools.
For most utilities, this object creates and maintains a map of string -> instance. One instance will be generated for each MedialAxisUtility node in the XML file (with corresponding label). Instances can also be added manually with the Set functions.
For the other tools, this object parses a single XML node to set default parameters for the tool classes. Default-constructed tools then use those values. This effectively uses the XML to set default parameters so that we don't have to create an instance of the tool right away (or at all) in order to parse the input file. For these, there is no label attribute, and using multiple XML nodes will throw a parse error.
MPToolsType::MPToolsType | ( | MPLibrary *const | _library | ) |
Construct a tool set.
_library | The owning library. |
MPToolsType::~MPToolsType | ( | ) |
ClearanceUtility * MPToolsType::GetClearanceUtility | ( | const std::string & | _label | ) | const |
Get a ClearanceUtility by label.
_label | The string label of the desired utility as defined in the XML file. |
const WorkspaceDecomposition * MPToolsType::GetDecomposition | ( | const std::string & | _label | ) |
Get a decomposition.
_label | The label of the decomposition to use. |
MedialAxisUtility * MPToolsType::GetMedialAxisUtility | ( | const std::string & | _label | ) | const |
Get a MedialAxisUtility by label.
_label | The string label of the desired utility as defined in the XML file. |
PointConstruction * MPToolsType::GetPointConstruction | ( | const std::string & | _label | ) | const |
Get a Point Construction
_label | The label of the decomposition to use. |
ReachabilityUtil * MPToolsType::GetReachabilityUtil | ( | const std::string & | _label | ) | const |
Get a Reachability Utility
_label | The label of the decomposition to use. |
SafeIntervalTool * MPToolsType::GetSafeIntervalTool | ( | const std::string & | _label | ) | const |
Get a SafeIntervalTool by label.
_label | The string label of the desired utility as defined in the XML file. |
SkeletonClearanceUtility * MPToolsType::GetSkeletonClearanceUtility | ( | const std::string & | _label | ) | const |
Get a SkeletonClearanceUtility by label.
_label | The string label of the desired utility as defined in the XML file. |
TopologicalMap * MPToolsType::GetTopologicalMap | ( | const std::string & | _label | ) | const |
Get a TopologicalMap by label.
_label | The string label of the desired utility as defined in the XML file. |
WrenchAccessibilityTool * MPToolsType::GetWrenchAccessibilityTool | ( | const std::string & | _label | ) | const |
void MPToolsType::Initialize | ( | ) |
Initialize the clearance and MA tools prior to use.
void MPToolsType::ParseXML | ( | XMLNode & | _node | ) |
Parse an XML node.
_node | The XML node object. |
void MPToolsType::SetClearanceUtility | ( | const std::string & | _label, |
ClearanceUtility *const | _utility | ||
) |
Set a ClearanceUtility. This object will take ownership of the utility and delete it when necessary.
_label | The string label for the new utility. |
_utility | The ClearanceUtility to use. |
void MPToolsType::SetDecomposition | ( | const std::string & | _label, |
const WorkspaceDecomposition * | _decomposition | ||
) |
Set a workspace decomposition by label. This object will take ownership the decomposition and delete it when necessary.
_label | The label for this decomposition. |
_decomposition | The decomposition object to set. |
void MPToolsType::SetMedialAxisUtility | ( | const std::string & | _label, |
MedialAxisUtility *const | _utility | ||
) |
Set a MedialAxisUtility. This object will take ownership of the utility and delete it when necessary.
_label | The string label for the new utility. |
_utility | The MedialAxisUtility to use. |
void MPToolsType::SetPointConstruction | ( | const std::string & | _label, |
PointConstruction * | _util | ||
) |
Set a Point Construction by label.
_label | The label for this utility |
_decomposition | the point construction |
void MPToolsType::SetReachabilityUtil | ( | const std::string & | _label, |
ReachabilityUtil * | _util | ||
) |
Set a reachability utility by label.
_label | The label for this utility |
_decomposition | the reachability utility |
void MPToolsType::SetSafeIntervalTool | ( | const std::string & | _label, |
SafeIntervalTool *const | _utility | ||
) |
Set a SafeIntervalTool. This object will take ownership of the utility and delete it when necessary.
_label | The string label for the new utility. |
_utility | The TopologicalMap to use. |
void MPToolsType::SetSkeletonClearanceUtility | ( | const std::string & | _label, |
SkeletonClearanceUtility *const | _utility | ||
) |
Set a SkeletonClearanceUtility. This object will take ownership of the utility and delete it when necessary.
_label | The string label for the new utility. |
_utility | The SkeletonClearanceUtility to use. |
void MPToolsType::SetTopologicalMap | ( | const std::string & | _label, |
TopologicalMap *const | _utility | ||
) |
Set a TopologicalMap. This object will take ownership of the utility and delete it when necessary.
_label | The string label for the new utility. |
_utility | The TopologicalMap to use. |
void MPToolsType::SetWrenchAccessibilityTool | ( | const std::string & | _label, |
WrenchAccessibilityTool *const | _utility | ||
) |
Set a WrenchAccessibilityTool. This object will take ownership of the utility and delete it when necessary.
_label | The string label for the new utility. |
_utility | The GetWrenchAccessibilityTool to use. |
void MPToolsType::Uninitialize | ( | ) |
Uninitialize the clearance and MA tools.