Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>

Inheritance diagram for basic::resource_manager::locator::FileStream:
Inheritance graph
[legend]

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...
 
 ~FileStream () override
 
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...
 
std::istream & stream () override
 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
 ~ResourceStream () override
 
- 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
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Private Member Functions

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

Private Attributes

utility::io::izstream stream_
 

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 ( )
overridedefault
basic::resource_manager::locator::FileStream::FileStream ( FileStream const &  )
private

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

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 CREATE_EXCEPTION, utility::io::izstream::open(), and stream_.

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

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: