PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
MethodSet< MPTraits, Method > Class Template Referencefinal

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
 

Detailed Description

template<typename MPTraits, typename Method>
class MethodSet< MPTraits, Method >

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'.

Constructor & Destructor Documentation

◆ MethodSet()

template<typename MPTraits , typename Method >
template<typename MethodTypeList >
MethodSet< MPTraits, Method >::MethodSet ( MPLibrary *const  _p,
const MethodTypeList &  _mtl,
const std::string &  _name 
)

Construct a MethodSet from a MethodTypeList defined in the MPTraits class.

Parameters
_mtlAn instance of the method type list.
_nameThe name of this method set.

Member Function Documentation

◆ GetMethod()

template<typename MPTraits , typename Method >
MethodSet< MPTraits, Method >::MethodPointer MethodSet< MPTraits, Method >::GetMethod ( const std::string &  _label)

Get a method by label.

Parameters
_labelThe method label.
Returns
The corresponding method pointer.

◆ Initialize()

template<typename MPTraits , typename Method >
void MethodSet< MPTraits, Method >::Initialize

Prepare all methods in this set for execution on the owning MPLibrary's current MPProblem.


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