This is the concrete factory for XML writer built on top of Xerces-C++ parser. More...
#include <WriterFactory.h>
Public Types | |
typedef FactoryDictionary< AbstractFactory< te::xml::AbstractWriter, 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... | |
~WriterFactory () | |
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::AbstractWriter * | make () |
It creates a new XML writer using the dafault implementation. More... | |
static te::xml::AbstractWriter * | make (const std::string &writerType) |
It creates a new XML writer. More... | |
static void | setDefaultWriter (const std::string &writerType) |
It sets the default driver used to create the XML writer objects. More... | |
Protected Member Functions | |
te::xml::AbstractWriter * | build () |
Concrete factories (derived from this one) must implement this method in order to create objects. More... | |
WriterFactory () | |
Static Protected Member Functions | |
static void | finalize () |
It finalizes the factory: it will be destroyed and will be unregistered from the abstract factory WriterFactory. More... | |
static void | initialize () |
It initializes the factory: it will be registered in the abstract factory WriterFactory. 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 WriterFactory * | sm_factory |
A pointer to the global Xerces XML Writer factory. More... | |
Friends | |
class | Module |
This is the concrete factory for XML writer built on top of Xerces-C++ parser.
Definition at line 47 of file WriterFactory.h.
|
inherited |
Definition at line 73 of file AbstractFactory.h.
|
inherited |
Definition at line 77 of file AbstractFactory.h.
te::xerces::WriterFactory::~WriterFactory | ( | ) |
Definition at line 32 of file WriterFactory.cpp.
|
protected |
Definition at line 41 of file WriterFactory.cpp.
|
protectedvirtual |
Concrete factories (derived from this one) must implement this method in order to create objects.
Implements te::common::AbstractFactory< te::xml::AbstractWriter, std::string >.
Definition at line 36 of file WriterFactory.cpp.
|
staticprotected |
It finalizes the factory: it will be destroyed and will be unregistered from the abstract factory WriterFactory.
Definition at line 52 of file WriterFactory.cpp.
Referenced by te::xerces::Module::shutdown().
|
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.
|
staticprotected |
It initializes the factory: it will be registered in the abstract factory WriterFactory.
Definition at line 46 of file WriterFactory.cpp.
Referenced by te::xerces::Module::startup().
|
staticinherited |
It creates a new XML writer using the dafault implementation.
Definition at line 33 of file AbstractWriterFactory.cpp.
References te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make(), and te::xml::AbstractWriterFactory::sm_defaultWriterType.
Referenced by te::serialize::xml::Save(), and te::qt::af::Save().
|
staticinherited |
It creates a new XML writer.
writerType | The type of XML writer to be created. |
Definition at line 38 of file AbstractWriterFactory.cpp.
References te::common::Convert2UCase(), and te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::make().
|
staticinherited |
It sets the default driver used to create the XML writer objects.
writerType | The default driver name for creating XML writer objects. |
Definition at line 47 of file AbstractWriterFactory.cpp.
References te::common::Convert2UCase().
|
friend |
Definition at line 69 of file WriterFactory.h.
|
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 |
A pointer to the global Xerces XML Writer factory.
Definition at line 67 of file WriterFactory.h.