27 #include "../common/Logger.h"
28 #include "../common/Translator.h"
35 #include <xercesc/util/PlatformUtils.hpp>
36 #include <xercesc/util/XMLString.hpp>
41 : te::plugin::CppPlugin(pInfo)
57 xercesc::XMLPlatformUtils::Initialize();
59 catch(
const xercesc::XMLException& e)
61 char* exceptMesg = xercesc::XMLString::transcode(e.getMessage());
63 std::string m =
TR_XERCES(
"Error during Xerces initialization. Exception messages is: ");
66 xercesc::XMLString::release(&exceptMesg);
68 throw te::xerces::Exception(m);
89 xercesc::XMLPlatformUtils::Terminate();
91 catch(
const xercesc::XMLException& e)
93 char* exceptMesg = xercesc::XMLString::transcode(e.getMessage());
95 std::string m =
TR_XERCES(
"Error during Xerces finalization. Exception messages is: ");
98 xercesc::XMLString::release(&exceptMesg);
100 throw te::xerces::Exception(m);
105 m_initialized =
true;
The basic information about a plugin.
static void initialize()
It initializes the factory: it will be registered in the abstract factory ReaderFactory.
An exception class for the xerces module.
#define TE_XERCES_TEXT_DOMAIN
It contains the name of the text domain used in the translation of messages in TerraLib Xerces module...
#define TE_LOG_TRACE(msg)
Use this tag in order to log a message to a specified logger with the TRACE level.
#define PLUGIN_CALL_BACK_IMPL(PLUGIN_CLASS_NAME)
This macro should be used by C++ plugins in order to declare the exportable/callable DLL function...
static void finalize()
It finalizes the factory: it will be destroyed and will be unregistered from the abstract factory Rea...
#define TE_ADD_TEXT_DOMAIN(domain, domaindir, codeset)
It adds the given text domain located at domain-dir with the given codeset to the multilingual system...
Module(const te::plugin::PluginInfo &pInfo)
Plugin constructor.
void shutdown()
This method will be called by TerraLib to shutdown plugin's functionality.
#define TE_XERCES_TEXT_DOMAIN_DIR
It contains the translation catalog directory.
void startup()
This method will be called by TerraLib to startup some plugin's functionality.
static bool m_initialized
The TerraLib Xerces module is a plugin.
#define TR_XERCES(message)
It marks a string in order to get translated. This is a special mark used in the Xerces module of Ter...