Support for a catalog path.
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / XMLObjectBaseTestCase.h
index 34af4eb..a90b1fc 100644 (file)
@@ -37,8 +37,6 @@
 using namespace xmltooling;
 using namespace std;
 
-extern ParserPool* validatingPool;
-extern ParserPool* nonvalidatingPool;
 extern string data_path;
 
 #if defined (_MSC_VER)
@@ -98,6 +96,7 @@ public:
         return new SimpleXMLObject(*this);
     }
 
+    const XMLCh* getXMLID() const { return getId(); }
     const XMLCh* getId() const { return m_id; }
     void setId(const XMLCh* id) { m_id=prepareForAssignment(m_id,id); }
 
@@ -186,6 +185,15 @@ public:
         ) const {
         return new SimpleXMLObject(nsURI, localName, prefix, schemaType);
     }
+
+    static SimpleXMLObject* newSimpleXMLObject() {\r
+        const SimpleXMLObjectBuilder* b = dynamic_cast<const SimpleXMLObjectBuilder*>(\r
+            XMLObjectBuilder::getBuilder(QName(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME))\r
+            );\r
+        if (b)\r
+            return b->buildObject();\r
+        throw XMLObjectException("Unable to obtain typed builder for SimpleXMLObject.");\r
+    }\r
 };
 
 #if defined (_MSC_VER)