![]() |
Rosetta Protocols
2014.35
|
LoopsFileFallbackConfiguration provides instructions to the ResourceManager for loading loops_files in the absence of a resource definition file. More...
#include <LoopsFileFallbackConfiguration.hh>
Public Types | |
typedef basic::resource_manager::ResourceDescription | ResourceDescription |
Public Member Functions | |
LoopsFileFallbackConfiguration () | |
Construct the LoopsFileFallbackConfiguration. More... | |
virtual bool | fallback_specified (ResourceDescription const &desc) const |
Determine if the fallback configuration has been specified and return true or false. More... | |
virtual basic::resource_manager::LoaderType | get_resource_loader (ResourceDescription const &desc) const |
Return the type of loader that is required for this resource. More... | |
virtual basic::resource_manager::LocatorID | get_locator_id (ResourceDescription const &desc) const |
Return the locator_id that will be used to construct this resource. More... | |
virtual basic::resource_manager::ResourceOptionsOP | get_resource_options (ResourceDescription const &desc) const |
Return an owning pointer to a ResourceOptions instance to configure this resource. More... | |
virtual std::string | could_not_create_resource_error_message (ResourceDescription const &desc) const |
Return a string that should be displayed if the resource could not be created. More... | |
![]() | |
FallbackConfiguration () | |
virtual | ~FallbackConfiguration () |
Private Member Functions | |
basic::resource_manager::LocatorID | get_loops_filename_from_options () const |
Find and return the locator_id for this resource from the options system. More... | |
LoopsFileFallbackConfiguration provides instructions to the ResourceManager for loading loops_files in the absence of a resource definition file.
The class will confirm that a fallback can be created and will provide the necessary information to the ResourceManager to fully construct the resource.
typedef basic::resource_manager::ResourceDescription protocols::loops::LoopsFileFallbackConfiguration::ResourceDescription |
protocols::loops::LoopsFileFallbackConfiguration::LoopsFileFallbackConfiguration | ( | ) |
Construct the LoopsFileFallbackConfiguration.
|
virtual |
Return a string that should be displayed if the resource could not be created.
Return a string that provides a helpful message to the user so s/he can determine how to correctly use the loops_file resource.
Implements basic::resource_manager::FallbackConfiguration.
|
virtual |
Determine if the fallback configuration has been specified and return true or false.
Return true if the user has set the "-loops:loop_file" flag and false otherwise.
Implements basic::resource_manager::FallbackConfiguration.
References basic::options::OptionKeys::loops::loop_file, and basic::options::option.
|
virtual |
Return the locator_id that will be used to construct this resource.
The locator_id for the fallback configuration is set by the options system. The get_loops_filename_from_options() helper method is used to handle complex cases.
Implements basic::resource_manager::FallbackConfiguration.
References get_loops_filename_from_options().
|
private |
Find and return the locator_id for this resource from the options system.
There are three options system scenarios this method can handle. Each scenario and the corresponding behavior is outlined below:
EXCN_Msg_Exception |
References basic::options::OptionKeys::loops::loop_file, basic::options::option, numeric::random::RandomGenerator::random_range(), and protocols::loops::RG.
Referenced by get_locator_id().
|
virtual |
Return the type of loader that is required for this resource.
The return value is "loops_file" to indicate that a LoopsFileLoader is required.
Implements basic::resource_manager::FallbackConfiguration.
|
virtual |
Return an owning pointer to a ResourceOptions instance to configure this resource.
Return a NULL pointer to trigger the creation of a default LoopsFileOptions later in the resource creation process.
Implements basic::resource_manager::FallbackConfiguration.