Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 XML "Tag" object. The ResourceLoader can also request other Resources from the ResourceManager in trying to construct a particular resource. More...

#include <ResourceLoader.hh>

Inheritance diagram for basic::resource_manager::ResourceLoader:
Inheritance graph
[legend]

Public Member Functions

 ~ResourceLoader () override
 
virtual ResourceCOP create_resource (ResourceManager &resource_manager, utility::tag::TagCOP resource_tag, std::string const &input_id, std::istream &istream) const =0
 Create a resource, held in an owning pointer, of any type which will be stored in the ResourceManager; a resource may depend on another resource held / managed by the ResourceManager. If a second (or third, or fourth, etc.) resource is requested during the construction of this resource, the resource manager will take note of their interdependency and preserve the second resource for as long as the first one has not been deallocated. More...
 
- 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
 

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 XML "Tag" object. The ResourceLoader can also request other Resources from the ResourceManager in trying to construct a particular resource.

Constructor & Destructor Documentation

basic::resource_manager::ResourceLoader::~ResourceLoader ( )
overridedefault

Member Function Documentation

virtual ResourceCOP basic::resource_manager::ResourceLoader::create_resource ( ResourceManager resource_manager,
utility::tag::TagCOP  resource_tag,
std::string const &  input_id,
std::istream &  istream 
) const
pure virtual

Create a resource, held in an owning pointer, of any type which will be stored in the ResourceManager; a resource may depend on another resource held / managed by the ResourceManager. If a second (or third, or fourth, etc.) resource is requested during the construction of this resource, the resource manager will take note of their interdependency and preserve the second resource for as long as the first one has not been deallocated.


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