Rosetta  2016.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Classes | Typedefs | Functions | Variables
basic::resource_manager Namespace Reference

Namespaces

 fallback_configuration
 
 locator
 

Classes

class  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. More...
 
class  FallbackConfigurationCreator
 The FallbackConfigurationCreator plays the role in the ResourceManager framework of gluing a "resource_description" string and a FallbackConfiguration together. More...
 
class  FallbackConfigurationFactory
 The FallbackConfigurationFactory is a singleton factory with which FallbackConfigurationCreator objects should be registered. The "fallback" system serves as a mechanism for preserving command-line functionality even while switching more protocols from requesting resources from the ResourceManager rather than reading directly from the command line. More...
 
class  FallbackConfigurationRegistrator
 The FallbackConfigurationRegistrator class is a simple templated registration class that will, at construction, create a FallbackConfiguration and register it with the FallbackConfigurationFactory. More...
 
class  JobOptions
 The JobOptions class holds job-specific options (i.e. command line flags). It can be used by the ResourceManager to hold options for a particular job, so that the ResourceManager can retrieve those options as needed. It is basically a bag for 12 OptionKey/OptionKeyValue maps, one for every kind of OptionKey. More...
 
class  LazyResourceManager
 This is a mule class, meant to be derived from. It's job is to hold ResourceOptions and ResourceLocator objects by name (tag) as well as the ResourceConfigurations which serve as complete descriptions for how to construct a Resource. It should be thought of as a mule by classes that derive from it: it won't do anything on its own, but it can be directed to do things. The point of the class is to ake it easier to create ResourceManagers besides the JD2ResourceManager, which, at the time of this documentation, is the only class that derives from the LazyResourceManager. More...
 
struct  ResourceConfiguration
 The set of strings necessary to describe how a resource should be constructed. More...
 
class  ResourceLoader
 The ResourceLoader is responsible for instantiating a Resource object and initializing it. In order to do so, the ResourceLoader is given an input stream and a ResourceOptions object. Note that the ResourceOptions object has to be of the right type, or the ResourceLoader will not be able to read the data that it needs out of it. If the ResourceLoader is given the wrong kind of ResourceOptions object, it will throw an exception. More...
 
class  ResourceLoaderCreator
 Instantiates a ResourceLoader as part of the ResourceLoaderFactory scheme. Derived classes should be registered with the ResourceLoaderFactory in one of the library init.cc files with a ResourceLoaderRegistrator. More...
 
class  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. More...
 
class  ResourceLoaderRegistrator
 The ResourceLoaderRegistrator class is a simple templated registration class that will, at construction, create a ResourceLoader and register it with the ResouceLoaderFactory. More...
 
class  ResourceLocator
 ResourceLocator classes are responsible for retrieving data from a data store that will be used to construct a Resource. This data store could be a file system or a database or any other place where data is stored. More...
 
class  ResourceLocatorCreator
 The ResourceLocatorCreator class serves to link the name of a locator type and the (derived) ResourceLocator class that's responsible for retrieving data from a data store. More...
 
class  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) More...
 
class  ResourceLocatorRegistrator
 The ResourceLocatorRegistrator gives an instance of a ResourceLocatorCreator to the ResourceLocatorFactory in its constructor, calling the ResourceLocatorFactory's factory_register() method. This call is actually accomplished by the WidgetRegistrator parent class. A single (templated) instance of this class for each ResourceLocatorCreator should be placed in the appropriate init.cc file (i.e. ResourceLocatorCreators that live in the protocols library should be put in src/protocols/init/init.ResourceLocatorRegistrators.ihh). More...
 
class  ResourceManager
 The ResourceManager is a singleton class responsible for holding, distributing, and eventually deallocating resources which may be shared between multiple jobs. A protocol may communicate directly with the ResourceManager, requesting resources, but remaining unaware of where those resources came from, or whether the same resource is being used in multiple contexts. More...
 
class  ResourceManagerCreator
 Derived classes will be used by the ResourceManagerFactory to decide which of the various ResourceManagers should be instantiated. The ResourceManager is a singleton, but, different ResourceManagers can be instantiated in different contexts. More...
 
class  ResourceManagerFactory
 A factory class for managing the instantiation of the singleton ResourceManager: only one of the various derived classes will be instantiated. Currently, it asks for the JD2ResourceManager; in the future, this should be fixed so that it reads from the options system to figure out which ResourceManager to instantiate. More...
 
class  ResourceManagerRegistrator
 The ResourceManagerRegistrator creates an instantiate of the templated ResourceManagerCreator class and gives it to the ResourceManagerFactory. A single instance for each ResourceManagerCreator should be put in the appropriate init.cc file. More...
 
class  ResourceOptions
 The ResourceOptions class is responsible for describing all the data requried for instanting a particular resource, except for the data stream (i.e. the file) that contains the data for the resource. For example, when reading in a PDB file, there are 30 different options for how that PDB file should be turned into a Pose. That data is now held in an ImportPoseOptions object. The purpose of the ResourceOptions class is to allow different jobs to load resources in different ways, or for one job to load two different resources of the same type in different ways. For example, a protocol may need both a centroid pose and a fullatom pose to be loaded in from disk; however, if the logic for loading a pose in from disk is controlled by the options system alone, this becomes impossible. More...
 
class  ResourceOptionsCreator
 Each derived ResourceOptionsCreator class is responsible for instantiating a (specific) derived ResourceOptions class, and for telling the ResourceOptionsFactory the string which identifies that class. There should be one derived ResourceOptionsCreator class for each ResourceOptions class. More...
 
class  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. More...
 
class  ResourceOptionsRegistrator
 The ResourceOptionsRegistrator class is responsible for creating an instance of the (templated) ResourceOptionsCreator class and giving it to the ResourceOptionsFactory in its construtor. Instances of this class placed in the init.cc files (e.g. core/init/init.cc) ensure that the ResourceOptionsFactory is fully populated with the ResourceOptionsCreators by the time that the call to devel::init() completes. More...
 
class  ResourceStream
 The ResourceStream represents an abstract class for packaging up a standard istream so that data that the ResourceLocator needs to deliver to a ResourceLoader can come from arbitrary sources (e.g. from either a file or from a database). More...
 

Typedefs

typedef
utility::pointer::shared_ptr
< FallbackConfiguration
FallbackConfigurationOP
 
typedef
utility::pointer::shared_ptr
< FallbackConfiguration const > 
FallbackConfigurationCOP
 
typedef
utility::pointer::shared_ptr
< FallbackConfigurationCreator
FallbackConfigurationCreatorOP
 
typedef
utility::pointer::shared_ptr
< FallbackConfigurationCreator
const > 
FallbackConfigurationCreatorCOP
 
typedef
utility::pointer::shared_ptr
< JobOptions
JobOptionsOP
 
typedef
utility::pointer::shared_ptr
< JobOptions const > 
JobOptionsCOP
 
typedef
utility::pointer::shared_ptr
< LazyResourceManager
LazyResourceManagerOP
 
typedef
utility::pointer::shared_ptr
< LazyResourceManager const > 
LazyResourceManagerCOP
 
typedef
utility::pointer::shared_ptr
< ResourceLoader
ResourceLoaderOP
 
typedef
utility::pointer::shared_ptr
< ResourceLoader const > 
ResourceLoaderCOP
 
typedef
utility::pointer::shared_ptr
< ResourceLoaderCreator
ResourceLoaderCreatorOP
 
typedef
utility::pointer::shared_ptr
< ResourceLoaderCreator const > 
ResourceLoaderCreatorCOP
 
typedef
utility::pointer::shared_ptr
< ResourceStream
ResourceStreamOP
 
typedef
utility::pointer::shared_ptr
< ResourceStream const > 
ResourceStreamCOP
 
typedef
utility::pointer::shared_ptr
< ResourceLocator
ResourceLocatorOP
 
typedef
utility::pointer::shared_ptr
< ResourceLocator const > 
ResourceLocatorCOP
 
typedef
utility::pointer::shared_ptr
< ResourceLocatorCreator
ResourceLocatorCreatorOP
 
typedef
utility::pointer::shared_ptr
< ResourceLocatorCreator const > 
ResourceLocatorCreatorCOP
 
typedef
utility::pointer::shared_ptr
< ResourceManager
ResourceManagerOP
 
typedef
utility::pointer::shared_ptr
< ResourceManager const > 
ResourceManagerCOP
 
typedef
utility::pointer::shared_ptr
< ResourceManagerCreator
ResourceManagerCreatorOP
 
typedef
utility::pointer::shared_ptr
< ResourceManagerCreator const > 
ResourceManagerCreatorCOP
 
typedef
utility::pointer::shared_ptr
< ResourceOptions
ResourceOptionsOP
 
typedef
utility::pointer::shared_ptr
< ResourceOptions const > 
ResourceOptionsCOP
 
typedef
utility::pointer::shared_ptr
< ResourceOptionsCreator
ResourceOptionsCreatorOP
 
typedef
utility::pointer::shared_ptr
< ResourceOptionsCreator const > 
ResourceOptionsCreatorCOP
 
typedef
utility::pointer::ReferenceCount 
Resource
 
typedef
utility::pointer::ReferenceCountOP 
ResourceOP
 
typedef std::string ResourceDescription
 
typedef std::string ResourceTag
 
typedef std::string JobTag
 
typedef std::string LocatorType
 
typedef std::string LocatorTag
 
typedef std::string LocatorID
 
typedef std::string LoaderType
 
typedef std::string ResourceOptionsTag
 

Functions

template<class S >
void write_type (std::ostream &out, S val)
 simple enough function that calls the bit-shift operator in the input stream; why bother? For the sake of writing out boolean values as "true" or "false" More...
 
template<>
void write_type< bool > (std::ostream &out, bool val)
 Template specialization to write boolean values as "true" or "false". More...
 
template<class T , class S >
void show_option_map (std::map< T, S > const &option_map, std::ostream &out, char const *option_name)
 
template<class T , class S >
void show_option_vector_map (std::map< T, vector1< S > > const &option_map, std::ostream &out, char const *option_name)
 
std::ostream & operator<< (std::ostream &out, JobOptions const &job_options)
 This output-operator function invokes the JobOption's show() method. More...
 
template<class T , class S >
void add_option_to_map (std::map< T, S > &option_map, T const &key, S const &val)
 
template<class T , class S >
void remove_option_from_map (std::map< T, S > &option_map, T const &key)
 
template<class T , class S >
bool option_map_contains_key (std::map< T, S > const &option_map, T const &key)
 
template<class T , class S >
S const & get_option_from_map (std::map< T, S > const &option_map, T const &key, char const *option_class_name)
 
std::ostream & operator<< (std::ostream &out, ResourceConfiguration const &resource_configuration)
 
std::ostream & operator<< (std::ostream &out, LazyResourceManager const &lazy_resource_manager)
 
std::ostream & operator<< (std::ostream &out, ResourceManager const &resource_manager)
 
std::ostream & operator<< (std::ostream &out, const ResourceOptions &resource_options)
 
template<class ResourceType >
utility::pointer::shared_ptr
< ResourceType > 
get_resource (ResourceDescription const &resource_description)
 

Variables

static Tracer TR ("basic.resource_manager.LazyResourceManager")
 

Typedef Documentation

typedef utility::pointer::shared_ptr< JobOptions const > basic::resource_manager::JobOptionsCOP
typedef utility::pointer::shared_ptr< JobOptions > basic::resource_manager::JobOptionsOP
typedef utility::pointer::shared_ptr< ResourceLoader const > basic::resource_manager::ResourceLoaderCOP
typedef utility::pointer::shared_ptr< ResourceStream const > basic::resource_manager::ResourceStreamCOP

Function Documentation

template<class T , class S >
void basic::resource_manager::add_option_to_map ( std::map< T, S > &  option_map,
T const &  key,
S const &  val 
)
template<class T , class S >
S const& basic::resource_manager::get_option_from_map ( std::map< T, S > const &  option_map,
T const &  key,
char const *  option_class_name 
)
template<class ResourceType >
utility::pointer::shared_ptr< ResourceType > basic::resource_manager::get_resource ( ResourceDescription const &  resource_description)
std::ostream& basic::resource_manager::operator<< ( std::ostream &  out,
const ResourceOptions &  resource_options 
)
std::ostream& basic::resource_manager::operator<< ( std::ostream &  out,
ResourceConfiguration const &  resource_configuration 
)
std::ostream& basic::resource_manager::operator<< ( std::ostream &  out,
ResourceManager const &  resource_manager 
)
std::ostream & basic::resource_manager::operator<< ( std::ostream &  out,
const JobOptions &  job_options 
)

This output-operator function invokes the JobOption's show() method.

References basic::options::OptionKeys::canonical_sampling::out::out, and basic::resource_manager::JobOptions::show().

std::ostream& basic::resource_manager::operator<< ( std::ostream &  out,
LazyResourceManager const &  lazy_resource_manager 
)
template<class T , class S >
bool basic::resource_manager::option_map_contains_key ( std::map< T, S > const &  option_map,
T const &  key 
)
template<class T , class S >
void basic::resource_manager::remove_option_from_map ( std::map< T, S > &  option_map,
T const &  key 
)
template<class T , class S >
void basic::resource_manager::show_option_map ( std::map< T, S > const &  option_map,
std::ostream &  out,
char const *  option_name 
)
template<class T , class S >
void basic::resource_manager::show_option_vector_map ( std::map< T, vector1< S > > const &  option_map,
std::ostream &  out,
char const *  option_name 
)
template<class S >
void basic::resource_manager::write_type ( std::ostream &  out,
val 
)

simple enough function that calls the bit-shift operator in the input stream; why bother? For the sake of writing out boolean values as "true" or "false"

Referenced by show_option_map(), and show_option_vector_map().

template<>
void basic::resource_manager::write_type< bool > ( std::ostream &  out,
bool  val 
)

Template specialization to write boolean values as "true" or "false".

References basic::options::OptionKeys::canonical_sampling::out::out.

Variable Documentation

Tracer basic::resource_manager::TR("basic.resource_manager.LazyResourceManager")
static