Xalan-C++ API Reference 1.12.0
xalanc::NodeRefList Class Reference

Local implementation of NodeRefList. More...

#include <xalanc/XPath/NodeRefList.hpp>

Inheritance diagram for xalanc::NodeRefList:
[legend]
Collaboration diagram for xalanc::NodeRefList:
[legend]

Public Types

typedef XalanVector< XalanNode * > NodeListVectorType
 
- Public Types inherited from xalanc::NodeRefListBase
typedef XalanSize_t size_type
 

Public Member Functions

 NodeRefList (MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
 
 NodeRefList (const NodeRefList &theSource, MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
 Construct a node list from another.
 
MemoryManager & getMemoryManager ()
 
 NodeRefList (const NodeRefListBase &theSource, MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
 Construct a node list from another.
 
virtual ~NodeRefList ()
 
NodeRefListoperator= (const NodeRefListBase &theRHS)
 
NodeRefListoperator= (const NodeRefList &theRHS)
 
bool empty () const
 
virtual XalanNodeitem (size_type index) const
 Returns the indexth 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 (MemoryManager &theManager) const
 
void swap (NodeRefList &theOther)
 
- Public Member Functions inherited from xalanc::NodeRefListBase
 NodeRefListBase ()
 
virtual ~NodeRefListBase ()
 

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 Member Functions inherited from xalanc::NodeRefListBase
 NodeRefListBase (const NodeRefListBase &)
 
NodeRefListBaseoperator= (const NodeRefListBase &)
 

Protected Attributes

NodeListVectorType m_nodeList
 

Additional Inherited Members

- Static Public Attributes inherited from xalanc::NodeRefListBase
static const size_type npos
 

Detailed Description

Local implementation of NodeRefList.

This class is for internal use only.

Definition at line 43 of file NodeRefList.hpp.

Member Typedef Documentation

◆ NodeListVectorType

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
eDefaultVectorSize 

Definition at line 119 of file NodeRefList.hpp.

Constructor & Destructor Documentation

◆ NodeRefList() [1/3]

xalanc::NodeRefList::NodeRefList ( MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
explicit

◆ NodeRefList() [2/3]

xalanc::NodeRefList::NodeRefList ( const NodeRefList & theSource,
MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR )

Construct a node list from another.

Parameters
theSourcesource node list

References NodeRefList(), and XALAN_DEFAULT_CONSTRUCTOR_MEMMGR.

◆ NodeRefList() [3/3]

xalanc::NodeRefList::NodeRefList ( const NodeRefListBase & theSource,
MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR )
explicit

Construct a node list from another.

Parameters
theSourcesource node list

References xalanc::NodeRefListBase::NodeRefListBase(), and XALAN_DEFAULT_CONSTRUCTOR_MEMMGR.

◆ ~NodeRefList()

virtual xalanc::NodeRefList::~NodeRefList ( )
virtual

References NodeRefList().

Member Function Documentation

◆ checkForDuplicates()

bool xalanc::NodeRefList::checkForDuplicates ( MemoryManager & theManager) const

◆ empty()

bool xalanc::NodeRefList::empty ( ) const
inline

Definition at line 85 of file NodeRefList.hpp.

References m_nodeList.

◆ ensureAllocation()

void xalanc::NodeRefList::ensureAllocation ( NodeListVectorType::size_type theSize = 0)
inlineprotected

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

Parameters
theSizeThe requested size.

Definition at line 132 of file NodeRefList.hpp.

References eDefaultVectorSize, and m_nodeList.

◆ getLength()

virtual size_type xalanc::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 xalanc::NodeRefListBase.

◆ getMemoryManager()

MemoryManager & xalanc::NodeRefList::getMemoryManager ( )
inline

Definition at line 60 of file NodeRefList.hpp.

References m_nodeList.

◆ indexOf()

virtual size_type xalanc::NodeRefList::indexOf ( const XalanNode * theNode) const
virtual

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

Parameters
theNodenode whose index to find
Returns
index of node

Implements xalanc::NodeRefListBase.

◆ item()

virtual XalanNode * xalanc::NodeRefList::item ( size_type index) const
virtual

Returns the indexth item in the collection.

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

Parameters
indexindex into the collection
Returns
node at the indexth position in the NodeList, or null if that is not a valid index

Implements xalanc::NodeRefListBase.

◆ operator=() [1/2]

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

References NodeRefList().

◆ operator=() [2/2]

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

◆ swap()

void xalanc::NodeRefList::swap ( NodeRefList & theOther)
inline

Definition at line 110 of file NodeRefList.hpp.

References m_nodeList, and NodeRefList().

Referenced by xalanc::MutableNodeRefList::swap().

Member Data Documentation

◆ m_nodeList

NodeListVectorType xalanc::NodeRefList::m_nodeList
protected

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