Xerces-C++ 3.2.5

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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XMLATTDEFLIST_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLATTDEFLIST_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26#include <xercesc/util/XMemory.hpp>
27#include <xercesc/internal/XSerializable.hpp>
28
29 XERCES_CPP_NAMESPACE_BEGIN
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
117
124 MemoryManager* getMemoryManager() const;
125
127
128protected :
129 // -----------------------------------------------------------------------
130 // Hidden constructors and operators
131 // -----------------------------------------------------------------------
132 XMLAttDefList(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
133
134 private:
135 // unimplemented
136 XMLAttDefList(const XMLAttDefList&);
137 XMLAttDefList& operator=(const XMLAttDefList&);
138
139 MemoryManager* fMemoryManager;
140};
141
142
143
144// ---------------------------------------------------------------------------
145// XMLAttDefList: Getter methods
146// ---------------------------------------------------------------------------
147
148 inline MemoryManager* XMLAttDefList::getMemoryManager() const
149{
150 return fMemoryManager;
151}
152
153// ---------------------------------------------------------------------------
154// XMLAttDefList: Constructors and Destructor
155// ---------------------------------------------------------------------------
156 inline XMLAttDefList::~XMLAttDefList()
157{
158}
159
160
161// ---------------------------------------------------------------------------
162// XMLAttDefList: Protected Constructor
163// ---------------------------------------------------------------------------
164 inline XMLAttDefList::XMLAttDefList(MemoryManager* const manager):
165fMemoryManager(manager)
166{
167}
168
169 XERCES_CPP_NAMESPACE_END
170
171#endif
XMemory.hpp
XercesDefs.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
uint16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
XMLSize_t
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
XMLAttDefList
This class defines an abstract interface that all validators must support.
Definition XMLAttDefList.hpp:51
XMLAttDefList::getAttDefCount
virtual XMLSize_t getAttDefCount() const =0
return total number of attributes in this list
XMLAttDefList::findAttDef
virtual const XMLAttDef * findAttDef(const unsigned int uriID, const XMLCh *const attName) const =0
XMLAttDefList::getMemoryManager
MemoryManager * getMemoryManager() const
Get the memory manager.
Definition XMLAttDefList.hpp:148
XMLAttDefList::findAttDef
virtual const XMLAttDef * findAttDef(const XMLCh *const attURI, const XMLCh *const attName) const =0
XMLAttDefList::getAttDef
virtual const XMLAttDef & getAttDef(XMLSize_t index) const =0
return attribute at the index-th position in the list.
XMLAttDefList::getAttDef
virtual XMLAttDef & getAttDef(XMLSize_t index)=0
return attribute at the index-th position in the list.
XMLAttDefList::findAttDef
virtual XMLAttDef * findAttDef(const unsigned int uriID, const XMLCh *const attName)=0
XMLAttDefList::isEmpty
virtual bool isEmpty() const =0
XMLAttDefList::XMLAttDefList
XMLAttDefList(MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
Definition XMLAttDefList.hpp:164
XMLAttDefList::findAttDef
virtual XMLAttDef * findAttDef(const XMLCh *const attURI, const XMLCh *const attName)=0
XMLAttDefList::~XMLAttDefList
virtual ~XMLAttDefList()
Definition XMLAttDefList.hpp:156
XMLAttDef
Represents the core information of an attribute definition.
Definition XMLAttDef.hpp:53
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41