The ResourceLocatorFactory instantiates ResourceLocator objects given their corresponding locator-type strings. It uses the load-time factory registration scheme, meaning that it is a singleton and takes an instance of a Creator object (a ResourceLocatorCreator) in its "factory_register" method. Templated instances of the ResourceLocatorRegistrator classes should be placed in the library init.cc files (e.g. core/init/init.cc or protocols/init/init.ResourceLocatorRegistrators.ihh)
More...
#include <ResourceLocatorFactory.hh>
The ResourceLocatorFactory instantiates ResourceLocator objects given their corresponding locator-type strings. It uses the load-time factory registration scheme, meaning that it is a singleton and takes an instance of a Creator object (a ResourceLocatorCreator) in its "factory_register" method. Templated instances of the ResourceLocatorRegistrator classes should be placed in the library init.cc files (e.g. core/init/init.cc or protocols/init/init.ResourceLocatorRegistrators.ihh)
| basic::resource_manager::ResourceLocatorFactory::~ResourceLocatorFactory |
( |
| ) |
|
|
virtualdefault |
Automatically generated virtual destructor for class deriving directly from VirtualBase.
| basic::resource_manager::ResourceLocatorFactory::ResourceLocatorFactory |
( |
| ) |
|
|
private |
Singleton has a private constructor.
singleton has a private constructor
| std::string basic::resource_manager::ResourceLocatorFactory::complex_type_name_for_locator |
( |
std::string const & |
locator_name | ) |
|
|
static |
| ResourceLocatorOP basic::resource_manager::ResourceLocatorFactory::create_resource_locator |
( |
std::string const & |
locator_type, |
|
|
std::string const & |
locator_tag, |
|
|
utility::tag::TagCOP |
tags |
|
) |
| const |
Create a ResourceLocator given its locator_type, giving the newly created instance the name locator_tag.
Create a resource locator from a tags object locator_type This is the type of the resource locator, e.g., DatabaseResourceLocator locator_tag This is the name of the instance of the the resource locator, e.g., coming from the 'tag' field in the ResourceLocator tag 'stage_1_resfiles'. tags this is the tag structure that is parsed by the ResourceLocator to initialize itself.
References CREATE_EXCEPTION, and creator_map_.
| std::map< std::string, ResourceLocatorCreatorOP > const & basic::resource_manager::ResourceLocatorFactory::locator_map |
( |
| ) |
const |
| void basic::resource_manager::ResourceLocatorFactory::set_throw_on_double_registration |
( |
| ) |
|
Only useful for unit testing. Since factory registration happens (sometimes) at load time, there may be no one to catch a thrown exception in the event of a name collision between two ResourceLocatorCreators that register for the same name.
References throw_on_double_registration_.
| bool basic::resource_manager::ResourceLocatorFactory::throw_on_double_registration_ |
|
private |
The documentation for this class was generated from the following files: