eb1097c76518a5d1c1afeaf4c195a2c2baec9794
[shibboleth/cpp-xmltooling.git] / xmltooling / ElementExtensibleXMLObject.h
1 /*
2  *  Copyright 2001-2009 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 xmltooling/ElementExtensibleXMLObject.h
19  * 
20  * An XMLObject that exposes arbitrary children via a mutable vector. 
21  */
22
23 #ifndef __xmltooling_eleextxmlobj_h__
24 #define __xmltooling_eleextxmlobj_h__
25
26 #include <xmltooling/XMLObject.h>
27 #include <xmltooling/util/XMLObjectChildrenList.h>
28
29 #if defined (_MSC_VER)
30     #pragma warning( push )
31     #pragma warning( disable : 4250 4251 )
32 #endif
33
34 namespace xmltooling {
35
36     /**
37      * An XMLObject that exposes arbitrary children via a mutable vector.
38      */
39     class XMLTOOL_API ElementExtensibleXMLObject : public virtual XMLObject
40     {
41     protected:
42         ElementExtensibleXMLObject();
43     
44     public:
45         virtual ~ElementExtensibleXMLObject();
46         
47         /**
48          * Gets a mutable list of child objects
49          * 
50          * @return  mutable list of child objects
51          */
52         virtual VectorOf(XMLObject) getUnknownXMLObjects()=0;
53
54         /**
55          * Gets an immutable list of child objects
56          * 
57          * @return  immutable list of child objects
58          */
59         virtual const std::vector<XMLObject*>& getUnknownXMLObjects() const=0;
60     };
61     
62 };
63
64 #if defined (_MSC_VER)
65     #pragma warning( pop )
66 #endif
67
68 #endif /* __xmltooling_eleextxmlobj_h__ */