Remove some tracing, fix string compares.
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / XMLObjectBaseTestCase.h
index 7fe8100..d2d56c0 100644 (file)
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/impl/AnyElement.h>
 #include <xmltooling/impl/UnknownElement.h>
-#ifndef XMLTOOLING_NO_XMLSEC
-    #include <xmltooling/signature/Signature.h>
-#endif
 #include <xmltooling/util/ParserPool.h>
 #include <xmltooling/util/XMLConstants.h>
 #include <xmltooling/util/XMLHelper.h>
 #include <xmltooling/util/XMLObjectChildrenList.h>
 
-using namespace xmlsignature;
+#ifndef XMLTOOLING_NO_XMLSEC
+    #include <xmltooling/signature/Signature.h>
+    using namespace xmlsignature;
+#endif
+
 using namespace xmltooling;
 using namespace std;
 
-extern ParserPool* validatingPool;
-extern ParserPool* nonvalidatingPool;
 extern string data_path;
 
 #if defined (_MSC_VER)
@@ -185,6 +184,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)