Parasol Planning Library (PPL)
|
#include <MethodSet.h>
Public Types | |
Local Types | |
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 |
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. More... | |
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. More... | |
Iteration | |
Iterate over the instantiated methods. | |
iterator | begin () noexcept |
iterator | end () noexcept |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
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'.
typedef MethodMap::const_iterator MethodSet< Method >::const_iterator |
typedef std::map<std::string, FactoryType> MethodSet< Method >::FactoryMap |
typedef std::function<OwningPointer(XMLNode&)> MethodSet< Method >::FactoryType |
typedef std::map<std::string, OwningPointer> MethodSet< Method >::MethodMap |
typedef Method* MethodSet< Method >::MethodPointer |
typedef std::shared_ptr<Method> MethodSet< Method >::OwningPointer |
void MethodSet< Method >::AddMethod | ( | MethodPointer | _e, |
const std::string & | _label | ||
) |
void MethodSet< Method >::AddMethod | ( | OwningPointer | _e, |
const std::string & | _label | ||
) |
|
inlinenoexcept |
|
inlinenoexcept |
MethodSet< Method >::MethodPointer MethodSet< Method >::GetMethod | ( | const std::string & | _label | ) |
Get a method by label.
_label | The method label. |
void MethodSet< Method >::Initialize |
Add the appropriate methods from an XML node.
void MethodSet< Method >::Print | ( | std::ostream & | _os | ) | const |
Display the instantiated methods.