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

Class ResourceOptionsFactory

                                                 object --+        
                                                          |        
                                                ??.instance --+    
                                                              |    
SingletonBase_T_basic_resource_manager_ResourceOptionsFactory_T --+
                                                                  |
                                                                 ResourceOptionsFactory

The %ResourceOptionsFactory class is responsible for maintaining the map between the names of the ResourceOptions classes (strings) and the ResourceOptionsCreator classes that are responsible for instantiating the ResourceOption classes. This is a singleton class. It is initialized at load time -- or at least after the call to devel::init( argc, argv ) -- and populated with the help of ResourceOptionsRegistrator instances.

Instance Methods [hide private]
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
create_resource_options(...)
create_resource_options( (ResourceOptionsFactory)arg1, (str)options_type, (Tag)tag) -> ResourceOptions : Create an instance of a ResourceOptions class given the name of the class (options_type) and initialize it from the given tag object.
 
factory_register(...)
factory_register( (ResourceOptionsFactory)arg1, (__CPP_ResourceOptionsCreator__)creator) -> None : Register the given ResourceOptionsCreator object with the factory.
 
set_throw_on_double_registration(...)
set_throw_on_double_registration( (ResourceOptionsFactory)arg1) -> None : Instruct the %ResourceOptionsFactory to throw an exception if two ResourceOptionCreators are registered with the factory that report the same "options_type" string instead of invoking utility_exit_with_message.

Inherited from SingletonBase_T_basic_resource_manager_ResourceOptionsFactory_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_ResourceOptionsFactory_T: get_instance

Class Variables [hide private]

Inherited from SingletonBase_T_basic_resource_manager_ResourceOptionsFactory_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_options(...)

 

create_resource_options( (ResourceOptionsFactory)arg1, (str)options_type, (Tag)tag) -> ResourceOptions :
    Create an instance of a ResourceOptions class given the name of the class
    (options_type) and initialize it from the given tag object.  Throws an
    EXCN_Msg_Exception exception if the options_type string is not recognized.
    

    C++ signature :
        boost::shared_ptr<basic::resource_manager::ResourceOptions> create_resource_options(basic::resource_manager::ResourceOptionsFactory {lvalue},std::string,boost::shared_ptr<utility::tag::Tag const>)

factory_register(...)

 

factory_register( (ResourceOptionsFactory)arg1, (__CPP_ResourceOptionsCreator__)creator) -> None :
    Register the given ResourceOptionsCreator object with the factory.  Invoked by an
    instance of the templated ResourceOptionsRegistrator class.
    

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

set_throw_on_double_registration(...)

 

set_throw_on_double_registration( (ResourceOptionsFactory)arg1) -> None :
    Instruct the %ResourceOptionsFactory to throw an exception if two ResourceOptionCreators
    are registered with the factory that report the same "options_type" string instead of invoking
    utility_exit_with_message.
    

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