Rosetta Utilities  2014.35
Public Member Functions | List of all members
basic::resource_manager::ResourceLoader Class Referenceabstract

The ResourceLoader is responsible for instantiating a Resource object and initializing it. In order to do so, the ResourceLoader is given an input stream and a ResourceOptions object. Note that the ResourceOptions object has to be of the right type, or the ResourceLoader will not be able to read the data that it needs out of it. If the ResourceLoader is given the wrong kind of ResourceOptions object, it will throw an exception. More...

#include <ResourceLoader.hh>

Public Member Functions

virtual ~ResourceLoader ()
 
virtual ResourceOP create_resource (ResourceOptions const &options, LocatorID const &locator_id, std::istream &istream) const =0
 Create a resource, held in an owning pointer, of any type which will be stored and whose lifetime will be governed by the ResourceManager. More...
 
virtual ResourceOptionsOP default_options () const =0
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

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 ResourceLoader is responsible for instantiating a Resource object and initializing it. In order to do so, the ResourceLoader is given an input stream and a ResourceOptions object. Note that the ResourceOptions object has to be of the right type, or the ResourceLoader will not be able to read the data that it needs out of it. If the ResourceLoader is given the wrong kind of ResourceOptions object, it will throw an exception.

Constructor & Destructor Documentation

basic::resource_manager::ResourceLoader::~ResourceLoader ( )
virtual

Member Function Documentation

virtual ResourceOP basic::resource_manager::ResourceLoader::create_resource ( ResourceOptions const &  options,
LocatorID const &  locator_id,
std::istream &  istream 
) const
pure virtual

Create a resource, held in an owning pointer, of any type which will be stored and whose lifetime will be governed by the ResourceManager.

Implemented in basic::database::DatabaseSessionLoader.

virtual ResourceOptionsOP basic::resource_manager::ResourceLoader::default_options ( ) const
pure virtual

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