Merged marshalling/unmarshalling methods into core interface.
[shibboleth/xmltooling.git] / xmltooling / XMLObjectBuilder.h
index de34c89..0c9f069 100644 (file)
@@ -50,19 +50,21 @@ namespace xmltooling {
         /**\r
          * Creates an empty XMLObject.\r
          * \r
+         * @param e     a construction hint based on the eventual unmarshalling source\r
          * @return the empty XMLObject\r
          */\r
-        virtual XMLObject* buildObject() const=0;\r
+        virtual XMLObject* buildObject(const DOMElement* e=NULL) const=0;\r
 \r
         /**\r
          * Creates an empty XMLObject using the default build method, if a builder can be found.\r
          * \r
          * @param key   the key used to locate a builder\r
+         * @param e     a construction hint based on the eventual unmarshalling source\r
          * @return  the empty object or NULL if no builder is available \r
          */\r
-        static XMLObject* buildObject(const QName& key) {\r
+        static XMLObject* buildObject(const QName& key, const DOMElement* e=NULL) {\r
             const XMLObjectBuilder* b=getBuilder(key);\r
-            return b ? b->buildObject() : NULL;\r
+            return b ? b->buildObject(e) : NULL;\r
         }\r
 \r
         /**\r