## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.9

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# NodeRefList.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *     http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016 #if !defined(NODEREFLIST_HEADER_GUARD_1357924680)
    00017 #define NODEREFLIST_HEADER_GUARD_1357924680
    00018
    00019
    00020
    00021 // Base include file.  Must be first.
    00022 #include <xalanc/XPath/XPathDefinitions.hpp>
    00023
    00024
    00025
    00026 #include <xalanc/Include/XalanVector.hpp>
    00027
    00028
    00029
    00030 #include <xalanc/XPath/NodeRefListBase.hpp>
    00031
    00032
    00033
    00034 XALAN_CPP_NAMESPACE_BEGIN
    00035
    00036
    00037
    00041 class XALAN_XPATH_EXPORT NodeRefList : public NodeRefListBase
    00042 {
    00043 public:
    00044
    00045     explicit
    00046     NodeRefList(MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
    00047
    00053     NodeRefList(const NodeRefList&  theSource, MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
    00054
    00055     MemoryManagerType&
    00056     getMemoryManager()
    00057     {
    00058         return m_nodeList.getMemoryManager();
    00059     }
    00060
    00066     explicit
    00067     NodeRefList(const NodeRefListBase&  theSource, MemoryManagerType& theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR);
    00068
    00069     virtual
    00070     ~NodeRefList();
    00071
    00072     NodeRefList&
    00073     operator=(const NodeRefListBase&    theRHS);
    00074
    00075     NodeRefList&
    00076     operator=(const NodeRefList&    theRHS);
    00077
    00078     bool
    00079     empty() const
    00080     {
    00081         return m_nodeList.empty();
    00082     }
    00083
    00084
    00085     // These methods are inherited from NodeRefListBase ...
    00086
    00087     virtual XalanNode*
    00088     item(size_type  index) const;
    00089
    00090     virtual size_type
    00091     getLength() const;
    00092
    00093     virtual size_type
    00094     indexOf(const XalanNode*    theNode) const;
    00095
    00096 #if !defined(NDEBUG)
    00097     bool
    00098     checkForDuplicates(MemoryManagerType& theManager) const;
    00099 #endif
    00100
    00101     typedef XalanVector<XalanNode*>         NodeListVectorType;
    00102
    00103     void
    00104     swap(NodeRefList&   theOther)
    00105     {
    00106         m_nodeList.swap(theOther.m_nodeList);
    00107     }
    00108
    00109 protected:
    00110
    00111     // Default vector allocation size.  It seems high, but
    00112     // it's really worth it...
    00113     enum
    00114     {
    00115         eDefaultVectorSize = 100
    00116     };
    00117
    00125     void
    00126     ensureAllocation(NodeListVectorType::size_type  theSize = 0)
    00127     {
    00128         m_nodeList.reserve(eDefaultVectorSize > theSize ? eDefaultVectorSize : theSize);
    00129     }
    00130
    00131     NodeListVectorType  m_nodeList;
    00132 private:
    00133 #if defined (XALAN_DEVELOPMENT)
    00134     // not defined
    00135     NodeRefList();
    00136     NodeRefList(const NodeRefList&  theSource);
    00137 #endif
    00138 };
    00139
    00140
    00141
    00142 XALAN_CPP_NAMESPACE_END
    00143
    00144
    00145
    00146 #endif  // NODEREFLIST_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.9 Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.