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

Class ResourceLoaderFactory

                                                object --+        
                                                         |        
                                               ??.instance --+    
                                                             |    
SingletonBase_T_basic_resource_manager_ResourceLoaderFactory_T --+
                                                                 |
                                                                ResourceLoaderFactory

Instantiates ResourceLoaders. Creators may be registered with the Factory at any point, though it is recommended they be registered at load time. If two Creators are registered and they both give the same name for the ResourceLoader they say they will instantiate, then the Factory will exit with an error message.

Instance Methods [hide private]
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
available_resource_loaders(...)
available_resource_loaders( (ResourceLoaderFactory)arg1) -> object : Return a list of all the resource loaders available
 
create_resource_loader(...)
create_resource_loader( (ResourceLoaderFactory)arg1, (str)loader_type) -> ResourceLoader : Instantiates a resource loader ofa given type; throws an exception if no loader with this type has been previously registered.
 
factory_register(...)
factory_register( (ResourceLoaderFactory)arg1, (__CPP_ResourceLoaderCreator__)creator) -> None : Register a ResourceLoaderCreator with the factory.
 
has_resource_loader(...)
has_resource_loader( (ResourceLoaderFactory)arg1, (str)loader_type) -> bool : Returns true if a resource loader of the given type has been registered with the factory
 
set_throw_on_double_registration(...)
set_throw_on_double_registration( (ResourceLoaderFactory)arg1) -> None : Only useful for unit testing.

Inherited from SingletonBase_T_basic_resource_manager_ResourceLoaderFactory_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_ResourceLoaderFactory_T: get_instance

Class Variables [hide private]

Inherited from SingletonBase_T_basic_resource_manager_ResourceLoaderFactory_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__

available_resource_loaders(...)

 

available_resource_loaders( (ResourceLoaderFactory)arg1) -> object :
    Return a list of all the resource loaders available
    

    C++ signature :
        std::list<std::string, std::allocator<std::string> > available_resource_loaders(basic::resource_manager::ResourceLoaderFactory {lvalue})

create_resource_loader(...)

 

create_resource_loader( (ResourceLoaderFactory)arg1, (str)loader_type) -> ResourceLoader :
    Instantiates a resource loader ofa  given type; throws
    an exception if no loader with this type has been previously
    registered.
    

    C++ signature :
        boost::shared_ptr<basic::resource_manager::ResourceLoader> create_resource_loader(basic::resource_manager::ResourceLoaderFactory {lvalue},std::string)

factory_register(...)

 

factory_register( (ResourceLoaderFactory)arg1, (__CPP_ResourceLoaderCreator__)creator) -> None :
    Register a ResourceLoaderCreator with the factory.  The factory
    asks the Creator for the name of the ResourceLoader that it will create;
    if another Creator has already registered with the factory that proports
    to instantiate another ResourceLoader with the same name, then it will
    exit with an error message, or, if set_throw_on_double_registration()
    has previously been called, throw an exception.
    

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

has_resource_loader(...)

 

has_resource_loader( (ResourceLoaderFactory)arg1, (str)loader_type) -> bool :
    Returns true if a resource loader of the given type has been
    registered with the factory
    

    C++ signature :
        bool has_resource_loader(basic::resource_manager::ResourceLoaderFactory {lvalue},std::string)

set_throw_on_double_registration(...)

 

set_throw_on_double_registration( (ResourceLoaderFactory)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
    two FallbackConfigurationCreators that register for the same
    

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