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

The StringResourceStream is a wrapper class for a std::stringstream that can be used to construct a resource. Useful when reading the resource stream in to memory (e.g. from a database or from multiple files) before trying to construct the resource. More...

#include <StringResourceStream.hh>

Public Member Functions

 StringResourceStream ()
 
 StringResourceStream (std::string const &contents)
 
template<class InputSource >
 StringResourceStream (InputSource &in_stream)
 Append a piece of data to the internal stringstream. More...
 
virtual ~StringResourceStream ()
 
virtual void fill (std::string const &contents)
 Construct the stringstream from the given input string. More...
 
virtual std::istream & stream ()
 Give non-const access to the internal stringstream 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

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

Private Attributes

std::stringstream 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

The StringResourceStream is a wrapper class for a std::stringstream that can be used to construct a resource. Useful when reading the resource stream in to memory (e.g. from a database or from multiple files) before trying to construct the resource.

Constructor & Destructor Documentation

basic::resource_manager::locator::StringResourceStream::StringResourceStream ( )

If you use this constructor be sure to set the string before accessing the stream

basic::resource_manager::locator::StringResourceStream::StringResourceStream ( std::string const &  contents)
template<class InputSource >
basic::resource_manager::locator::StringResourceStream::StringResourceStream ( InputSource &  in_stream)
inline

Append a piece of data to the internal stringstream.

References stream_.

basic::resource_manager::locator::StringResourceStream::StringResourceStream ( StringResourceStream const &  src)
private

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

This is private. The StringResourceStream shouldn't be copied

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

Member Function Documentation

void basic::resource_manager::locator::StringResourceStream::fill ( std::string const &  contents)
virtual

Construct the stringstream from the given input string.

References stream_.

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

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

Implements basic::resource_manager::ResourceStream.

References stream_.

Member Data Documentation

std::stringstream basic::resource_manager::locator::StringResourceStream::stream_
private

Referenced by fill(), stream(), and StringResourceStream().


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