2b39b57d431d6c4910cd7ef2e627652297e6577f
[shibboleth/sp.git] / shibsp / AbstractHandler.h
1 /*
2  *  Copyright 2001-2006 Internet2
3  * 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /**
18  * @file shibsp/AbstractHandler.h
19  * 
20  * Base class for handlers based on a DOMPropertySet. 
21  */
22
23 #ifndef __shibsp_abshandler_h__
24 #define __shibsp_abshandler_h__
25
26 #include <shibsp/Handler.h>
27 #include <shibsp/util/DOMPropertySet.h>
28
29 namespace shibsp {
30
31 #if defined (_MSC_VER)
32     #pragma warning( push )
33     #pragma warning( disable : 4250 )
34 #endif
35
36     /**
37      * Base class for handlers based on a DOMPropertySet.
38      */
39     class SHIBSP_API AbstractHandler : public virtual Handler, public DOMPropertySet
40     {
41     protected:
42         /**
43          * Constructor
44          * 
45          * @param e         DOM element to load as property set. 
46          * @param filter    optional filter controls what child elements to include as nested PropertySets
47          * @param remapper  optional map of property rename rules for legacy property support
48          */
49         AbstractHandler(
50             const xercesc::DOMElement* e,
51             xercesc::DOMNodeFilter* filter=NULL,
52             const std::map<std::string,std::string>* remapper=NULL
53             );
54         
55     public:
56         virtual ~AbstractHandler() {}
57     };
58
59 #if defined (_MSC_VER)
60     #pragma warning( pop )
61 #endif
62
63 };
64
65 #endif /* __shibsp_abshandler_h__ */