Rosetta Utilities  2014.35
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>

Public Member Functions

virtual ~ResourceManagerCreator ()
 
- Public Member Functions inherited from utility::pointer::ReferenceCount
void ctor ()
 
virtual ~ReferenceCount ()
 Destructor. More...
 
Size ref_count () const
 Reference count. More...
 

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
 

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

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 ( )
virtual

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: