ProjectWidgetFactory Class Reference

A factory to build the project frame object. More...

#include <ProjectWidgetFactory.h>

Inheritance diagram for ProjectWidgetFactory:
te::qt::af::SettingsWidgetsFactory te::common::AbstractFactory< AbstractSettingWidget, std::string >

Public Types

typedef FactoryDictionary< AbstractFactory< AbstractSettingWidget, std::string, std::less< std::string > >, std::string, std::less< std::string > > dictionary_type
 
typedef AbstractFactory factory_type
 

Public Member Functions

const std::string & getKey () const
 It returns the factory key associated to the concreate factory. More...
 
 ~ProjectWidgetFactory ()
 

Static Public Member Functions

static void finalize ()
 
static const factory_typefind (const std::string &factoryKey)
 
static dictionary_typegetDictionary ()
 It returns a reference to the internal dictionary of concrete factories. More...
 
static void initialize ()
 
static AbstractSettingWidget * make (const std::string &cwType, QWidget *parent=0)
 
static AbstractSettingWidget * make (const std::string &factoryKey)
 It creates an object with the appropriated factory. More...
 

Protected Member Functions

te::qt::af::AbstractSettingWidgetbuild ()
 Concrete factories (derived from this one) must implement this method in order to create objects. More...
 
virtual te::qt::af::AbstractSettingWidgetcreate (QWidget *parent=0)
 
 ProjectWidgetFactory ()
 

Protected Attributes

std::string m_factoryKey
 The key that identifies the concrete factory: it will be used for unregistering the factory during destruction. More...
 

Static Private Attributes

static ProjectWidgetFactorysm_factory
 

Detailed Description

A factory to build the project frame object.

Definition at line 42 of file ProjectWidgetFactory.h.

Member Typedef Documentation

typedef FactoryDictionary<AbstractFactory<AbstractSettingWidget , std::string , std::less<std::string > >, std::string , std::less<std::string > > te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::dictionary_type
inherited

Definition at line 73 of file AbstractFactory.h.

typedef AbstractFactory te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::factory_type
inherited

Definition at line 77 of file AbstractFactory.h.

Constructor & Destructor Documentation

ProjectWidgetFactory::~ProjectWidgetFactory ( )
ProjectWidgetFactory::ProjectWidgetFactory ( )
protected

Member Function Documentation

te::qt::af::AbstractSettingWidget* ProjectWidgetFactory::build ( )
protectedvirtual

Concrete factories (derived from this one) must implement this method in order to create objects.

Returns
It returns an object created by the concrete factory.

Implements te::common::AbstractFactory< AbstractSettingWidget, std::string >.

virtual te::qt::af::AbstractSettingWidget* ProjectWidgetFactory::create ( QWidget *  parent = 0)
protectedvirtual
static void ProjectWidgetFactory::finalize ( )
static
static const factory_type* te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::find ( const std::string &  factoryKey)
staticinherited
static dictionary_type& te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::getDictionary ( )
staticinherited

It returns a reference to the internal dictionary of concrete factories.

The dictionary is a singleton.

Returns
A reference to the internal dictionary.
const std::string & te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::getKey ( ) const
inherited

It returns the factory key associated to the concreate factory.

Returns
The factory key associated to the concreate factory.
static void ProjectWidgetFactory::initialize ( )
static
AbstractSettingWidget * te::qt::af::SettingsWidgetsFactory::make ( const std::string &  cwType,
QWidget *  parent = 0 
)
inlinestaticinherited
static AbstractSettingWidget * te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::make ( const std::string &  factoryKey)
staticinherited

It creates an object with the appropriated factory.

Parameters
factoryKeyA key that identifies the factory used to build the object.
Returns
It returns a new object created by the given factory.
Exceptions
ExceptionIf the concrete factory is not specified or the object can not be built for any reason this methiod may throws an exception.
Note
The caller of this method will take the ownership of the returned object.

Member Data Documentation

std::string te::common::AbstractFactory< AbstractSettingWidget , std::string , std::less<std::string > >::m_factoryKey
protectedinherited

The key that identifies the concrete factory: it will be used for unregistering the factory during destruction.

Definition at line 136 of file AbstractFactory.h.

ProjectWidgetFactory* ProjectWidgetFactory::sm_factory
staticprivate

Definition at line 62 of file ProjectWidgetFactory.h.


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