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. --- xsd/cxx/tree/tree-inline.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'xsd/cxx/tree/tree-inline.cxx') diff --git a/xsd/cxx/tree/tree-inline.cxx b/xsd/cxx/tree/tree-inline.cxx index e6ed756..500ee73 100644 --- a/xsd/cxx/tree/tree-inline.cxx +++ b/xsd/cxx/tree/tree-inline.cxx @@ -82,6 +82,28 @@ namespace CXX << " " << base_type << " (o, f, this)" << "{" << "}"; + + // Comparison operators. + // + if (options.generate_comparison ()) + { + os << inl + << "bool" << endl + << "operator== (const " << name << "& x, " << + "const " << name << "& y)" + << "{" + << "const " << base_type << "& bx (x);" + << "return bx == y;" + << "}"; + + os << inl + << "bool" << endl + << "operator!= (const " << name << "& x, " << + "const " << name << "& y)" + << "{" + << "return !(x == y);" + << "}"; + } } private: -- cgit v1.1