Rosetta
Public Member Functions | Protected Attributes | List of all members
protocols::wum::WorkUnitList Class Reference

WOrkUnitList is a store for WorkUnitCOPs. THe purpose of this class is to store all the possible WorkUnits that a protocol might need. When needed these are cloned and then used. THis class acts like a library of WorkUnit blueprints. More...

#include <WorkUnitList.hh>

Public Member Functions

 WorkUnitList ()
 
void register_work_unit (const std::string &name, WorkUnitBaseOP the_work_unit)
 Add a WorkUnit to the list, each workunit must be named with a string that is used later to retrieve it ! More...
 
const WorkUnitBaseCOP get_work_unit (const std::string &name) const
 Return a COP to a workunit with a given name. If multiple WUs were registered with the same name, the first is returned. More...
 
const WorkUnitBaseOP get_work_unit_clone (const std::string &name) const
 Return an OP to a workunit with a given name but clone it. More...
 
const WorkUnitBaseCOP get_work_unit (const WorkUnitBase &wu) const
 Return an OP to a workunit with the same name as the one given as a parameter. More...
 
const WorkUnitBaseOP get_work_unit_clone (const WorkUnitBase &wu) const
 Return an OP to a workunit with the same name as the one given as a parameter, but as a clone. More...
 
void merge (const WorkUnitList &source)
 

Protected Attributes

std::map< std::string, WorkUnitBaseCOPwork_unit_list_
 An STL map is used to associate the WUs with strings. More...
 

Detailed Description

WOrkUnitList is a store for WorkUnitCOPs. THe purpose of this class is to store all the possible WorkUnits that a protocol might need. When needed these are cloned and then used. THis class acts like a library of WorkUnit blueprints.

Constructor & Destructor Documentation

◆ WorkUnitList()

protocols::wum::WorkUnitList::WorkUnitList ( )
inline

Member Function Documentation

◆ get_work_unit() [1/2]

const WorkUnitBaseCOP protocols::wum::WorkUnitList::get_work_unit ( const std::string &  name) const

Return a COP to a workunit with a given name. If multiple WUs were registered with the same name, the first is returned.

References protocols::wum::TR(), and work_unit_list_.

Referenced by get_work_unit_clone(), protocols::wum::WorkUnitManager::read_work_unit(), and protocols::wum::MPI_WorkUnitManager::receive_MPI_workunit().

◆ get_work_unit() [2/2]

const WorkUnitBaseCOP protocols::wum::WorkUnitList::get_work_unit ( const WorkUnitBase wu) const
inline

Return an OP to a workunit with the same name as the one given as a parameter.

References get_work_unit(), and protocols::wum::WorkUnitBase::get_wu_type().

Referenced by get_work_unit().

◆ get_work_unit_clone() [1/2]

const WorkUnitBaseOP protocols::wum::WorkUnitList::get_work_unit_clone ( const std::string &  name) const
inline

Return an OP to a workunit with a given name but clone it.

References get_work_unit().

◆ get_work_unit_clone() [2/2]

const WorkUnitBaseOP protocols::wum::WorkUnitList::get_work_unit_clone ( const WorkUnitBase wu) const
inline

Return an OP to a workunit with the same name as the one given as a parameter, but as a clone.

References get_work_unit(), and protocols::wum::WorkUnitBase::get_wu_type().

◆ merge()

void protocols::wum::WorkUnitList::merge ( const WorkUnitList source)

◆ register_work_unit()

void protocols::wum::WorkUnitList::register_work_unit ( const std::string &  name,
WorkUnitBaseOP  the_work_unit 
)

Add a WorkUnit to the list, each workunit must be named with a string that is used later to retrieve it !

References work_unit_list_.

Member Data Documentation

◆ work_unit_list_

std::map< std::string, WorkUnitBaseCOP > protocols::wum::WorkUnitList::work_unit_list_
protected

An STL map is used to associate the WUs with strings.

Referenced by get_work_unit(), merge(), and register_work_unit().


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