source: NonGTP/Xerces/xerces/include/xercesc/util/RefArrayVectorOf.hpp @ 358

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

xerces added

Line 
1/*
2 * Copyright 1999-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#if !defined(REFARRAYVECTOROF_HPP)
18#define REFARRAYVECTOROF_HPP
19
20#include <xercesc/util/BaseRefVectorOf.hpp>
21
22XERCES_CPP_NAMESPACE_BEGIN
23
24/**
25 * Class with implementation for vectors of pointers to arrays  - implements from
26 * the Abstract class Vector
27 */
28template <class TElem> class RefArrayVectorOf : public BaseRefVectorOf<TElem>
29{
30public :
31    // -----------------------------------------------------------------------
32    //  Constructor
33    // -----------------------------------------------------------------------
34    RefArrayVectorOf( const unsigned int   maxElems
35                    , const bool           adoptElems = true
36                    , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
37
38    // -----------------------------------------------------------------------
39    //  Destructor
40    // -----------------------------------------------------------------------
41    ~RefArrayVectorOf();
42
43    // -----------------------------------------------------------------------
44    //  Element management
45    // -----------------------------------------------------------------------
46    void setElementAt(TElem* const toSet, const unsigned int setAt);
47    void removeAllElements();
48    void removeElementAt(const unsigned int removeAt);
49    void removeLastElement();
50    void cleanup();
51private:
52    // -----------------------------------------------------------------------
53    //  Unimplemented constructors and operators
54    // -----------------------------------------------------------------------
55    RefArrayVectorOf(const RefArrayVectorOf<TElem>&);
56    RefArrayVectorOf<TElem>& operator=(const RefArrayVectorOf<TElem>&);
57};
58
59XERCES_CPP_NAMESPACE_END
60
61#if !defined(XERCES_TMPLSINC)
62#include <xercesc/util/RefArrayVectorOf.c>
63#endif
64
65#endif
Note: See TracBrowser for help on using the repository browser.