Merge branch '1.x' of ssh://authdev.it.ohio-state.edu/~scantor/git/cpp-xmltooling...
[shibboleth/cpp-xmltooling.git] / xmltooling / validation / ValidatorSuite.h
index fd81454..8cd3e51 100644 (file)
@@ -1,17 +1,21 @@
-/*
- *  Copyright 2001-2007 Internet2
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the University Corporation for Advanced Internet
+ * Development, Inc. (UCAID) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * UCAID licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the
+ * License at
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
  */
 
 /**
@@ -24,9 +28,9 @@
 #define __xmltooling_valsuite_h__
 
 #include <xmltooling/QName.h>
-#include <xmltooling/validation/Validator.h>
 
 #include <map>
+#include <string>
 
 #if defined (_MSC_VER)
     #pragma warning( push )
@@ -35,6 +39,8 @@
 
 namespace xmltooling {
 
+    class XMLTOOL_API Validator;
+
     /**
      * A collection of validators that can be applied to an XMLObject and its children. These collections can represent
      * usage specific checks, such as those outlined in schemas or profiles of specific XML specifications.
@@ -51,20 +57,16 @@ namespace xmltooling {
          * 
          * @param id    an identifier for the suite
          */
-        ValidatorSuite(const char* id) : m_id(id) {}
+        ValidatorSuite(const char* id);
         
-        ~ValidatorSuite() {
-            destroyValidators();
-        }
+        ~ValidatorSuite();
 
         /**
          * Gets a unique ID for this suite.
          * 
          * @return a unique ID for this suite
          */
-        const char* getId() {
-            return m_id.c_str();
-        }
+        const char* getId();
 
         /**
          * Evaluates the registered validators against the given XMLObject and it's children.
@@ -81,9 +83,7 @@ namespace xmltooling {
          * @param key       the key used to retrieve the validator
          * @param validator the validator
          */
-        void registerValidator(const QName& key, Validator* validator) {
-            m_map.insert(std::make_pair(key,validator));
-        }
+        void registerValidator(const QName& key, Validator* validator);
 
         /**
          * Deregisters validators.