te::qt::widgets::ChartWidgetFactory Class Referenceabstract

A factory to build widget objects. More...

#include <ChartWidgetFactory.h>

Inheritance diagram for te::qt::widgets::ChartWidgetFactory:
te::common::AbstractFactory< te::qt::widgets::ChartWidget, std::string > te::qt::widgets::ChartStyleFrameFactory te::qt::widgets::HistogramFrameFactory te::qt::widgets::ScatterFrameFactory te::qt::widgets::TimeSeriesFrameFactory

Public Types

typedef FactoryDictionary< AbstractFactory< te::qt::widgets::ChartWidget, 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...
 
virtual ~ChartWidgetFactory ()
 Virtual destructor. More...
 

Static Public Member Functions

static const factory_typefind (const std::string &factoryKey)
 
static dictionary_typegetDictionary ()
 It returns a reference to the internal dictionary of concrete factories. More...
 
static te::qt::widgets::ChartWidgetmake (const std::string &cwType)
 
static te::qt::widgets::ChartWidgetmake (const std::string &cwType, QWidget *parent=0)
 

Protected Member Functions

virtual te::qt::widgets::ChartWidgetbuild ()=0
 Concrete factories (derived from this one) must implement this method in order to create objects. More...
 
 ChartWidgetFactory (const std::string &factoryKey)
 It creates the factory. More...
 
virtual te::qt::widgets::ChartWidgetcreate (QWidget *Parent=0)=0
 

Protected Attributes

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

Detailed Description

A factory to build widget objects.

Definition at line 50 of file ChartWidgetFactory.h.

Member Typedef Documentation

◆ dictionary_type

typedef FactoryDictionary<AbstractFactory<te::qt::widgets::ChartWidget , std::string , std::less<std::string > >, std::string , std::less<std::string > > te::common::AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::dictionary_type
inherited

Definition at line 73 of file AbstractFactory.h.

◆ factory_type

typedef AbstractFactory te::common::AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::factory_type
inherited

Definition at line 77 of file AbstractFactory.h.

Constructor & Destructor Documentation

◆ ~ChartWidgetFactory()

virtual te::qt::widgets::ChartWidgetFactory::~ChartWidgetFactory ( )
virtual

Virtual destructor.

Note
It will automatically unregister the factory from the dictionary.

◆ ChartWidgetFactory()

te::qt::widgets::ChartWidgetFactory::ChartWidgetFactory ( const std::string &  factoryKey)
protected

It creates the factory.

The key of a ChartWidgetFactory is a string.

Parameters
factoryKeyThe key that identifies the factory.

Member Function Documentation

◆ build()

virtual te::qt::widgets::ChartWidget * te::common::AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::build ( )
protectedpure virtualinherited

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.

Implemented in te::qt::widgets::ChartStyleFrameFactory, te::qt::widgets::HistogramFrameFactory, te::qt::widgets::ScatterFrameFactory, and te::qt::widgets::TimeSeriesFrameFactory.

◆ create()

virtual te::qt::widgets::ChartWidget* te::qt::widgets::ChartWidgetFactory::create ( QWidget *  Parent = 0)
protectedpure virtual

◆ find()

const AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::factory_type * te::common::AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::find ( const std::string &  factoryKey)
inlinestaticinherited

◆ getDictionary()

AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::dictionary_type & te::common::AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::getDictionary ( )
inlinestaticinherited

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

The dictionary is a singleton.

Returns
A reference to the internal dictionary.

Definition at line 157 of file AbstractFactory.h.

◆ getKey()

const std::string & te::common::AbstractFactory< te::qt::widgets::ChartWidget , std::string , std::less<std::string > >::getKey ( ) const
inlineinherited

It returns the factory key associated to the concreate factory.

Returns
The factory key associated to the concreate factory.

Definition at line 140 of file AbstractFactory.h.

◆ make() [1/2]

static te::qt::widgets::ChartWidget* te::qt::widgets::ChartWidgetFactory::make ( const std::string &  cwType)
static

◆ make() [2/2]

static te::qt::widgets::ChartWidget* te::qt::widgets::ChartWidgetFactory::make ( const std::string &  cwType,
QWidget *  parent = 0 
)
static

Member Data Documentation

◆ m_factoryKey

std::string te::common::AbstractFactory< te::qt::widgets::ChartWidget , 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.


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