Macro adjustments, date/time class, typed XML attributes.
[shibboleth/cpp-xmltooling.git] / xmltooling / AbstractXMLObject.h
index 5ead42f..ba34176 100644 (file)
@@ -24,6 +24,7 @@
 #define __xmltooling_abstractxmlobj_h__\r
 \r
 #include <xmltooling/XMLObject.h>\r
+#include <xmltooling/util/DateTime.h>\r
 \r
 #if defined (_MSC_VER)\r
     #pragma warning( push )\r
@@ -97,9 +98,10 @@ namespace xmltooling {
         AbstractXMLObject(const AbstractXMLObject& src);\r
         \r
         /**\r
-         * A helper function for derived classes.\r
+         * A helper function for derived classes, for assignment of strings.\r
+         *\r
          * This 'normalizes' newString, and then if it is different from oldString,\r
-         * it invalidates the DOM, frees the old string, and return the new.\r
+         * it invalidates the DOM, frees the old string, and returns the new.\r
          * If not different, it frees the new string and just returns the old value.\r
          * \r
          * @param oldValue - the current value\r
@@ -110,6 +112,54 @@ namespace xmltooling {
         XMLCh* prepareForAssignment(XMLCh* oldValue, const XMLCh* newValue);\r
 \r
         /**\r
+         * A helper function for derived classes, for assignment of date/time data.\r
+         *\r
+         * It invalidates the DOM, frees the old object, and returns the new.\r
+         * \r
+         * @param oldValue - the current value\r
+         * @param newValue - the new value\r
+         * \r
+         * @return the value that should be assigned\r
+         */\r
+        DateTime* prepareForAssignment(DateTime* oldValue, const DateTime* newValue);\r
+\r
+        /**\r
+         * A helper function for derived classes, for assignment of date/time data.\r
+         *\r
+         * It invalidates the DOM, frees the old object, and returns the new.\r
+         * \r
+         * @param oldValue - the current value\r
+         * @param newValue - the epoch to assign as the new value\r
+         * \r
+         * @return the value that should be assigned\r
+         */\r
+        DateTime* prepareForAssignment(DateTime* oldValue, time_t newValue);\r
+\r
+        /**\r
+         * A helper function for derived classes, for assignment of date/time data.\r
+         *\r
+         * It invalidates the DOM, frees the old object, and returns the new.\r
+         * \r
+         * @param oldValue - the current value\r
+         * @param newValue - the new value in string form\r
+         * \r
+         * @return the value that should be assigned\r
+         */\r
+        DateTime* prepareForAssignment(DateTime* oldValue, const XMLCh* newValue);\r
+\r
+        /**\r
+         * A helper function for derived classes, for assignment of QName data.\r
+         *\r
+         * It invalidates the DOM, frees the old object, and returns the new.\r
+         * \r
+         * @param oldValue - the current value\r
+         * @param newValue - the new value\r
+         * \r
+         * @return the value that should be assigned\r
+         */\r
+        QName* prepareForAssignment(QName* oldValue, const QName* newValue);\r
+\r
+        /**\r
          * A helper function for derived classes, for assignment of (singleton) XML objects.\r
          * \r
          * It is indifferent to whether either the old or the new version of the value is null. \r