source: icXML/icXML-devel/src/xercesc/internal/VecAttributesImpl.hpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 4.6 KB
Line 
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: VecAttributesImpl.hpp 672311 2008-06-27 16:05:01Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_VECATTRIBUTESIMPL_HPP)
23#define XERCESC_INCLUDE_GUARD_VECATTRIBUTESIMPL_HPP
24
25#include <xercesc/sax2/Attributes.hpp>
26#include <icxercesc/framework/XMLAttr.hpp>
27#include <xercesc/util/RefVectorOf.hpp>
28#include <icxercesc/internal/XMLScanner.hpp>
29#include <icxercesc/framework/XMLBuffer.hpp>
30
31XERCES_CPP_NAMESPACE_BEGIN
32
33class XMLPARSER_EXPORT VecAttributesImpl : public Attributes
34{
35public :
36    // -----------------------------------------------------------------------
37    //  Constructors and Destructor
38    // -----------------------------------------------------------------------
39    VecAttributesImpl();
40    ~VecAttributesImpl();
41
42
43    // -----------------------------------------------------------------------
44    //  Implementation of the attributes interface
45    // -----------------------------------------------------------------------
46    virtual XMLSize_t getLength() const ;
47
48    virtual const XMLCh* getURI(const XMLSize_t index) const;
49    virtual const XMLCh* getLocalName(const XMLSize_t index) const ;
50    virtual const XMLCh* getQName(const XMLSize_t index) const ;
51    virtual const XMLCh* getType(const XMLSize_t index) const ;
52    virtual const XMLCh* getValue(const XMLSize_t index) const ;
53
54    virtual bool getIndex(const XMLCh* const uri, const XMLCh* const localPart, XMLSize_t& index) const;
55    virtual int getIndex(const XMLCh* const uri, const XMLCh* const localPart ) const  ;
56    virtual bool getIndex(const XMLCh* const qName, XMLSize_t& index) const;
57    virtual int getIndex(const XMLCh* const qName ) const  ;
58
59    virtual const XMLCh* getType(const XMLCh* const uri, const XMLCh* const localPart ) const  ;
60    virtual const XMLCh* getType(const XMLCh* const qName) const ;
61
62    virtual const XMLCh* getValue(const XMLCh* const qName) const;
63    virtual const XMLCh* getValue(const XMLCh* const uri, const XMLCh* const localPart ) const  ;
64
65
66    // -----------------------------------------------------------------------
67    //  Setter methods
68    // -----------------------------------------------------------------------
69    void setVector
70    (
71          const   RefVectorOf<XMLAttr>* const srcVec
72        , const XMLSize_t                count
73        , const XMLScanner * const              scanner
74        , const bool                        adopt = false
75    );
76
77private :
78    // -----------------------------------------------------------------------
79    //  Unimplemented constructors and operators
80    // -----------------------------------------------------------------------
81    VecAttributesImpl(const VecAttributesImpl&);
82    VecAttributesImpl& operator=(const VecAttributesImpl&);
83
84
85    // -----------------------------------------------------------------------
86    //  Private data members
87    //
88    //  fAdopt
89    //      Indicates whether the passed vector is to be adopted or not. If
90    //      so, we destroy it when we are destroyed (and when a new vector is
91    //      set!)
92    //
93    //  fCount
94    //      The count of elements in the vector that should be considered
95    //      valid. This is an optimization to allow vector elements to be
96    //      reused over and over but a different count of them be valid for
97    //      each use.
98    //
99    //  fVector
100    //      The vector that provides the backing for the list.
101    //
102    //  fScanner
103    //          This is a pointer to the in use Scanner, so that we can resolve
104    //          namespace URIs from UriIds
105    //
106    //  fURIBuffer
107    //          A temporary buffer which is re-used when getting namespace URI's
108    // -----------------------------------------------------------------------
109    bool                        fAdopt;
110    XMLSize_t                   fCount;
111    const RefVectorOf<XMLAttr>* fVector;
112    const XMLScanner *          fScanner ;
113};
114
115XERCES_CPP_NAMESPACE_END
116
117#endif // ! VECATTRIBUTESIMPL_HPP
Note: See TracBrowser for help on using the repository browser.