Rosetta Utilities  2014.35
Public Member Functions | Private Attributes | List of all members
basic::resource_manager::locator::FileSystemResourceLocator Class Reference

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...
 
ReferenceCountoperator= (ReferenceCount const &)
 Copy assignment. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

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)
basic::resource_manager::locator::FileSystemResourceLocator::~FileSystemResourceLocator ( )
virtual

Member Function Documentation

std::ios_base::openmode basic::resource_manager::locator::FileSystemResourceLocator::get_open_mode ( ) const

References open_mode_.

ResourceStreamOP basic::resource_manager::locator::FileSystemResourceLocator::locate_resource_stream ( std::string const &  locator_tag) const
virtual

Construct a FileStream object given a file's name (its locator_tag)

Implements basic::resource_manager::ResourceLocator.

References base_path_, basic::resource_manager::ResourceLocator::locator_tag(), and open_mode_.

void basic::resource_manager::locator::FileSystemResourceLocator::parse_my_tag ( utility::tag::TagCOP  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_.

void basic::resource_manager::locator::FileSystemResourceLocator::show ( std::ostream &  out) const
virtual
std::string basic::resource_manager::locator::FileSystemResourceLocator::type ( ) const
virtual

Return the class name for this ResourceLocator instance. This function allows for better error message delivery.

Implements basic::resource_manager::ResourceLocator.

Member Data Documentation

std::string basic::resource_manager::locator::FileSystemResourceLocator::base_path_
private
std::ios_base::openmode basic::resource_manager::locator::FileSystemResourceLocator::open_mode_
private

The documentation for this class was generated from the following files: