diff options
Diffstat (limited to 'src/plattform_guard.h')
-rw-r--r-- | src/plattform_guard.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plattform_guard.h b/src/plattform_guard.h new file mode 100644 index 0000000..9e99fdc --- /dev/null +++ b/src/plattform_guard.h @@ -0,0 +1,24 @@ +#ifndef INPUTXSLT_SRC_PLATTFORM_GUARD_H_ +#define INPUTXSLT_SRC_PLATTFORM_GUARD_H_ + +#include <xalanc/Include/PlatformDefinitions.hpp> +#include <xercesc/util/PlatformUtils.hpp> + +namespace xalan = xalanc_1_11; + +namespace InputXSLT { + +struct PlattformGuard { + PlattformGuard() { + xercesc::XMLPlatformUtils::Initialize(); + xalan::XalanTransformer::initialize(); + } + + ~PlattformGuard() { + xalan::XalanTransformer::terminate(); + } +}; + +} + +#endif // INPUTXSLT_SRC_PLATTFORM_GUARD_H_ |