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 | Protected Member Functions | Protected Attributes | Friends
TMPBaseObject Class Reference

Public Member Functions

Construction
 TMPBaseObject (const std::string &_label="", const std::string &_name="", bool _debug=false)
 
 TMPBaseObject (XMLNode &_node)
 
virtual ~TMPBaseObject ()=default
 
I/O
virtual void Print (std::ostream &_os) const
 
Initialization
virtual void Initialize ()
 
Name and Label Accessors
const std::string & GetName () const
 Get the class name for this object.
 
const std::string & GetLabel () const
 Get the unique label for this object.
 
std::string GetNameAndLabel () const
 Get the unique string identifier for this object "m_name::m_label".
 
void SetLabel (const std::string &)
 Set the unique label for this object.
 
TMPLibrary Accessors
void SetTMPLibrary (TMPLibrary *) noexcept
 Set the owning TMPLibrary.
 
TMPLibraryGetTMPLibrary () noexcept
 Get the owning TMPLibrary.
 
TMPStrategyMethodPointer GetTMPStrategy (const std::string &) const noexcept
 Get a TMPStrategyMethod method from the owning TMPLibrary.
 
PoIPlacementMethodPointer GetPoIPlacementMethod (const std::string &) const noexcept
 Get a Point-of-Interest placement method from the owning TMPLibrary.
 
TaskEvaluatorMethodPointer GetTaskEvaluator (const std::string &) const noexcept
 Get a TaskEvaluator from the owning TMPLibrary.
 
TaskDecomposerMethodPointer GetTaskDecomposer (const std::string &) const noexcept
 Get a TaskDecomposition from the owning TMPLibrary.
 
TaskAllocatorMethodPointer GetTaskAllocator (const std::string &) const noexcept
 Get a TaskAllocator from the owning TMPLibrary.
 
TMPTools * GetTMPTools () const noexcept
 Get the TMP tool container from the TMPLibrary.
 
Problem Accessors
MPLibraryGetMPLibrary () const noexcept
 Get the underlying MPLibrary.
 
MPProblemGetMPProblem () const noexcept
 Get the library's current TMPProblem.
 
Solution Accessors
Plan * GetPlan () const noexcept
 Get the current Plan.
 
StateGraphPointer GetStateGraph (const std::string &) const noexcept
 Get the underlying StateGraph.
 

Public Types

LocalTypes
typedef MPTraits< Cfg >::MPLibrary MPLibrary
 
Method Set Types
typedef TMPMethodSet< TMPStrategyMethod > TMPStrategyMethodSet
 
typedef TMPMethodSet< PoIPlacementMethod > PoIPlacementMethodSet
 
typedef TMPMethodSet< TaskEvaluatorMethod > TaskEvaluatorMethodSet
 
typedef TMPMethodSet< TaskDecomposerMethod > TaskDecomposerMethodSet
 
typedef TMPMethodSet< TaskAllocatorMethod > TaskAllocatorMethodSet
 
typedef TMPMethodSet< StateGraph > StateGraphSet
 
Method Pointer Types
typedef TMPStrategyMethodSet::TMPMethodPointer TMPStrategyMethodPointer
 
typedef PoIPlacementMethodSet::TMPMethodPointer PoIPlacementMethodPointer
 
typedef TaskEvaluatorMethodSet::TMPMethodPointer TaskEvaluatorMethodPointer
 
typedef TaskDecomposerMethodSet::TMPMethodPointer TaskDecomposerMethodPointer
 
typedef TaskAllocatorMethodSet::TMPMethodPointer TaskAllocatorMethodPointer
 
typedef StateGraphSet::TMPMethodPointer StateGraphPointer
 

Protected Member Functions

void SetName (const std::string &_s)
 
const std::string & GetBaseFilename () const
 

Protected Attributes

bool m_debug
 Print debug info?
 

Friends

template<typename T >
class TMPMethodSet
 

Detailed Description

Abstract base class for all TMP algorithm abstractions in PMPL.

The TMPBaseObject carries a class name m_name and unique label m_label for each algorithm. The name refers to the class from which the object was instantiated, while the label refers to a specific instantiation of that class.

All algorithms are owned by a TMPLibrary, which is referenced here as m_tmpLibrary. When initially created, these objects will have no knowledge of the MPProblem that they will be used on: they will only have access to parameter settings provided in their XML nodes. Derived classes that have problem-dependent internal state should override the Initialize() method to set that data: this method will be called whenever the owning TMPLibrary's current TMPProblem is changed.

Constructor & Destructor Documentation

◆ TMPBaseObject() [1/2]

TMPBaseObject::TMPBaseObject ( const std::string &  _label = "",
const std::string &  _name = "",
bool  _debug = false 
)

Default constructor explicitly gives name, label, and debug.

Parameters
_labelID of the object, i.e., user defined label
_nameName of the object, i.e., derived class name
_debugTurn debug output on or off

◆ TMPBaseObject() [2/2]

TMPBaseObject::TMPBaseObject ( XMLNode _node)

XML constructor pulls label and debug from an XML node.

Parameters
_nodeXMLNode to parse for this object

Member Function Documentation

◆ Print()

void TMPBaseObject::Print ( std::ostream &  _os) const
virtual

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

◆ SetName()

void TMPBaseObject::SetName ( const std::string &  _s)
protected
Parameters
_sClass name

◆ GetBaseFilename()

const std::string & TMPBaseObject::GetBaseFilename ( ) const
protected
Returns
base file name from MPProblem

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