Xerces-C++  3.2.2
XMLAttDefList.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /*
19  * $Id: XMLAttDefList.hpp 932889 2010-04-11 13:10:10Z borisk $
20  */
21 
22 #if !defined(XERCESC_INCLUDE_GUARD_XMLATTDEFLIST_HPP)
23 #define XERCESC_INCLUDE_GUARD_XMLATTDEFLIST_HPP
24 
26 #include <xercesc/util/XMemory.hpp>
27 #include <xercesc/internal/XSerializable.hpp>
28 
30 
31 class XMLAttDef;
32 
50 class XMLPARSER_EXPORT XMLAttDefList : public XSerializable, public XMemory
51 {
52 public:
53  // -----------------------------------------------------------------------
54  // Constructors and Destructor
55  // -----------------------------------------------------------------------
56 
59  virtual ~XMLAttDefList();
61 
62 
63  // -----------------------------------------------------------------------
64  // The virtual interface
65  // -----------------------------------------------------------------------
66 
67  virtual bool isEmpty() const = 0;
68  virtual XMLAttDef* findAttDef
69  (
70  const unsigned int uriID
71  , const XMLCh* const attName
72  ) = 0;
73  virtual const XMLAttDef* findAttDef
74  (
75  const unsigned int uriID
76  , const XMLCh* const attName
77  ) const = 0;
78  virtual XMLAttDef* findAttDef
79  (
80  const XMLCh* const attURI
81  , const XMLCh* const attName
82  ) = 0;
83  virtual const XMLAttDef* findAttDef
84  (
85  const XMLCh* const attURI
86  , const XMLCh* const attName
87  ) const = 0;
88 
92  virtual XMLSize_t getAttDefCount() const = 0;
93 
97  virtual XMLAttDef &getAttDef(XMLSize_t index) = 0;
98 
102  virtual const XMLAttDef &getAttDef(XMLSize_t index) const = 0;
103 
104  /***
105  * Support for Serialization/De-serialization
106  ***/
107  DECL_XSERIALIZABLE(XMLAttDefList)
108 
109 
110  // -----------------------------------------------------------------------
111  // Getter methods
112  // -----------------------------------------------------------------------
113 
114 
116 
124  MemoryManager* getMemoryManager() const;
125 
127 
128 protected :
129  // -----------------------------------------------------------------------
130  // Hidden constructors and operators
131  // -----------------------------------------------------------------------
133 
134 private:
135  // unimplemented
137  XMLAttDefList& operator=(const XMLAttDefList&);
138 
139  MemoryManager* fMemoryManager;
140 };
141 
142 
143 
144 // ---------------------------------------------------------------------------
145 // XMLAttDefList: Getter methods
146 // ---------------------------------------------------------------------------
147 
149 {
150  return fMemoryManager;
151 }
152 
153 // ---------------------------------------------------------------------------
154 // XMLAttDefList: Constructors and Destructor
155 // ---------------------------------------------------------------------------
157 {
158 }
159 
160 
161 // ---------------------------------------------------------------------------
162 // XMLAttDefList: Protected Constructor
163 // ---------------------------------------------------------------------------
165 fMemoryManager(manager)
166 {
167 }
168 
170 
171 #endif
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
virtual ~XMLAttDefList()
Definition: XMLAttDefList.hpp:156
This class defines an abstract interface that all validators must support.
Definition: XMLAttDefList.hpp:50
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
Represents the core information of an attribute definition.
Definition: XMLAttDef.hpp:52
Configurable memory manager.
Definition: MemoryManager.hpp:39
XMLAttDefList(MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Definition: XMLAttDefList.hpp:164
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
size_t XMLSize_t
Definition: Xerces_autoconf_config.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
MemoryManager * getMemoryManager() const
Get the memory manager.
Definition: XMLAttDefList.hpp:148