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

FileStream is a wrapper class for a utility::io::izstream object that derives from ResourceStream. More...

#include <FileSystemResourceLocator.hh>

Public Member Functions

 FileStream ()
 
 FileStream (std::string const &filename, std::ios_base::openmode open_mode=std::ios_base::in)
 Constructor that initializes both the name for the file and its openmode. More...
 
virtual ~FileStream ()
 
void open (std::string const &filename, std::ios_base::openmode open_mode=std::ios_base::in)
 Open a particular file; must be called if the default constructor is used. More...
 
virtual std::istream & stream ()
 Return non-const access to the internal stream so that it can be used to construct a resource. More...
 
- Public Member Functions inherited from basic::resource_manager::ResourceStream
virtual ~ResourceStream ()
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

Private Member Functions

 FileStream (FileStream const &src)
 This is private. The FileStream shouldn't be copied. More...
 

Private Attributes

utility::io::izstream stream_
 

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

FileStream is a wrapper class for a utility::io::izstream object that derives from ResourceStream.

Constructor & Destructor Documentation

basic::resource_manager::locator::FileStream::FileStream ( )

If you use this constructor be sure to use the open function before accessing the stream

basic::resource_manager::locator::FileStream::FileStream ( std::string const &  filename,
std::ios_base::openmode  open_mode = std::ios_base::in 
)
basic::resource_manager::locator::FileStream::FileStream ( FileStream const &  src)
private

This is private. The FileStream shouldn't be copied.

This is private. The FileStream shouldn't be copied

basic::resource_manager::locator::FileStream::~FileStream ( )
virtual

Member Function Documentation

void basic::resource_manager::locator::FileStream::open ( std::string const &  filename,
std::ios_base::openmode  open_mode = std::ios_base::in 
)

Open a particular file; must be called if the default constructor is used.

References utility::io::izstream::open(), and stream_.

istream & basic::resource_manager::locator::FileStream::stream ( )
virtual

Return non-const access to the internal stream so that it can be used to construct a resource.

Implements basic::resource_manager::ResourceStream.

References stream_.

Referenced by basic::resource_manager::locator::FileListResourceLocator::locate_resource_stream().

Member Data Documentation

utility::io::izstream basic::resource_manager::locator::FileStream::stream_
private

Referenced by FileStream(), open(), and stream().


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