source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/dom/deprecated/NodeVector.hpp @ 2674

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