Package rosetta :: Package basic :: Package resource_manager :: Module _basic_resource_manager_ :: Class ResourceLocatorFactory
[hide private]
[frames] | no frames]

Class ResourceLocatorFactory

                                                 object --+        
                                                          |        
                                                ??.instance --+    
                                                              |    
SingletonBase_T_basic_resource_manager_ResourceLocatorFactory_T --+
                                                                  |
                                                                 ResourceLocatorFactory

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)

Instance Methods [hide private]
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
create_resource_locator(...)
create_resource_locator( (ResourceLocatorFactory)arg1, (str)locator_type, (str)locator_tag, (Tag)tags) -> ResourceLocator : Create a ResourceLocator given its locator_type, giving the newly created instance the name locator_tag
 
factory_register(...)
factory_register( (ResourceLocatorFactory)arg1, (__CPP_ResourceLocatorCreator__)creator) -> None : This function is called on the singleton instance to give a ResourceLocatorCreator to the factory, usually through the constructor of a ResourceLocatorRegistrator class.
 
set_throw_on_double_registration(...)
set_throw_on_double_registration( (ResourceLocatorFactory)arg1) -> None : Only useful for unit testing.

Inherited from SingletonBase_T_basic_resource_manager_ResourceLocatorFactory_T: __reduce__

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from SingletonBase_T_basic_resource_manager_ResourceLocatorFactory_T: get_instance

Class Variables [hide private]

Inherited from SingletonBase_T_basic_resource_manager_ResourceLocatorFactory_T: __instance_size__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

Raises an exception This class cannot be instantiated from Python

Overrides: object.__init__

create_resource_locator(...)

 

create_resource_locator( (ResourceLocatorFactory)arg1, (str)locator_type, (str)locator_tag, (Tag)tags) -> ResourceLocator :
    Create a ResourceLocator given its locator_type, giving the newly created instance the name locator_tag
    

    C++ signature :
        boost::shared_ptr<basic::resource_manager::ResourceLocator> create_resource_locator(basic::resource_manager::ResourceLocatorFactory {lvalue},std::string,std::string,boost::shared_ptr<utility::tag::Tag const>)

factory_register(...)

 

factory_register( (ResourceLocatorFactory)arg1, (__CPP_ResourceLocatorCreator__)creator) -> None :
    This function is called on the singleton instance to give a ResourceLocatorCreator to the
    factory, usually through the constructor of a ResourceLocatorRegistrator class.
    

    C++ signature :
        void factory_register(basic::resource_manager::ResourceLocatorFactory {lvalue},boost::shared_ptr<basic::resource_manager::ResourceLocatorCreator>)

set_throw_on_double_registration(...)

 

set_throw_on_double_registration( (ResourceLocatorFactory)arg1) -> None :
    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.
    

    C++ signature :
        void set_throw_on_double_registration(basic::resource_manager::ResourceLocatorFactory {lvalue})