https://issues.shibboleth.net/jira/browse/CPPXT-18
[shibboleth/cpp-xmltooling.git] / xmltooling / base.h
index 450c37f..05128dd 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *  Copyright 2001-2007 Internet2\r
- * \r
+ *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
@@ -16,7 +16,7 @@
 \r
 /**\r
  * @file xmltooling/base.h\r
- * \r
+ *\r
  * Base header file definitions\r
  * Must be included prior to including any other header\r
  */\r
  * Begins the declaration of an XMLObject specialization for an abstract element/type.\r
  * Basic boilerplate includes a protected constructor, empty virtual destructor,\r
  * and Unicode constants for the default associated element's name and prefix.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the class to declare\r
  * @param base      the base class to derive from using public virtual inheritance\r
  * Begins the declaration of an XMLObject specialization.\r
  * Basic boilerplate includes a protected constructor, empty virtual destructor,\r
  * and Unicode constants for the default associated element's name and prefix.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the class to declare\r
  * @param base      the base class to derive from using public virtual inheritance\r
  * Begins the declaration of an XMLObject specialization with two base classes.\r
  * Basic boilerplate includes a protected constructor, empty virtual destructor,\r
  * and Unicode constants for the default associated element's name and prefix.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the class to declare\r
  * @param base      the first base class to derive from using public virtual inheritance\r
  * Begins the declaration of an XMLObject specialization with three base classes.\r
  * Basic boilerplate includes a protected constructor, empty virtual destructor,\r
  * and Unicode constants for the default associated element's name and prefix.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the class to declare\r
  * @param base      the first base class to derive from using public virtual inheritance\r
  * Begins the declaration of an XMLObject specialization with four base classes.\r
  * Basic boilerplate includes a protected constructor, empty virtual destructor,\r
  * and Unicode constants for the default associated element's name and prefix.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the class to declare\r
  * @param base      the first base class to derive from using public virtual inheritance\r
  * Begins the declaration of an XMLObject specialization with five base classes.\r
  * Basic boilerplate includes a protected constructor, empty virtual destructor,\r
  * and Unicode constants for the default associated element's name and prefix.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the class to declare\r
  * @param base      the first base class to derive from using public virtual inheritance\r
 \r
 /**\r
  * Implements a static variable holding an XMLObject's element QName.\r
- * \r
+ *\r
  * @param cname             the name of the XMLObject specialization\r
  * @param namespaceURI      the XML namespace of the default associated element\r
  * @param namespacePrefix   the XML namespace prefix of the default associated element\r
 \r
 /**\r
  * Implements a static variable holding an XMLObject's schema type QName.\r
- * \r
+ *\r
  * @param cname             the name of the XMLObject specialization\r
  * @param namespaceURI      the XML namespace of the default associated element\r
  * @param namespacePrefix   the XML namespace prefix of the default associated element\r
 /**\r
  * Declares abstract set method for a typed XML attribute.\r
  * The get method is omitted.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  * @param type      the attribute's data type\r
 \r
 /**\r
  * Declares abstract get/set methods for a typed XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  * @param type      the attribute's data type\r
 /**\r
  * Declares abstract set method for a string XML attribute.\r
  * The get method is omitted.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  */\r
 \r
 /**\r
  * Declares abstract get/set methods for a string XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  */\r
 /**\r
  * Declares abstract set method for a DateTime XML attribute.\r
  * The get method is omitted.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  */\r
 \r
 /**\r
  * Declares abstract get/set methods for a DateTime XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  */\r
 /**\r
  * Declares abstract set method for an integer XML attribute.\r
  * The get method is omitted.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  */\r
 \r
 /**\r
  * Declares abstract get/set methods for an integer XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  */\r
 \r
 /**\r
  * Declares abstract get/set methods for a boolean XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param upcased   the upcased name of the attribute\r
  * @param def       the default/presumed value, if no explicit value has been set\r
 \r
 /**\r
  * Implements get/set methods and a private member for a typed XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param type      the attribute's data type\r
  */\r
 \r
 /**\r
  * Implements get/set methods and a private member for a string XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  */\r
 #define IMPL_STRING_ATTRIB(proper) \\r
 /**\r
  * Implements get/set methods and a private member for a string XML attribute,\r
  * plus a getXMLID override.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  */\r
 #define IMPL_ID_ATTRIB(proper) \\r
 \r
 /**\r
  * Implements get/set methods and a private member for a DateTime XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  * @param fallback  epoch to return when attribute is NULL\r
  */\r
 #define IMPL_DATETIME_ATTRIB(proper,fallback) \\r
+    IMPL_DATETIME_ATTRIB_EX(proper,fallback,false)\r
+\r
+/**\r
+ * Implements get/set methods and a private member for a duration-valued DateTime XML attribute.\r
+ *\r
+ * @param proper    the proper name of the attribute\r
+ * @param fallback  epoch to return when attribute is NULL\r
+ */\r
+#define IMPL_DURATION_ATTRIB(proper,fallback) \\r
+    IMPL_DATETIME_ATTRIB_EX(proper,fallback,true)\r
+\r
+/**\r
+ * Implements get/set methods and a private member for a DateTime XML attribute.\r
+ *\r
+ * @param proper    the proper name of the attribute\r
+ * @param fallback  epoch to return when attribute is NULL\r
+ * @param duration  true iff the attribute should be handled as a duration\r
+ */\r
+#define IMPL_DATETIME_ATTRIB_EX(proper,fallback,duration) \\r
     protected: \\r
         DateTime* m_##proper; \\r
         time_t m_##proper##Epoch; \\r
                 m_##proper##Epoch=m_##proper->getEpoch(); \\r
         } \\r
         void set##proper(time_t proper) { \\r
-            m_##proper = prepareForAssignment(m_##proper,proper); \\r
+            m_##proper = prepareForAssignment(m_##proper,proper,duration); \\r
             m_##proper##Epoch = proper; \\r
         } \\r
         void set##proper(const XMLCh* proper) { \\r
-            m_##proper = prepareForAssignment(m_##proper,proper); \\r
+            m_##proper = prepareForAssignment(m_##proper,proper,duration); \\r
             if (m_##proper) \\r
                 m_##proper##Epoch=m_##proper->getEpoch(); \\r
         }\r
 \r
 /**\r
  * Implements get/set methods and a private member for an integer XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  */\r
 #define IMPL_INTEGER_ATTRIB(proper) \\r
 \r
 /**\r
  * Implements get/set methods and a private member for a boolean XML attribute.\r
- * \r
+ *\r
  * @param proper    the proper name of the attribute\r
  */\r
 #define IMPL_BOOLEAN_ATTRIB(proper) \\r
 /**\r
  * Declares abstract set method for a typed XML child object in a foreign namespace.\r
  * The get method is omitted.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  * @param ns        the C++ namespace for the type\r
  */\r
 \r
 /**\r
  * Declares abstract get/set methods for a typed XML child object in a foreign namespace.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  * @param ns        the C++ namespace for the type\r
  */\r
 /**\r
  * Declares abstract set method for a typed XML child object.\r
  * The get method is omitted.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  */\r
 #define DECL_INHERITED_TYPED_CHILD(proper) \\r
 \r
 /**\r
  * Declares abstract get/set methods for a typed XML child object.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  */\r
 #define DECL_TYPED_CHILD(proper) \\r
 \r
 /**\r
  * Declares abstract get/set methods for a generic XML child object.\r
- * \r
+ *\r
  * @param proper    the proper name of the child\r
  */\r
 #define DECL_XMLOBJECT_CHILD(proper) \\r
 \r
 /**\r
  * Implements get/set methods and a private list iterator member for a typed XML child object.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  */\r
 #define IMPL_TYPED_CHILD(proper) \\r
 /**\r
  * Implements get/set methods and a private list iterator member for\r
  * a typed XML child object in a foreign namespace\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  * @param ns        the C++ namespace for the type\r
  */\r
 \r
 /**\r
  * Implements get/set methods and a private list iterator member for a generic XML child object.\r
- * \r
+ *\r
  * @param proper    the proper name of the child\r
  */\r
 #define IMPL_XMLOBJECT_CHILD(proper) \\r
 \r
 /**\r
  * Declares abstract get/set methods for a typed XML child collection.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  */\r
 #define DECL_TYPED_CHILDREN(proper) \\r
 \r
 /**\r
  * Declares abstract get/set methods for a typed XML child collection in a foreign namespace.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  * @param ns        the C++ namespace for the type\r
  */\r
 \r
 /**\r
  * Declares abstract get/set methods for a generic XML child collection.\r
- * \r
+ *\r
  * @param proper    the proper name of the child\r
  */\r
 #define DECL_XMLOBJECT_CHILDREN(proper) \\r
 \r
 /**\r
  * Implements get method and a private vector member for a typed XML child collection.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  * @param fence     insertion fence for new objects of the child collection in backing list\r
  */\r
         } \\r
         const std::vector<proper*>& get##proper##s() const { \\r
             return m_##proper##s; \\r
-        } \r
+        }\r
 \r
 /**\r
  * Implements get method and a private vector member for a typed XML child collection\r
  * in a foreign namespace.\r
- * \r
+ *\r
  * @param proper    the proper name of the child type\r
  * @param ns        the C++ namespace for the type\r
  * @param fence     insertion fence for new objects of the child collection in backing list\r
         } \\r
         const std::vector<ns::proper*>& get##proper##s() const { \\r
             return m_##proper##s; \\r
-        } \r
+        }\r
 \r
 /**\r
  * Implements get method and a private vector member for a generic XML child collection.\r
- * \r
+ *\r
  * @param proper    the proper name of the child\r
  * @param fence     insertion fence for new objects of the child collection in backing list\r
  */\r
         } \\r
         const std::vector<xmltooling::XMLObject*>& get##proper##s() const { \\r
             return m_##proper##s; \\r
-        } \r
+        }\r
 \r
 /**\r
  * Implements marshalling for a string attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements marshalling for a DateTime attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements marshalling for an integer attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements marshalling for a boolean attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements marshalling for a QName attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements marshalling for an ID attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for a string attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for an ID attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for a DateTime attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for a DateTime attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for an integer attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for a boolean attribute\r
- * \r
+ *\r
  * @param proper        the proper name of the attribute\r
  * @param ucase         the upcased name of the attribute\r
  * @param namespaceURI  the XML namespace of the attribute\r
 \r
 /**\r
  * Implements unmarshalling process branch for typed child collection element\r
- * \r
+ *\r
  * @param proper        the proper name of the child type\r
  * @param namespaceURI  the XML namespace of the child element\r
  * @param force         bypass use of hint and just cast down to check child\r
 /**\r
  * Implements unmarshalling process branch for typed child collection element\r
  * in a foreign namespace.\r
- * \r
+ *\r
  * @param proper        the proper name of the child type\r
  * @param ns            the C++ namespace for the type\r
  * @param namespaceURI  the XML namespace of the child element\r
 \r
 /**\r
  * Implements unmarshalling process branch for typed child singleton element\r
- * \r
+ *\r
  * @param proper        the proper name of the child type\r
  * @param namespaceURI  the XML namespace of the child element\r
  * @param force         bypass use of hint and just cast down to check child\r
 /**\r
  * Implements unmarshalling process branch for typed child singleton element\r
  * in a foreign namespace.\r
- * \r
+ *\r
  * @param proper        the proper name of the child type\r
  * @param ns            the C++ namespace for the type\r
  * @param namespaceURI  the XML namespace of the child element\r
 \r
 /**\r
  * Implements unmarshalling process branch for a generic child singleton element\r
- * \r
+ *\r
  * @param proper        the proper name of the child type\r
  * @param namespaceURI  the XML namespace of the child element\r
  */\r
 \r
 /**\r
  * Declares aliased get/set methods for named XML element simple content.\r
- * \r
+ *\r
  * @param proper    the proper name to label the element's content\r
  */\r
 #define DECL_SIMPLE_CONTENT(proper) \\r
 \r
 /**\r
  * Declares aliased get/set methods for named integer XML element content.\r
- * \r
+ *\r
  * @param proper    the proper name to label the element's content\r
  */\r
 #define DECL_INTEGER_CONTENT(proper) \\r
 \r
 /**\r
  * Implements cloning methods for an XMLObject specialization implementation class.\r
- * \r
+ *\r
  * @param cname    the name of the XMLObject specialization\r
  */\r
 #define IMPL_XMLOBJECT_CLONE(cname) \\r
 /**\r
  * Declares an XMLObject specialization with a simple content model and type,\r
  * handling it as string data.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the XMLObject specialization\r
  * @param proper    the proper name to label the element's content\r
 /**\r
  * Declares and defines an implementation class for an XMLObject with\r
  * a simple content model and type, handling it as string data.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the XMLObject specialization\r
  */\r
  * Begins the declaration of an XMLObjectBuilder specialization.\r
  * Basic boilerplate includes an empty virtual destructor, and\r
  * a default builder that defaults the element name.\r
- * \r
+ *\r
  * @param linkage           linkage specifier for the class\r
  * @param cname             the name of the XMLObject specialization\r
  * @param namespaceURI      the XML namespace of the default associated element\r
 \r
 /**\r
  * Declares a generic XMLObjectBuilder specialization.\r
- * \r
+ *\r
  * @param linkage           linkage specifier for the class\r
  * @param cname             the name of the XMLObject specialization\r
  * @param namespaceURI      the XML namespace of the default associated element\r
     END_XMLOBJECTBUILDER\r
 \r
 /**\r
- * Implements the standard XMLObjectBuilder specialization function. \r
- * \r
+ * Implements the standard XMLObjectBuilder specialization function.\r
+ *\r
  * @param cname the name of the XMLObject specialization\r
  */\r
 #define IMPL_XMLOBJECTBUILDER(cname) \\r
  * Begins the declaration of an XMLObjectBuilder specialization.\r
  * Basic boilerplate includes an empty virtual destructor, and\r
  * a default builder that defaults the element name.\r
- * \r
+ *\r
  * @param linkage           linkage specifier for the class\r
  * @param cname             the name of the XMLObject specialization\r
  * @param namespaceURI      the XML namespace of the default associated element\r
 \r
 /**\r
  * Declares a generic XMLObjectBuilder specialization.\r
- * \r
+ *\r
  * @param linkage           linkage specifier for the class\r
  * @param cname             the name of the XMLObject specialization\r
  * @param namespaceURI      the XML namespace of the default associated element\r
     END_XMLOBJECTBUILDER\r
 \r
 /**\r
- * Implements the standard XMLObjectBuilder specialization function. \r
- * \r
+ * Implements the standard XMLObjectBuilder specialization function.\r
+ *\r
  * @param cname the name of the XMLObject specialization\r
  */\r
 #define IMPL_XMLOBJECTBUILDER(cname) \\r
 \r
 /**\r
  * Begins the declaration of a Schema Validator specialization.\r
- * \r
+ *\r
  * @param linkage           linkage specifier for the class\r
  * @param cname the base name of the Validator specialization\r
  */\r
 \r
 /**\r
  * Begins the declaration of a Schema Validator specialization subclass.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the base name of the Validator specialization\r
  * @param base      base class for the validator\r
 \r
 /**\r
  * Validator code that checks the object type.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
  */\r
 #define XMLOBJECTVALIDATOR_CHECKTYPE(cname) \\r
 \r
 /**\r
  * Validator code that checks for a required attribute, content, or singleton.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
- * @param proper    the proper name of the attribute, content, or singleton member \r
+ * @param proper    the proper name of the attribute, content, or singleton member\r
  */\r
 #define XMLOBJECTVALIDATOR_REQUIRE(cname,proper) \\r
     if (!ptr->get##proper()) \\r
 \r
 /**\r
  * Validator code that checks for a required integer attribute\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
- * @param proper    the proper name of the attribute, content, or singleton member \r
+ * @param proper    the proper name of the attribute, content, or singleton member\r
  */\r
 #define XMLOBJECTVALIDATOR_REQUIRE_INTEGER(cname,proper) \\r
     if (!ptr->get##proper().first) \\r
 /**\r
  * Validator code that checks for one of a pair of\r
  * required attributes, content, or singletons.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
- * @param proper1   the proper name of the first attribute, content, or singleton member \r
- * @param proper2   the proper name of the second attribute, content, or singleton member \r
+ * @param proper1   the proper name of the first attribute, content, or singleton member\r
+ * @param proper2   the proper name of the second attribute, content, or singleton member\r
  */\r
 #define XMLOBJECTVALIDATOR_ONEOF(cname,proper1,proper2) \\r
     if (!ptr->get##proper1() && !ptr->get##proper2()) \\r
 /**\r
  * Validator code that checks for one of a pair of\r
  * required attributes, content, or singletons, but disallows both.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
- * @param proper1   the proper name of the first attribute, content, or singleton member \r
- * @param proper2   the proper name of the second attribute, content, or singleton member \r
+ * @param proper1   the proper name of the first attribute, content, or singleton member\r
+ * @param proper2   the proper name of the second attribute, content, or singleton member\r
  */\r
 #define XMLOBJECTVALIDATOR_ONLYONEOF(cname,proper1,proper2) \\r
     if ((!ptr->get##proper1() && !ptr->get##proper2()) || (ptr->get##proper1() && ptr->get##proper2())) \\r
 /**\r
  * Validator code that checks for one of a set of three\r
  * required attributes, content, or singletons.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
  * @param proper1   the proper name of the first attribute, content, or singleton member\r
  * @param proper2   the proper name of the second attribute, content, or singleton member\r
 /**\r
  * Validator code that checks for one of a set of three\r
  * required attributes, content, or singletons but disallows more than one.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
  * @param proper1   the proper name of the first attribute, content, or singleton member\r
  * @param proper2   the proper name of the second attribute, content, or singleton member\r
 /**\r
  * Validator code that checks a co-constraint (if one present, the other must be)\r
  * between a pair of attributes, content, or singletons.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
- * @param proper1   the proper name of the first attribute, content, or singleton member \r
- * @param proper2   the proper name of the second attribute, content, or singleton member \r
+ * @param proper1   the proper name of the first attribute, content, or singleton member\r
+ * @param proper2   the proper name of the second attribute, content, or singleton member\r
  */\r
 #define XMLOBJECTVALIDATOR_NONEORBOTH(cname,proper1,proper2) \\r
     if ((ptr->get##proper1() && !ptr->get##proper2()) || (!ptr->get##proper1() && ptr->get##proper2())) \\r
 \r
 /**\r
  * Validator code that checks for a non-empty collection.\r
- * \r
+ *\r
  * @param cname     the name of the XMLObject specialization\r
- * @param proper    the proper name of the collection item \r
+ * @param proper    the proper name of the collection item\r
  */\r
 #define XMLOBJECTVALIDATOR_NONEMPTY(cname,proper) \\r
     if (ptr->get##proper##s().empty()) \\r
 /**\r
  * Declares/defines a Validator specialization that checks object type and\r
  * a non-empty simple content model.\r
- * \r
+ *\r
  * @param linkage   linkage specifier for the class\r
  * @param cname     the name of the XMLObject specialization\r
  */\r
@@ -1515,7 +1534,7 @@ namespace xmltooling {
      * Template function for cloning a sequence of XMLObjects.\r
      * Invokes the clone() member on each element of the input sequence and adds the copy to\r
      * the output sequence. Order is preserved.\r
-     * \r
+     *\r
      * @param in    input sequence to clone\r
      * @param out   output sequence to copy cloned pointers into\r
      */\r
@@ -1535,14 +1554,14 @@ namespace xmltooling {
     {\r
         /**\r
          * Function operator to delete an object.\r
-         * \r
+         *\r
          * @param ptr   object to delete\r
          */\r
         void operator()(T* ptr) {delete ptr;}\r
-        \r
+\r
         /**\r
          * Function operator to delete an object stored as const.\r
-         * \r
+         *\r
          * @param ptr   object to delete after casting away const\r
          */\r
         void operator()(const T* ptr) {delete const_cast<T*>(ptr);}\r
@@ -1555,7 +1574,7 @@ namespace xmltooling {
     {\r
         /**\r
          * Function operator to delete an object.\r
-         * \r
+         *\r
          * @param p   a pair in which the second component is the object to delete\r
          */\r
         void operator()(const std::pair<const A,B*>& p) {delete p.second;}\r
@@ -1568,7 +1587,7 @@ namespace xmltooling {
     {\r
         /**\r
          * Function operator to delete an object stored as const\r
-         * \r
+         *\r
          * @param p   a pair in which the second component is the const object to delete\r
          */\r
         void operator()(const std::pair<const A,const B*>& p) {delete const_cast<B*>(p.second);}\r