PPL API Reference |
|
---|
Public Member Functions | |
Construction | |
template<typename MethodTypeList > | |
MethodSet (MPLibrary *const _p, const MethodTypeList &_mtl, const std::string &_name) | |
Method Accessors | |
void | ParseXML (XMLNode &_node) |
Add the appropriate methods from an XML node. | |
void | AddMethod (XMLNode &_node) |
void | AddMethod (MethodPointer _e, const std::string &_label) |
void | AddMethod (OwningPointer _e, const std::string &_label) |
MethodPointer | GetMethod (const std::string &_label) |
void | Initialize () |
void | Print (std::ostream &_os) const |
Display the instantiated methods. | |
Iteration | |
Iterate over the instantiated methods. | |
iterator | begin () noexcept |
iterator | end () noexcept |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
Public Types | |
Local Types | |
typedef MPTraits::MPLibrary | MPLibrary |
typedef Method * | MethodPointer |
typedef std::shared_ptr< Method > | OwningPointer |
typedef std::map< std::string, OwningPointer > | MethodMap |
typedef std::function< OwningPointer(XMLNode &)> | FactoryType |
typedef std::map< std::string, FactoryType > | FactoryMap |
typedef MethodMap::iterator | iterator |
typedef MethodMap::const_iterator | const_iterator |
Defines basic method container class to hold methods (for classes like DistanceMetricMethod, LocalPlannerMethod, etc).
MethodTypeList must be defined within templated class of MPTraits e.g., Method = NeighborhoodFinderMethod MethodTypeList = boost::mpl::list<BruteForceNF, BandsNF, ...> e.g., Method = LocalPlannerMethod MethodTypeList = boost::mpl::list<Straightline, RotateAtS, ...>
MethodSet first parses the MethodTypeList and adds all enumerated methods to its universe of method types. Then, specific instantiations of those types can be added to its map of available methods by calling 'AddMethod'.
MethodSet< MPTraits, Method >::MethodSet | ( | MPLibrary *const | _p, |
const MethodTypeList & | _mtl, | ||
const std::string & | _name | ||
) |
MethodSet< MPTraits, Method >::MethodPointer MethodSet< MPTraits, Method >::GetMethod | ( | const std::string & | _label | ) |
Get a method by label.
_label | The method label. |
Prepare all methods in this set for execution on the owning MPLibrary's current MPProblem.