source: NonGTP/Xerces/xerces/include/xercesc/dom/deprecated/NodeVector.hpp @ 358

Revision 358, 2.1 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1#ifndef NodeVector_HEADER_GUARD_
2#define NodeVector_HEADER_GUARD_
3/*
4 * Copyright 1999-2002,2004 The Apache Software Foundation.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *      http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19/*
20 * $Id: NodeVector.hpp,v 1.5 2004/09/08 13:55:44 peiyongz Exp $
21 */
22
23//
24//  This file is part of the internal implementation of the C++ XML DOM.
25//  It should NOT be included or used directly by application programs.
26//
27//  Applications should include the file <xercesc/dom/deprecated/DOM.hpp> for the entire
28//  DOM API, or DOM_*.hpp for individual DOM classes, where the class
29//  name is substituded for the *.
30//
31
32
33#include <xercesc/util/PlatformUtils.hpp>
34
35XERCES_CPP_NAMESPACE_BEGIN
36
37
38class NodeImpl;
39
40
41class  NodeVector : public XMemory {
42private:
43    NodeImpl        **data;
44    unsigned int    allocatedSize;
45    unsigned int    nextFreeSlot;
46    MemoryManager*  fMemoryManager;
47
48    void            init(unsigned int size);
49    void            checkSpace();
50
51public:
52    NodeVector(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
53    NodeVector(unsigned int size,
54               MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
55    ~NodeVector();
56
57    unsigned int    size();
58    NodeImpl        *elementAt(unsigned int index);
59    NodeImpl        *lastElement();
60    void            addElement(NodeImpl *);
61    void            insertElementAt(NodeImpl *, unsigned int index);
62    void            setElementAt(NodeImpl *val, unsigned int index);
63    void            removeElementAt(unsigned int index);
64    void            reset();
65};
66
67XERCES_CPP_NAMESPACE_END
68
69#endif
Note: See TracBrowser for help on using the repository browser.