![]() |
Rosetta
2021.16
|
A non-copyable factory for instantiating TopologyClaimers by name. Commonly used TopologyClaimers are registered in the constructor. Additional claimers can be registered after the fact using the add_type() method. APL Question: Should this be one-instance-per-program (singleton) or one-instance-per-job? More...
#include <TopologyClaimerFactory.hh>

Public Member Functions | |
| TopologyClaimerOP | newTopologyClaimer (const std::string &name) const |
| Returns a new instance of the TopologyClaimer identified by <name> More... | |
| void | add_type (const std::string &name, TopologyClaimerOP claimer) |
| Registers the TopologyClaimer with name <name>. Instances of this class can be retrieved by calling newTopologyClaimer(<name>). More... | |
| void | add_type (TopologyClaimerOP claimer) |
| Registers the TopologyClaimer using the name returned by claimer->type(). Instances of this class can be retrieved by calling newTopologyClaimer(<name>). More... | |
Private Member Functions | |
| TopologyClaimerFactory () | |
| Constructs a new instance and initializes the lookup table <claimers_> with commonly used types. More... | |
| TopologyClaimerFactory (TopologyClaimerFactory const &)=delete | |
| TopologyClaimerFactory & | operator= (TopologyClaimerFactory const &)=delete |
| ~TopologyClaimerFactory () | |
| Frees resources associated with this object. More... | |
Private Attributes | |
| std::map< std::string, TopologyClaimerOP > | claimers_ |
| A map that associates claimer names with claimer types. Used by the newTopologyClaimer() method to instantiate new claimers by name. More... | |
Friends | |
| class | utility::SingletonBase< TopologyClaimerFactory > |
A non-copyable factory for instantiating TopologyClaimers by name. Commonly used TopologyClaimers are registered in the constructor. Additional claimers can be registered after the fact using the add_type() method. APL Question: Should this be one-instance-per-program (singleton) or one-instance-per-job?
|
private |
Constructs a new instance and initializes the lookup table <claimers_> with commonly used types.
References add_type().
|
privatedelete |
|
privatedefault |
Frees resources associated with this object.
| void protocols::topology_broker::TopologyClaimerFactory::add_type | ( | const std::string & | name, |
| TopologyClaimerOP | claimer | ||
| ) |
Registers the TopologyClaimer with name <name>. Instances of this class can be retrieved by calling newTopologyClaimer(<name>).
References claimers_.
Referenced by add_type(), and TopologyClaimerFactory().
| void protocols::topology_broker::TopologyClaimerFactory::add_type | ( | TopologyClaimerOP | claimer | ) |
Registers the TopologyClaimer using the name returned by claimer->type(). Instances of this class can be retrieved by calling newTopologyClaimer(<name>).
References add_type().
| TopologyClaimerOP protocols::topology_broker::TopologyClaimerFactory::newTopologyClaimer | ( | const std::string & | name | ) | const |
Returns a new instance of the TopologyClaimer identified by <name>
References claimers_.
|
privatedelete |
|
friend |
|
mutableprivate |
A map that associates claimer names with claimer types. Used by the newTopologyClaimer() method to instantiate new claimers by name.
Referenced by add_type(), and newTopologyClaimer().
1.8.7