Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Friends | List of all members
basic::resource_manager::ResourceManagerCreator Class Referenceabstract

Derived classes will be used by the ResourceManagerFactory to decide which of the various ResourceManagers should be instantiated. The ResourceManager is a singleton, but, different ResourceManagers can be instantiated in different contexts. More...

#include <ResourceManagerCreator.hh>

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

Public Member Functions

 ~ResourceManagerCreator () 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

virtual ResourceManagercreate_resource_manager () const =0
 Returns a raw pointer, not an owning pointer, to the ResourceManager. The ResourceManager is a singleton class, and will be held in a raw pointer by the base class. Each derived ResourceManagerCreator should be a friend of the corresponding ResourceManager. This function is private, meaning it should only be called by its friend class, the ResourceManagerFactory. More...
 
virtual std::string manager_type () const =0
 Give the name of the ResourceManager that this Creator instantiates to the ResourceManagerFactory. The ResourceManagerFactory reads the option system and instantiates the appropriate ResourceManager by string lookup: this is a hokey way of "decoupling" the logic for ResourceManager instantiation that must happen high up in the library hierarchy: the ResourceManagerFactory does not, e.g., need to #include the JD2ResourceManagerCreator from protocols::jd2. More...
 

Friends

class ResourceManagerFactory
 

Detailed Description

Derived classes will be used by the ResourceManagerFactory to decide which of the various ResourceManagers should be instantiated. The ResourceManager is a singleton, but, different ResourceManagers can be instantiated in different contexts.

Constructor & Destructor Documentation

basic::resource_manager::ResourceManagerCreator::~ResourceManagerCreator ( )
overridedefault

Member Function Documentation

virtual ResourceManager* basic::resource_manager::ResourceManagerCreator::create_resource_manager ( ) const
privatepure virtual

Returns a raw pointer, not an owning pointer, to the ResourceManager. The ResourceManager is a singleton class, and will be held in a raw pointer by the base class. Each derived ResourceManagerCreator should be a friend of the corresponding ResourceManager. This function is private, meaning it should only be called by its friend class, the ResourceManagerFactory.

virtual std::string basic::resource_manager::ResourceManagerCreator::manager_type ( ) const
privatepure virtual

Give the name of the ResourceManager that this Creator instantiates to the ResourceManagerFactory. The ResourceManagerFactory reads the option system and instantiates the appropriate ResourceManager by string lookup: this is a hokey way of "decoupling" the logic for ResourceManager instantiation that must happen high up in the library hierarchy: the ResourceManagerFactory does not, e.g., need to #include the JD2ResourceManagerCreator from protocols::jd2.

Friends And Related Function Documentation

friend class ResourceManagerFactory
friend

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