diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-01-07 13:50:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-01-07 13:50:11 +0200 |
commit | 76d23e639004517db8f9469d64ac1789f8449365 (patch) | |
tree | dbafc8c4e31a97f74046c98af19d0fe76f360001 /libxsde/xsde/cxx/serializer/context.ixx | |
parent | c30caae30bc64974eeaa1e81aa2abdc203f5120d (diff) |
Add support for ISO-8859-1 as application encoding
New runtime configuration parameter, XSDE_ENCODING. New option,
--char-encoding. New test, tests/cxx/hybrid/iso8859-1.
Diffstat (limited to 'libxsde/xsde/cxx/serializer/context.ixx')
-rw-r--r-- | libxsde/xsde/cxx/serializer/context.ixx | 274 |
1 files changed, 0 insertions, 274 deletions
diff --git a/libxsde/xsde/cxx/serializer/context.ixx b/libxsde/xsde/cxx/serializer/context.ixx index 04cfe87..3612f0a 100644 --- a/libxsde/xsde/cxx/serializer/context.ixx +++ b/libxsde/xsde/cxx/serializer/context.ixx @@ -45,56 +45,6 @@ namespace xsde #else inline bool context:: #endif - start_element (const char* name) - { - genxStatus e = genxStartElementLiteral ( - xml_serializer_, - 0, - reinterpret_cast<constUtf8> (name)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - start_element (const char* ns, const char* name) - { - genxStatus e = genxStartElementLiteral ( - xml_serializer_, - reinterpret_cast<constUtf8> (ns), - reinterpret_cast<constUtf8> (name)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif end_element () { genxStatus e = genxEndElement (xml_serializer_); @@ -117,56 +67,6 @@ namespace xsde #else inline bool context:: #endif - start_attribute (const char* name) - { - genxStatus e = genxStartAttributeLiteral ( - xml_serializer_, - 0, - reinterpret_cast<constUtf8> (name)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - start_attribute (const char* ns, const char* name) - { - genxStatus e = genxStartAttributeLiteral ( - xml_serializer_, - reinterpret_cast<constUtf8> (ns), - reinterpret_cast<constUtf8> (name)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif end_attribute () { genxStatus e = genxEndAttribute (xml_serializer_); @@ -189,157 +89,6 @@ namespace xsde #else inline bool context:: #endif - attribute (const char* name, const char* value) - { - genxStatus e = genxAddAttributeLiteral ( - xml_serializer_, - 0, - reinterpret_cast<constUtf8> (name), - reinterpret_cast<constUtf8> (value)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - attribute (const char* ns, const char* name, const char* value) - { - genxStatus e = genxAddAttributeLiteral ( - xml_serializer_, - reinterpret_cast<constUtf8> (ns), - reinterpret_cast<constUtf8> (name), - reinterpret_cast<constUtf8> (value)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - characters (const char* s) - { - genxStatus e = genxAddText ( - xml_serializer_, - reinterpret_cast<constUtf8> (s)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - characters (const char* s, size_t n) - { - genxStatus e = genxAddCountedText ( - xml_serializer_, - reinterpret_cast<constUtf8> (s), - static_cast<int> (n)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - declare_namespace (const char* ns, const char* prefix) - { - genxStatus e = genxAddNamespaceLiteral ( - xml_serializer_, - reinterpret_cast<constUtf8> (ns), - reinterpret_cast<constUtf8> (prefix)); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif - declare_default_namespace (const char* ns) - { - genxStatus e = genxAddNamespaceLiteral ( - xml_serializer_, - reinterpret_cast<constUtf8> (ns), - reinterpret_cast<constUtf8> ("")); - -#ifdef XSDE_EXCEPTIONS - if (e != GENX_SUCCESS) - throw_xml_error (e); -#else - if (e != GENX_SUCCESS) - xml_error (e); - - return e == GENX_SUCCESS; -#endif - } - - // - // -#ifdef XSDE_EXCEPTIONS - inline void context:: -#else - inline bool context:: -#endif clear_default_namespace () { genxStatus e = genxUnsetDefaultNamespace (xml_serializer_); @@ -357,29 +106,6 @@ namespace xsde // // - inline const char* context:: - lookup_namespace_prefix (const char* ns) - { - genxStatus e; - genxNamespace gns = genxDeclareNamespace ( - xml_serializer_, reinterpret_cast<constUtf8> (ns), 0, &e); - - if (e != GENX_SUCCESS) - { -#ifdef XSDE_EXCEPTIONS - throw_xml_error (e); -#else - xml_error (e); -#endif - return 0; - } - - return reinterpret_cast<const char*> ( - genxGetNamespacePrefix (gns)); - } - - // - // #ifndef XSDE_EXCEPTIONS inline int context:: app_error () const |