source: icXML/icXML-devel/src/xercesc/internal/VecAttrListImpl.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: 3.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: VecAttrListImpl.hpp 672273 2008-06-27 13:57:00Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_VECATTRLISTIMPL_HPP)
23#define XERCESC_INCLUDE_GUARD_VECATTRLISTIMPL_HPP
24
25#include <xercesc/sax/AttributeList.hpp>
26#include <icxercesc/framework/XMLAttr.hpp>
27#include <xercesc/util/RefVectorOf.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31class XMLPARSER_EXPORT VecAttrListImpl : public XMemory, public AttributeList
32{
33public :
34    // -----------------------------------------------------------------------
35    //  Constructors and Destructor
36    // -----------------------------------------------------------------------
37    VecAttrListImpl();
38    ~VecAttrListImpl();
39
40
41    // -----------------------------------------------------------------------
42    //  Implementation of the attribute list interface
43    // -----------------------------------------------------------------------
44    virtual XMLSize_t getLength() const;
45    virtual const XMLCh* getName(const XMLSize_t index) const;
46    virtual const XMLCh* getType(const XMLSize_t index) const;
47    virtual const XMLCh* getValue(const XMLSize_t index) const;
48    virtual const XMLCh* getType(const XMLCh* const name) const;
49    virtual const XMLCh* getValue(const XMLCh* const name) const;
50    virtual const XMLCh* getValue(const char* const name) const;
51
52
53    // -----------------------------------------------------------------------
54    //  Setter methods
55    // -----------------------------------------------------------------------
56    void setVector
57    (
58        const   RefVectorOf<XMLAttr>* const srcVec
59        , const XMLSize_t                   count
60        , const bool                        adopt = false
61    );
62
63
64private :
65    // -----------------------------------------------------------------------
66    //  Unimplemented constructors and operators
67    // -----------------------------------------------------------------------
68    VecAttrListImpl(const VecAttrListImpl&);
69    VecAttrListImpl& operator=(const VecAttrListImpl&);
70
71
72    // -----------------------------------------------------------------------
73    //  Private data members
74    //
75    //  fAdopt
76    //      Indicates whether the passed vector is to be adopted or not. If
77    //      so, we destroy it when we are destroyed (and when a new vector is
78    //      set!)
79    //
80    //  fCount
81    //      The count of elements in the vector that should be considered
82    //      valid. This is an optimization to allow vector elements to be
83    //      reused over and over but a different count of them be valid for
84    //      each use.
85    //
86    //  fVector
87    //      The vector that provides the backing for the list.
88    // -----------------------------------------------------------------------
89    bool                        fAdopt;
90    XMLSize_t                   fCount;
91    const RefVectorOf<XMLAttr>* fVector;
92};
93
94XERCES_CPP_NAMESPACE_END
95
96#endif
Note: See TracBrowser for help on using the repository browser.