|
Rosetta 3.5
|
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. 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... | |
Static Public Member Functions | |
| static TopologyClaimerFactory const & | get_instance () |
| Returns an instance to the singleton. More... | |
Private Member Functions | |
| TopologyClaimerFactory () | |
| Constructs a new instance and initializes the lookup table <claimers_> with commonly used types. More... | |
| ~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... | |
Static Private Attributes | |
| static TopologyClaimerFactory * | instance_ = NULL |
| A pointer to the singleton instance of the factory object. Resources associated with the object are released on destruction. More... | |
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.
Definition at line 33 of file TopologyClaimerFactory.hh.
|
private |
Constructs a new instance and initializes the lookup table <claimers_> with commonly used types.
Definition at line 57 of file TopologyClaimerFactory.cc.
References add_type().
Referenced by get_instance().
|
private |
Frees resources associated with this object.
Definition at line 78 of file TopologyClaimerFactory.cc.
References instance_.
| 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>).
Definition at line 93 of file TopologyClaimerFactory.cc.
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>).
Definition at line 89 of file TopologyClaimerFactory.cc.
References add_type().
|
static |
Returns an instance to the singleton.
Definition at line 82 of file TopologyClaimerFactory.cc.
References instance_, and TopologyClaimerFactory().
Referenced by protocols::topology_broker::add_claims_from_stream().
| TopologyClaimerOP protocols::topology_broker::TopologyClaimerFactory::newTopologyClaimer | ( | const std::string & | name) | const |
Returns a new instance of the TopologyClaimer identified by <name>
Definition at line 97 of file TopologyClaimerFactory.cc.
References claimers_.
Referenced by protocols::topology_broker::add_claims_from_stream().
|
mutableprivate |
A map that associates claimer names with claimer types. Used by the newTopologyClaimer() method to instantiate new claimers by name.
Definition at line 60 of file TopologyClaimerFactory.hh.
Referenced by add_type(), and newTopologyClaimer().
|
staticprivate |
A pointer to the singleton instance of the factory object. Resources associated with the object are released on destruction.
Definition at line 64 of file TopologyClaimerFactory.hh.
Referenced by get_instance(), and ~TopologyClaimerFactory().
1.8.4