## 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 Class Reference

Local implementation of NodeRefList. More...

Inheritance diagram for NodeRefList:

[legend]
Collaboration diagram for NodeRefList:

[legend]
List of all members.

## Public Types

- typedef XalanVector< XalanNode * > NodeListVectorType

## Public Member Functions

- NodeRefList (MemoryManagerType &theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR)
- NodeRefList (const NodeRefList &theSource, MemoryManagerType &theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR)
    Construct a node list from another.
- MemoryManagerType & getMemoryManager ()
- NodeRefList (const NodeRefListBase &theSource, MemoryManagerType &theManager XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR)
    Construct a node list from another.
- virtual ~NodeRefList ()
- NodeRefList & operator= (const NodeRefListBase &theRHS)
- NodeRefList & operator= (const NodeRefList &theRHS)
- bool empty () const
- virtual XalanNode * item (size_type index) const
    Returns the `index`th item in the collection.
- virtual size_type getLength () const
    Determine the number of nodes in the list.
- virtual size_type indexOf (const XalanNode *theNode) const
    Retrieve the zero based index of the node in the list.
- bool checkForDuplicates (MemoryManagerType &theManager) const
- void swap (NodeRefList &theOther)

## Protected Types

- enum { eDefaultVectorSize = 100 }

## Protected Member Functions

- void ensureAllocation (NodeListVectorType::size_type theSize=0)
    Ensure that an allocation is either the default allocation amount, or the amount specified in the parameter, whichever is larger.

## Protected Attributes

- NodeListVectorType m_nodeList

## Detailed Description

Local implementation of NodeRefList.

This class is for internal use only.

## Member Typedef Documentation

typedef XalanVector<XalanNode*> NodeRefList::NodeListVectorType

## Member Enumeration Documentation

anonymous enum`[protected]`

Enumeration values:

  eDefaultVectorSize |

## Constructor & Destructor Documentation

NodeRefList::NodeRefList | ( | MemoryManagerType &theManager | XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR | ) | `[explicit]`

NodeRefList::NodeRefList | ( | const NodeRefList & | theSource,
|  | MemoryManagerType &theManager | XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR
| ) |

Construct a node list from another.

Parameters:

  theSource | source node list

NodeRefList::NodeRefList | ( | const NodeRefListBase & | theSource,
|  | MemoryManagerType &theManager | XALAN_DEFAULT_CONSTRACTOR_MEMORY_MGR
| ) | `[explicit]`

Construct a node list from another.

Parameters:

  theSource | source node list

virtual NodeRefList::~NodeRefList | ( |  | ) | `[virtual]`

## Member Function Documentation

bool NodeRefList::checkForDuplicates | ( | MemoryManagerType & | theManager | ) | const

bool NodeRefList::empty | ( |  | ) | const

void NodeRefList::ensureAllocation | ( | NodeListVectorType::size_type | theSize = 0 | ) | `[protected]`

Ensure that an allocation is either the default allocation amount, or the amount specified in the parameter, whichever is larger.

Parameters:

  theSize | The requested size.

virtual size_type NodeRefList::getLength | ( |  | ) | const`[virtual]`

Determine the number of nodes in the list.

The range of valid child node indices is 0 to `length-1` inclusive.

Returns:
  number of nodes

Implements NodeRefListBase.

MemoryManagerType& NodeRefList::getMemoryManager | ( |  | ) |

virtual size_type NodeRefList::indexOf | ( | const XalanNode * | theNode | ) | const`[virtual]`

Retrieve the zero based index of the node in the list.

Parameters:

  theNode | node whose index to find

Returns:
  index of node

Implements NodeRefListBase.

virtual XalanNode* NodeRefList::item | ( | size_type | index | ) | const`[virtual]`

Returns the `index`th item in the collection.

If `index` is greater than or equal to the number of nodes in the list, this returns `null`.

Parameters:

  index | index into the collection

Returns:
  node at the `index`th position in the `NodeList`, or `null` if that is not a valid index

Implements NodeRefListBase.

NodeRefList& NodeRefList::operator= | ( | const NodeRefList & | theRHS | ) |

| Reimplemented in MutableNodeRefList.

NodeRefList& NodeRefList::operator= | ( | const NodeRefListBase & | theRHS | ) |

| Reimplemented from NodeRefListBase. Reimplemented in MutableNodeRefList.

void NodeRefList::swap | ( | NodeRefList & | theOther | ) |

## Member Data Documentation

NodeListVectorType NodeRefList::m_nodeList `[protected]`

The documentation for this class was generated from the following file:

- NodeRefList.hpp

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.