First cut at signing support.
[shibboleth/cpp-xmltooling.git] / xmltooling / XMLObjectBuilder.h
index a4c4311..de34c89 100644 (file)
@@ -55,6 +55,17 @@ namespace xmltooling {
         virtual XMLObject* buildObject() 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
+         * @return  the empty object or NULL if no builder is available \r
+         */\r
+        static XMLObject* buildObject(const QName& key) {\r
+            const XMLObjectBuilder* b=getBuilder(key);\r
+            return b ? b->buildObject() : NULL;\r
+        }\r
+\r
+        /**\r
          * Retrieves an XMLObjectBuilder using the key it was registered with.\r
          * \r
          * @param key the key used to register the builder\r