00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #if !defined(PSVIATTRIBUTEDERIVATION_LIST_HPP)
00074 #define PSVIATTRIBUTEDERIVATION_LIST_HPP
00075
00076 #include <xercesc/util/PlatformUtils.hpp>
00077 #include <xercesc/framework/psvi/PSVIAttribute.hpp>
00078 #include <xercesc/util/ValueVectorOf.hpp>
00079
00080 XERCES_CPP_NAMESPACE_BEGIN
00081
00091 class PSVIAttributeList : public XMemory
00092 {
00093 public:
00094
00095
00096
00099
00105 PSVIAttributeList( MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
00106
00108
00111 ~PSVIAttributeList();
00113
00114
00118
00119
00120
00121
00122
00123 const unsigned int getLength() const;
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 PSVIAttribute *getAttributePSVIAtIndex(const unsigned int index);
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143 const XMLCh *getAttributeNameAtIndex(const unsigned int index);
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153 const XMLCh *getAttributeNamespaceAtIndex(const unsigned int index);
00154
00155
00156
00157
00158
00159
00160
00161
00162 PSVIAttribute *getAttributePSVIByName(const XMLCh *attrName
00163 , const XMLCh * attrNamespace);
00164
00166
00167
00171
00177 PSVIAttribute *getPSVIAttributeToFill();
00178
00182 void reset();
00183
00185
00186 private:
00187
00188
00189
00190
00191 PSVIAttributeList(const PSVIAttributeList&);
00192 PSVIAttributeList & operator=(const PSVIAttributeList &);
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204 MemoryManager* fMemoryManager;
00205 ValueVectorOf<PSVIAttribute*>* fAttrList;
00206 unsigned int fAttrPos;
00207 };
00208 inline PSVIAttributeList::~PSVIAttributeList()
00209 {
00210 delete fAttrList;
00211 }
00212
00213 inline PSVIAttribute *PSVIAttributeList::getPSVIAttributeToFill()
00214 {
00215 PSVIAttribute *retAttr = 0;
00216 if(fAttrPos == fAttrList->size())
00217 {
00218 retAttr = new (fMemoryManager)PSVIAttribute(fMemoryManager);
00219 fAttrList->addElement(retAttr);
00220 }
00221 else
00222 {
00223 retAttr = fAttrList->elementAt(fAttrPos);
00224 }
00225 fAttrPos++;
00226 return retAttr;
00227 }
00228
00229 inline void PSVIAttributeList::reset()
00230 {
00231 fAttrPos = 0;
00232 }
00233
00234 XERCES_CPP_NAMESPACE_END
00235
00236 #endif