This is the abstract factory for XML readers. More...
#include <ReaderFactory.h>
Public Types | |
typedef FactoryDictionary < AbstractFactory < te::xml::Reader, std::string, TKEYCOMPARE >, std::string, TKEYCOMPARE > | 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 | ~ReaderFactory () |
Virtual destructor. More... | |
Static Public Member Functions | |
static const factory_type * | find (const std::string &factoryKey) |
static dictionary_type & | getDictionary () |
It returns a reference to the internal dictionary of concrete factories. More... | |
static te::xml::Reader * | make () |
It creates a new XML reader using the dafault implementation. More... | |
static te::xml::Reader * | make (const std::string &readerType) |
It creates a new XML reader. More... | |
static void | setDefaultReader (const std::string &readerType) |
It sets the default driver used to create the XML reader objects. More... | |
Protected Member Functions | |
virtual te::xml::Reader * | build ()=0 |
Concrete factories (derived from this one) must implement this method in order to create objects. More... | |
ReaderFactory (const std::string &factoryKey) | |
It creates the factory. More... | |
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 std::string | sm_defaultReaderType |
The type of the reader to be created if no type is informed. More... | |
This is the abstract factory for XML readers.
This is an abstract factory, so you will need to call the static method make as follow:
or
Definition at line 61 of file ReaderFactory.h.
|
inherited |
Definition at line 73 of file AbstractFactory.h.
|
inherited |
Definition at line 77 of file AbstractFactory.h.
|
inlinevirtual |
Virtual destructor.
Reimplemented in te::xerces::ReaderFactory.
Definition at line 93 of file ReaderFactory.h.
|
protected |
It creates the factory.
The key of a ReaderFactory is a string.
factoryKey | The key that identifies the factory. |
Definition at line 49 of file ReaderFactory.cpp.
|
protectedpure virtualinherited |
Concrete factories (derived from this one) must implement this method in order to create objects.
Implemented in te::xerces::ReaderFactory.
|
staticinherited |
|
staticinherited |
It returns a reference to the internal dictionary of concrete factories.
The dictionary is a singleton.
|
inherited |
It returns the factory key associated to the concreate factory.
|
static |
It creates a new XML reader using the dafault implementation.
Definition at line 32 of file ReaderFactory.cpp.
References te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), and sm_defaultReaderType.
Referenced by te::plugin::GetInstalledPlugin(), te::xsd::Read(), te::serialize::xml::Read(), te::serialize::xml::ReadDataSourceInfo(), te::serialize::xml::ReadDialect(), te::qt::af::ReadProject(), te::xsd::serialize::ReadSchema(), and te::qt::widgets::ReadSymbolLibrary().
|
static |
It creates a new XML reader.
readerType | The type of XML reader to be created. |
Definition at line 37 of file ReaderFactory.cpp.
References te::common::Convert2UCase(), and te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make().
|
static |
It sets the default driver used to create the XML reader objects.
readerType | The default driver name for creating XML reader objects. |
Definition at line 43 of file ReaderFactory.cpp.
References te::common::Convert2UCase().
|
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.
|
staticprivate |
The type of the reader to be created if no type is informed.
Definition at line 108 of file ReaderFactory.h.
Referenced by make().