X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fvalidation%2FValidator.h;h=7c8f6d7b3699c9dcc0e11930c697484f8977d667;hb=38003505e53ef5b8c2590af38cfbb0d405ad245f;hp=6962bb81bc8a9500c2693b53e100399cf0682ea7;hpb=a039baceeda19f0e5c3269332a668763c0889e90;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltooling/validation/Validator.h b/xmltooling/validation/Validator.h index 6962bb8..7c8f6d7 100644 --- a/xmltooling/validation/Validator.h +++ b/xmltooling/validation/Validator.h @@ -20,19 +20,11 @@ * Rules checking of XMLObjects */ -#if !defined(__xmltooling_validator_h__) +#ifndef __xmltooling_validator_h__ #define __xmltooling_validator_h__ -#include -#include -#include #include -#if defined (_MSC_VER) - #pragma warning( push ) - #pragma warning( disable : 4250 4251 ) -#endif - namespace xmltooling { /** @@ -61,52 +53,10 @@ namespace xmltooling { */ virtual Validator* clone() const=0; - /** - * Evaluates the registered validators against the given XMLObject and it's children. - * - * @param xmlObject the XMLObject tree to validate - * - * @throws ValidationException thrown if the element tree is not valid - */ - static void checkValidity(const XMLObject* xmlObject); - - /** - * Registers a new validator for the given key. - * - * @param key the key used to retrieve the validator - * @param validator the validator - */ - static void registerValidator(const QName& key, Validator* validator) { - std::map< QName, std::vector >::iterator i=m_map.find(key); - if (i==m_map.end()) - m_map.insert(std::make_pair(key,std::vector(1,validator))); - else - i->second.push_back(validator); - } - - /** - * Deregisters validators. - * - * @param key the key for the validators to be deregistered - */ - static void deregisterValidators(const QName& key); - - /** - * Unregisters and destroys all registered validators. - */ - static void destroyValidators(); - protected: Validator() {} - - private: - static std::map< QName, std::vector > m_map; }; }; -#if defined (_MSC_VER) - #pragma warning( pop ) -#endif - #endif /* __xmltooling_validator_h__ */