From 1a4099b78717b16f632b0e7e0980a27811221e52 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Jul 2014 09:57:09 +0200 Subject: Implement anyType and anySimpleType content representation anyType as a DOM fragment, similar to wildcards. anySimpleType as a text string. --- libxsd/xsd/cxx/tree/types.hxx | 166 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) (limited to 'libxsd/xsd/cxx/tree/types.hxx') diff --git a/libxsd/xsd/cxx/tree/types.hxx b/libxsd/xsd/cxx/tree/types.hxx index 61a1e1a..288a291 100644 --- a/libxsd/xsd/cxx/tree/types.hxx +++ b/libxsd/xsd/cxx/tree/types.hxx @@ -271,6 +271,29 @@ namespace xsd } }; + /** + * @brief %string comparison operator. + * + * @return True if the strings are equal, false otherwise. + */ + template + inline bool + operator== (const string& a, const string& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %string comparison operator. + * + * @return True if the strings are not equal, false otherwise. + */ + template + inline bool + operator!= (const string& a, const string& b) + { + return !(a == b); + } /** * @brief Class corresponding to the XML Schema normalizedString @@ -1119,6 +1142,31 @@ namespace xsd //@} }; + /** + * @brief %nmtokens comparison operator. + * + * @return True if the lists of nmtokens are equal, false otherwise. + */ + template + inline bool + operator== (const nmtokens& a, + const nmtokens& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %nmtokens comparison operator. + * + * @return True if the lists of nmtokens are not equal, false otherwise. + */ + template + inline bool + operator!= (const nmtokens& a, + const nmtokens& b) + { + return !(a == b); + } /** * @brief Class corresponding to the XML Schema Name built-in @@ -2575,6 +2623,29 @@ namespace xsd //@} }; + /** + * @brief %idrefs comparison operator. + * + * @return True if the lists of idrefs are equal, false otherwise. + */ + template + inline bool + operator== (const idrefs& a, const idrefs& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %idrefs comparison operator. + * + * @return True if the lists of idrefs are not equal, false otherwise. + */ + template + inline bool + operator!= (const idrefs& a, const idrefs& b) + { + return !(a == b); + } /** * @brief Class corresponding to the XML Schema anyURI built-in @@ -2811,6 +2882,29 @@ namespace xsd friend class qname; }; + /** + * @brief %uri comparison operator. + * + * @return True if the uris are equal, false otherwise. + */ + template + inline bool + operator== (const uri& a, const uri& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %uri comparison operator. + * + * @return True if the uris are not equal, false otherwise. + */ + template + inline bool + operator!= (const uri& a, const uri& b) + { + return !(a == b); + } /** * @brief Class corresponding to the XML Schema QName built-in @@ -3211,6 +3305,29 @@ namespace xsd decode (const XMLCh*); }; + /** + * @brief %base64_binary comparison operator. + * + * @return True if the binaries are equal, false otherwise. + */ + template + inline bool + operator== (const base64_binary& a, const base64_binary& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %base64_binary comparison operator. + * + * @return True if the binaries are not equal, false otherwise. + */ + template + inline bool + operator!= (const base64_binary& a, const base64_binary& b) + { + return !(a == b); + } /** * @brief Class corresponding to the XML Schema hexBinary @@ -3404,6 +3521,29 @@ namespace xsd decode (const XMLCh*); }; + /** + * @brief %hex_binary comparison operator. + * + * @return True if the binaries are equal, false otherwise. + */ + template + inline bool + operator== (const hex_binary& a, const hex_binary& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %hex_binary comparison operator. + * + * @return True if the binaries are not equal, false otherwise. + */ + template + inline bool + operator!= (const hex_binary& a, const hex_binary& b) + { + return !(a == b); + } /** * @brief Class corresponding to the XML Schema ENTITY built-in @@ -3768,6 +3908,32 @@ namespace xsd container* c = 0); //@} }; + + /** + * @brief %entities comparison operator. + * + * @return True if the lists of entities are equal, false otherwise. + */ + template + inline bool + operator== (const entities& a, + const entities& b) + { + return static_cast&> (a) == b; + } + + /** + * @brief %entities comparison operator. + * + * @return True if the lists of entities are not equal, false otherwise. + */ + template + inline bool + operator!= (const entities& a, + const entities& b) + { + return !(a == b); + } } } } -- cgit v1.1