![]() |
Rosetta
2021.16
|
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...
#include <ResourceLocator.hh>

Public Member Functions | |
| ResourceLocator () | |
| Construct a ResourceLocator and initialize its name (its locator_tag) to the empty string. More... | |
| ResourceLocator (std::string const &locator_tag) | |
| Construct a ResourceLocator while setting its name to the input locater_tag. More... | |
| ResourceLocator (ResourceLocator const &src) | |
| Copy construct a ResourceLocator from an example locator. More... | |
| ~ResourceLocator () override | |
| virtual ResourceStreamOP | locate_resource_stream (std::string const &locator_id) const =0 |
| Create and return a ResourceStream object from the given locator_id so that its stream can be passed to the ResourceLoader. More... | |
| virtual void | parse_my_tag (utility::tag::TagCOP tag)=0 |
| Initialize the parameters for this ResourceLocator from the contents of an XML file. More... | |
| virtual void | locator_tag (std::string const &locator_tag) |
| Set the name for this ResourceLocator. More... | |
| virtual std::string | locator_tag () const |
| Return the name for this ResourceLocator. More... | |
| virtual void | show (std::ostream &out) const =0 |
| Write a description of this ResourceLocator to an out stream. More... | |
| virtual std::string | type () const =0 |
| Return the class name for this ResourceLocator instance. This function allows for better error message delivery. More... | |
Public Member Functions inherited from utility::VirtualBase | |
| VirtualBase ()=default | |
| Default constructor. More... | |
| virtual | ~VirtualBase ()=default |
| The virtual destructor is one of the main reasons for the VirtualBase class. More... | |
| VirtualBase (VirtualBase const &)=default | |
| VirtualBase (VirtualBase &&)=default | |
| VirtualBase & | operator= (VirtualBase const &)=default |
| VirtualBase & | operator= (VirtualBase &&)=default |
Private Attributes | |
| std::string | locator_tag_ |
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.
The ResourceManager asks the ResourceLocator to produce a ResourceStream object when given a "locator_id." A "locator_id" is what's needed to identify a data source from a data store: for example, for the FileSystemResourceLocator, the locator id is a file name; for the DatabaseResourceLocator, it would be a database query.
| basic::resource_manager::ResourceLocator::ResourceLocator | ( | ) |
Construct a ResourceLocator and initialize its name (its locator_tag) to the empty string.
| basic::resource_manager::ResourceLocator::ResourceLocator | ( | std::string const & | locator_tag | ) |
Construct a ResourceLocator while setting its name to the input locater_tag.
| basic::resource_manager::ResourceLocator::ResourceLocator | ( | ResourceLocator const & | src | ) |
Copy construct a ResourceLocator from an example locator.
|
overridedefault |
|
pure virtual |
Create and return a ResourceStream object from the given locator_id so that its stream can be passed to the ResourceLoader.
Implemented in basic::resource_manager::locator::FileSystemResourceLocator, basic::resource_manager::locator::DatabaseResourceLocator, basic::resource_manager::locator::NullResourceLocator, and basic::resource_manager::locator::FileListResourceLocator.
|
virtual |
Set the name for this ResourceLocator.
References locator_tag(), and locator_tag_.
|
virtual |
Return the name for this ResourceLocator.
References locator_tag_.
Referenced by basic::resource_manager::locator::DatabaseResourceLocator::locate_resource_stream(), and locator_tag().
|
pure virtual |
Initialize the parameters for this ResourceLocator from the contents of an XML file.
Implemented in basic::resource_manager::locator::FileSystemResourceLocator, basic::resource_manager::locator::DatabaseResourceLocator, basic::resource_manager::locator::NullResourceLocator, and basic::resource_manager::locator::FileListResourceLocator.
|
pure virtual |
Write a description of this ResourceLocator to an out stream.
Implemented in basic::resource_manager::locator::FileSystemResourceLocator, basic::resource_manager::locator::DatabaseResourceLocator, basic::resource_manager::locator::NullResourceLocator, and basic::resource_manager::locator::FileListResourceLocator.
Referenced by pyrosetta.distributed.viewer.core.Viewer::__call__().
|
pure virtual |
Return the class name for this ResourceLocator instance. This function allows for better error message delivery.
Implemented in basic::resource_manager::locator::FileSystemResourceLocator, basic::resource_manager::locator::DatabaseResourceLocator, basic::resource_manager::locator::NullResourceLocator, and basic::resource_manager::locator::FileListResourceLocator.
|
private |
Referenced by locator_tag().
1.8.7