![]() |
Rosetta Utilities
2014.16.56682
|
The FileSystemResourceLocator is responsible for opening a file from the file system given its name (as the "locator tag" in the locate_resource_stream method ) and returning a FileStream object that wraps this file. This FileStream can then be used to construct a resource. More...
#include <FileSystemResourceLocator.hh>
Public Member Functions | |
| FileSystemResourceLocator (std::ios_base::openmode open_mode=std::ios_base::in) | |
| FileSystemResourceLocator (FileSystemResourceLocator const &src) | |
| virtual | ~FileSystemResourceLocator () |
| virtual void | show (std::ostream &out) const |
| Write a description of this ResourceLocator to an out stream. More... | |
| virtual std::string | type () const |
| Return the class name for this ResourceLocator instance. This function allows for better error message delivery. More... | |
| void | set_open_mode (std::ios_base::openmode open_mode) |
| std::ios_base::openmode | get_open_mode () const |
| virtual ResourceStreamOP | locate_resource_stream (std::string const &locator_tag) const |
| Construct a FileStream object given a file's name (its locator_tag) More... | |
| virtual void | parse_my_tag (utility::tag::TagCOP tag) |
| Allows a default base_path to be specified for the locator. More... | |
Public Member Functions inherited from basic::resource_manager::ResourceLocator | |
| 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... | |
| virtual | ~ResourceLocator () |
| 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... | |
Public Member Functions inherited from utility::pointer::ReferenceCount | |
| void | ctor () |
| virtual | ~ReferenceCount () |
| Destructor. More... | |
| Size | ref_count () const |
| Reference count. More... | |
Private Attributes | |
| std::ios_base::openmode | open_mode_ |
| std::string | base_path_ |
Additional Inherited Members | |
Public Types inherited from utility::pointer::ReferenceCount | |
| typedef platform::Size | Size |
| typedef platform::Size | size_type |
Protected Member Functions inherited from utility::pointer::ReferenceCount | |
| ReferenceCount () | |
| Default constructor. More... | |
| ReferenceCount (ReferenceCount const &) | |
| Copy constructor. More... | |
| ReferenceCount & | operator= (ReferenceCount const &) |
| Copy assignment. More... | |
The FileSystemResourceLocator is responsible for opening a file from the file system given its name (as the "locator tag" in the locate_resource_stream method ) and returning a FileStream object that wraps this file. This FileStream can then be used to construct a resource.
| basic::resource_manager::locator::FileSystemResourceLocator::FileSystemResourceLocator | ( | std::ios_base::openmode | open_mode = std::ios_base::in | ) |
| basic::resource_manager::locator::FileSystemResourceLocator::FileSystemResourceLocator | ( | FileSystemResourceLocator const & | src | ) |
|
virtual |
| std::ios_base::openmode basic::resource_manager::locator::FileSystemResourceLocator::get_open_mode | ( | ) | const |
References open_mode_.
|
virtual |
Construct a FileStream object given a file's name (its locator_tag)
Implements basic::resource_manager::ResourceLocator.
References base_path_, and basic::resource_manager::ResourceLocator::locator_tag().
|
virtual |
Allows a default base_path to be specified for the locator.
Set the value for base_path if specified in the ResourceDefintionFile.
Implements basic::resource_manager::ResourceLocator.
References base_path_.
| void basic::resource_manager::locator::FileSystemResourceLocator::set_open_mode | ( | std::ios_base::openmode | open_mode | ) |
References open_mode_.
|
virtual |
Write a description of this ResourceLocator to an out stream.
Implements basic::resource_manager::ResourceLocator.
References base_path_, basic::options::OptionKeys::in::in, open_mode_, and basic::options::OptionKeys::canonical_sampling::out::out.
|
virtual |
Return the class name for this ResourceLocator instance. This function allows for better error message delivery.
Implements basic::resource_manager::ResourceLocator.
|
private |
Referenced by locate_resource_stream(), parse_my_tag(), and show().
|
private |
Referenced by get_open_mode(), set_open_mode(), and show().
1.8.7