Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
utility::factory::WidgetFactory< Creator > Class Template Referenceabstract

Factory base class holds a map between strings and owning pointers of the creator classes. More...

#include <WidgetFactory.hh>

Public Types

typedef
utility::pointer::shared_ptr
< Creator > 
CreatorOP
 
typedef std::map< std::string,
CreatorOP
CreatorMap
 

Public Member Functions

 WidgetFactory ()=default
 
virtual ~WidgetFactory ()
 
void factory_register (CreatorOP creator)
 
virtual std::string factory_name () const =0
 

Protected Member Functions

CreatorMap const & creators () const
 

Private Attributes

CreatorMap creators_
 

Detailed Description

template<class Creator>
class utility::factory::WidgetFactory< Creator >

Factory base class holds a map between strings and owning pointers of the creator classes.

Factory base class holds a map between strings and owning pointers of the creator classes. This should only be used as a base class for a WidgetFactory which expects to map between strings and Creators. WidgetRegistrators may be used reguardless of how the Factory method maps to its Creators.

Member Typedef Documentation

template<class Creator >
typedef std::map< std::string, CreatorOP > utility::factory::WidgetFactory< Creator >::CreatorMap
template<class Creator >
typedef utility::pointer::shared_ptr< Creator > utility::factory::WidgetFactory< Creator >::CreatorOP

Constructor & Destructor Documentation

template<class Creator >
utility::factory::WidgetFactory< Creator >::WidgetFactory ( )
default
template<class Creator >
virtual utility::factory::WidgetFactory< Creator >::~WidgetFactory ( )
inlinevirtual

Member Function Documentation

template<class Creator >
CreatorMap const& utility::factory::WidgetFactory< Creator >::creators ( ) const
inlineprotected
template<class Creator >
virtual std::string utility::factory::WidgetFactory< Creator >::factory_name ( ) const
pure virtual
template<class Creator >
void utility::factory::WidgetFactory< Creator >::factory_register ( CreatorOP  creator)
inline

Member Data Documentation

template<class Creator >
CreatorMap utility::factory::WidgetFactory< Creator >::creators_
private

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