Home | Trees | Indices | Help |
---|
|
object --+ | ??.instance --+ | FallbackConfiguration
The %FallbackConfiguration class describes how a resource should be created if the ResourceManager is not being used, i.e., if resources have been specified through flags on the command line instead of through a resource-definition file. A protocol will still query the ResourceManager for its desired resource in such a case (by its "resource_description") and if no resource has been provided for that description, then the ResourceManager will ask the FallbackConfigurationFactory for the %FallbackConfiguration that has been registered for that resource description (this registration logic is handled by the FallbackConfigurationCreator) and ask it to provide the information necessary to create the appropriate resource from the command line. For example, a user can define the loop they are interested in modeling to the loop-modeling protocol via the LoopsFileData resource. The loop modeling protocol once was but is no longer responsible for opening a text file and creating a LoopsFileData object from that text file; instead it asks the ResourceManager directly for the resource. For the sake of backwards compatibility, the ResourceManager must have some way of creating a LoopsFileData object from the command line. If someone is using the loop modeling application, but does not provide a resource definition, then the LoopsFileFallbackConfiguration (derived from %FallbackConfiguration) will be called upon by the ResourceManager for three things: 1) the name of the ResourceLoader to use to create the resource ("LoopsFile"), 2) the locator_id for the Resource (which it goes to the command line to find), and 3) a ResourceOptionsOP which is either null (meaning "use the default") or is in some way initialized with options from the command line. With these three bits, the ResourceManager will go the appropriate ResourceLoader and request the construction of the Resource as usual, opening the file using the default ResourceLocator (for the JD2ResourceManager, this is the FileSystemResourceLocator).
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
__instance_size__ = 32
|
|
|||
Inherited from |
|
__init__( (object)arg1) -> None : C++ signature : void __init__(_object*)
|
helper for pickle
|
could_not_create_resource_error_message( (FallbackConfiguration)arg1, (str)desc) -> str : If the %FallbackConfiguration has not been provided the appropriate set of command line flags needed to construct the Resource given the resource description, then return an error message informing the user what options must be provided on the command line. C++ signature : std::string could_not_create_resource_error_message(basic::resource_manager::FallbackConfiguration {lvalue},std::string) could_not_create_resource_error_message( (FallbackConfiguration)arg1, (str)arg2) -> None : C++ signature : void could_not_create_resource_error_message(boost::shared_ptr<FallbackConfiguration_exposer_callback> {lvalue},std::string) |
fallback_specified( (FallbackConfiguration)arg1, (str)desc) -> bool : Return true if a fallback been provided for the given resource description. It is possible that the fallback configuration would be unable to deliver a requested resource, e.g. if the appropriate command line option has not been provided. C++ signature : bool fallback_specified(basic::resource_manager::FallbackConfiguration {lvalue},std::string) fallback_specified( (FallbackConfiguration)arg1, (str)arg2) -> None : C++ signature : void fallback_specified(boost::shared_ptr<FallbackConfiguration_exposer_callback> {lvalue},std::string) |
get_locator_id( (FallbackConfiguration)arg1, (str)desc) -> str : Return the locator id that the resource locator should use to find the data used to construct the desired resource - e.g. the file name. C++ signature : std::string get_locator_id(basic::resource_manager::FallbackConfiguration {lvalue},std::string) get_locator_id( (FallbackConfiguration)arg1, (str)arg2) -> None : C++ signature : void get_locator_id(boost::shared_ptr<FallbackConfiguration_exposer_callback> {lvalue},std::string) |
get_resource_loader( (FallbackConfiguration)arg1, (str)desc) -> str : Return the name of the resource loader that should be used to instantiate the desired resource C++ signature : std::string get_resource_loader(basic::resource_manager::FallbackConfiguration {lvalue},std::string) get_resource_loader( (FallbackConfiguration)arg1, (str)arg2) -> None : C++ signature : void get_resource_loader(boost::shared_ptr<FallbackConfiguration_exposer_callback> {lvalue},std::string) |
get_resource_options( (FallbackConfiguration)arg1, (str)desc) -> ResourceOptions : Return a pointer to the ResourceOptions object that the ResourceLoader will use to instantiate the given resource. Return 0 if the default ResourceOptions specified by the appropriate ResourceLoader should be used. C++ signature : boost::shared_ptr<basic::resource_manager::ResourceOptions> get_resource_options(basic::resource_manager::FallbackConfiguration {lvalue},std::string) get_resource_options( (FallbackConfiguration)arg1, (str)arg2) -> None : C++ signature : void get_resource_options(boost::shared_ptr<FallbackConfiguration_exposer_callback> {lvalue},std::string) |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Jun 6 00:11:01 2015 | http://epydoc.sourceforge.net |