Collaboration diagram for org::xmlBlaster::util::parser::ParserFactory:
Public Member Functions | |
~ParserFactory () | |
std::string | getLocale (org::xmlBlaster::util::Global &global) |
The locale used to initialize the parser. | |
void | initialize (org::xmlBlaster::util::Global &global) |
Initialize the used parser. | |
I_Parser * | createParser (org::xmlBlaster::util::Global &global, XmlHandlerBase *handler) |
Creates a parser implementation. | |
Static Public Member Functions | |
static ParserFactory & | getFactory () |
Static access to the factory. | |
Friends | |
class | Sax2Parser |
You may use this as the interface to extend in your specific XML handling (example SAX2).
It is a singleton class and has for that reason private constructors, destructor and assignment operator. To get a reference to the singleton instance you must invoke getFactory(...).
Definition at line 27 of file ParserFactory.h.
org::xmlBlaster::util::parser::ParserFactory::~ParserFactory | ( | ) |
Definition at line 114 of file ParserFactory.cpp.
ParserFactory & org::xmlBlaster::util::parser::ParserFactory::getFactory | ( | ) | [static] |
Static access to the factory.
XmlBlasterException |
Definition at line 88 of file ParserFactory.cpp.
References org::xmlBlaster::util::Object_Lifetime_Manager::instance(), and org::xmlBlaster::util::Object_Lifetime_Manager::manage_object().
Referenced by org::xmlBlaster::client::XmlBlasterAccess::XmlBlasterAccess().
std::string org::xmlBlaster::util::parser::ParserFactory::getLocale | ( | org::xmlBlaster::util::Global & | global | ) |
The locale used to initialize the parser.
Xerces defaults to "en_US", configurable with for example -xmlBlaster/locale
"de_DE.iso-8859-1" or "en_US.UTF-8"
Definition at line 126 of file ParserFactory.cpp.
References org::xmlBlaster::util::Global::getProperty(), and org::xmlBlaster::util::Property::getStringProperty().
Referenced by initialize().
void org::xmlBlaster::util::parser::ParserFactory::initialize | ( | org::xmlBlaster::util::Global & | global | ) |
Initialize the used parser.
The locale is set if the Initialize() is invoked for the very first time, to ensure that each and every message loaders, in the process space, share the same locale.
All subsequent invocations of Initialize(), with a different locale, have no effect on the message loaders, either instantiated, or to be instantiated.
Definition at line 133 of file ParserFactory.cpp.
References getLocale(), org::xmlBlaster::util::INTERNAL_UNKNOWN, and org::xmlBlaster::util::parser::Sax2Parser::releaseXMLCh().
Referenced by createParser(), and org::xmlBlaster::client::XmlBlasterAccess::XmlBlasterAccess().
I_Parser * org::xmlBlaster::util::parser::ParserFactory::createParser | ( | org::xmlBlaster::util::Global & | global, | |
XmlHandlerBase * | handler | |||
) |
Creates a parser implementation.
It is the responsibility of the user to delete the I_Parser object once it is not needed anymore.
XmlBlasterException |
Definition at line 159 of file ParserFactory.cpp.
References initialize(), org::xmlBlaster::util::INTERNAL_UNKNOWN, org::xmlBlaster::util::parser::Sax2Parser::releaseXMLCh(), and Sax2Parser.
friend class Sax2Parser [friend] |