Xalan-C++ API Reference  1.12.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
xalanc::MutableNodeRefList Class Reference

Local implementation of MutableNodeRefList. More...

#include <xalanc/XPath/MutableNodeRefList.hpp>

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

Classes

class  addNodeInDocOrderFunctor
 

Public Types

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

Public Member Functions

 MutableNodeRefList (MemoryManager &theManager)
 Construct an empty mutable node list. More...
 
 MutableNodeRefList (const MutableNodeRefList &theSource, MemoryManager &theManager)
 Construct a mutable node list from another list. More...
 
 MutableNodeRefList (const NodeRefListBase &theSource, MemoryManager &theManager)
 Construct a mutable node list from another list. More...
 
virtual ~MutableNodeRefList ()
 
MutableNodeRefListoperator= (const MutableNodeRefList &theRHS)
 
MutableNodeRefListoperator= (const NodeRefList &theRHS)
 
MutableNodeRefListoperator= (const NodeRefListBase &theRHS)
 
MutableNodeRefListoperator= (const XalanNodeList *theRHS)
 
void addNode (XalanNode *n)
 Add a node at to the list. More...
 
void insertNode (XalanNode *n, size_type pos)
 Insert a node at a given position. More...
 
void removeNode (const XalanNode *n)
 Remove a node from the list. More...
 
void removeNode (size_type pos)
 Remove a node from the list. More...
 
void clear ()
 Remove all nodes. More...
 
void setNode (size_type pos, XalanNode *n=0)
 Set a item. More...
 
void addNodes (const XalanNodeList &nodelist)
 Copy NodeList members into this nodelist, adding in document order. More...
 
void addNodes (const NodeRefListBase &nodelist)
 Copy NodeList members into this nodelist, adding in document order. More...
 
void addNodesInDocOrder (const XalanNodeList &nodelist, XPathExecutionContext &executionContext)
 Copy NodeList members into this nodelist, adding in document order. More...
 
void addNodesInDocOrder (const NodeRefListBase &nodelist, XPathExecutionContext &executionContext)
 Copy NodeList members into this nodelist, adding in document order. More...
 
void addNodesInDocOrder (const MutableNodeRefList &nodelist, XPathExecutionContext &executionContext)
 Copy NodeList members into this nodelist, adding in document order. More...
 
void addNodeInDocOrder (XalanNode *node, XPathExecutionContext &executionContext)
 Add a node into list where it should occur in document order. More...
 
void clearNulls ()
 Clear any null entries in the node list. More...
 
void reverse ()
 Reverse the nodes in the list. More...
 
void reserve (size_type theCount)
 Reserve space for the supplied number of nodes. More...
 
bool getUnknownOrder () const
 See if the order of the nodes is an unknown order. More...
 
void setUnknownOrder ()
 
bool getDocumentOrder () const
 See if the order of the nodes is document order. More...
 
void setDocumentOrder ()
 Set the known order of the nodes. More...
 
bool getReverseDocumentOrder () const
 See if the order of the nodes is reverse document order. More...
 
void setReverseDocumentOrder ()
 Set the known order of the nodes. More...
 
void swap (MutableNodeRefList &theOther)
 
- Public Member Functions inherited from xalanc::NodeRefList
 NodeRefList (MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
 
 NodeRefList (const NodeRefList &theSource, MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
 Construct a node list from another. More...
 
MemoryManager & getMemoryManager ()
 
 NodeRefList (const NodeRefListBase &theSource, MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
 Construct a node list from another. More...
 
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. More...
 
virtual size_type getLength () const
 Determine the number of nodes in the list. More...
 
virtual size_type indexOf (const XalanNode *theNode) const
 Retrieve the zero based index of the node in the list. More...
 
bool checkForDuplicates (MemoryManager &theManager) const
 
void swap (NodeRefList &theOther)
 
- Public Member Functions inherited from xalanc::NodeRefListBase
 NodeRefListBase ()
 
virtual ~NodeRefListBase ()
 

Static Public Member Functions

static MutableNodeRefListcreate (MemoryManager &theManager)
 

Additional Inherited Members

- Static Public Attributes inherited from xalanc::NodeRefListBase
static const size_type npos
 
- Protected Types inherited from xalanc::NodeRefList
enum  { eDefaultVectorSize = 100 }
 
- Protected Member Functions inherited from xalanc::NodeRefList
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. More...
 
- Protected Member Functions inherited from xalanc::NodeRefListBase
 NodeRefListBase (const NodeRefListBase &)
 
NodeRefListBaseoperator= (const NodeRefListBase &)
 
- Protected Attributes inherited from xalanc::NodeRefList
NodeListVectorType m_nodeList
 

Detailed Description

Local implementation of MutableNodeRefList.

This class is for internal use only.

Definition at line 46 of file MutableNodeRefList.hpp.

Member Typedef Documentation

◆ NodeListIteratorType

Definition at line 291 of file MutableNodeRefList.hpp.

Constructor & Destructor Documentation

◆ MutableNodeRefList() [1/3]

xalanc::MutableNodeRefList::MutableNodeRefList ( MemoryManager &  theManager)
explicit

Construct an empty mutable node list.

◆ MutableNodeRefList() [2/3]

xalanc::MutableNodeRefList::MutableNodeRefList ( const MutableNodeRefList theSource,
MemoryManager &  theManager 
)

Construct a mutable node list from another list.

Parameters
theSourcesource list

◆ MutableNodeRefList() [3/3]

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

Construct a mutable node list from another list.

Parameters
theSourcesource list

◆ ~MutableNodeRefList()

virtual xalanc::MutableNodeRefList::~MutableNodeRefList ( )
virtual

Member Function Documentation

◆ addNode()

void xalanc::MutableNodeRefList::addNode ( XalanNode n)

Add a node at to the list.

Parameters
nnode to add

◆ addNodeInDocOrder()

void xalanc::MutableNodeRefList::addNodeInDocOrder ( XalanNode node,
XPathExecutionContext executionContext 
)

Add a node into list where it should occur in document order.

Parameters
nodenode object to add
executionContextthe current execution context

◆ addNodes() [1/2]

void xalanc::MutableNodeRefList::addNodes ( const NodeRefListBase nodelist)

Copy NodeList members into this nodelist, adding in document order.

If a node is null, don't add it.

Parameters
nodelistnode list to add

◆ addNodes() [2/2]

void xalanc::MutableNodeRefList::addNodes ( const XalanNodeList nodelist)

Copy NodeList members into this nodelist, adding in document order.

If a node is null, don't add it.

Parameters
nodelistnode list to add

◆ addNodesInDocOrder() [1/3]

void xalanc::MutableNodeRefList::addNodesInDocOrder ( const MutableNodeRefList nodelist,
XPathExecutionContext executionContext 
)

Copy NodeList members into this nodelist, adding in document order.

Parameters
nodelistnode list to add
executionContextthe current execution context

◆ addNodesInDocOrder() [2/3]

void xalanc::MutableNodeRefList::addNodesInDocOrder ( const NodeRefListBase nodelist,
XPathExecutionContext executionContext 
)

Copy NodeList members into this nodelist, adding in document order.

Parameters
nodelistnode list to add
executionContextthe current execution context

◆ addNodesInDocOrder() [3/3]

void xalanc::MutableNodeRefList::addNodesInDocOrder ( const XalanNodeList nodelist,
XPathExecutionContext executionContext 
)

Copy NodeList members into this nodelist, adding in document order.

Parameters
nodelistnode list to add
executionContextthe current execution context

Referenced by xalanc::XPath::group().

◆ clear()

void xalanc::MutableNodeRefList::clear ( )

Remove all nodes.

◆ clearNulls()

void xalanc::MutableNodeRefList::clearNulls ( )

Clear any null entries in the node list.

◆ create()

static MutableNodeRefList* xalanc::MutableNodeRefList::create ( MemoryManager &  theManager)
static

◆ getDocumentOrder()

bool xalanc::MutableNodeRefList::getDocumentOrder ( ) const
inline

See if the order of the nodes is document order.

Definition at line 255 of file MutableNodeRefList.hpp.

◆ getReverseDocumentOrder()

bool xalanc::MutableNodeRefList::getReverseDocumentOrder ( ) const
inline

See if the order of the nodes is reverse document order.

Definition at line 275 of file MutableNodeRefList.hpp.

◆ getUnknownOrder()

bool xalanc::MutableNodeRefList::getUnknownOrder ( ) const
inline

See if the order of the nodes is an unknown order.

Definition at line 240 of file MutableNodeRefList.hpp.

◆ insertNode()

void xalanc::MutableNodeRefList::insertNode ( XalanNode n,
size_type  pos 
)

Insert a node at a given position.

Parameters
nnode to insert
posposition of insertion

◆ operator=() [1/4]

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

◆ operator=() [2/4]

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

◆ operator=() [3/4]

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

◆ operator=() [4/4]

MutableNodeRefList& xalanc::MutableNodeRefList::operator= ( const XalanNodeList theRHS)

◆ removeNode() [1/2]

void xalanc::MutableNodeRefList::removeNode ( const XalanNode n)

Remove a node from the list.

Parameters
nnode to insert

◆ removeNode() [2/2]

void xalanc::MutableNodeRefList::removeNode ( size_type  pos)

Remove a node from the list.

Parameters
posposition of node in list

◆ reserve()

void xalanc::MutableNodeRefList::reserve ( size_type  theCount)
inline

Reserve space for the supplied number of nodes.

This is taken as an optimization, and may be ignored. You might want to call this when you know the number of nodes you're about to add to this list.

Remember to take into account the current size of the list when calling this. That means you will probably want to add the result of getLength() to the number of nodes you're planning to add.

Parameters
theCountthe number of nodes to reserve space for

Definition at line 231 of file MutableNodeRefList.hpp.

◆ reverse()

void xalanc::MutableNodeRefList::reverse ( )

Reverse the nodes in the list.

◆ setDocumentOrder()

void xalanc::MutableNodeRefList::setDocumentOrder ( )
inline

Set the known order of the nodes.

This should only be done when the order is known. Otherwise, disaster will ensue.

Definition at line 266 of file MutableNodeRefList.hpp.

Referenced by xalanc::XPath::group().

◆ setNode()

void xalanc::MutableNodeRefList::setNode ( size_type  pos,
XalanNode n = 0 
)

Set a item.

Parameters
posposition of node to modify
nnode to insert, default is empty node

◆ setReverseDocumentOrder()

void xalanc::MutableNodeRefList::setReverseDocumentOrder ( )
inline

Set the known order of the nodes.

This should only be done when the order is known. Otherwise, disaster will ensue.

Definition at line 286 of file MutableNodeRefList.hpp.

◆ setUnknownOrder()

void xalanc::MutableNodeRefList::setUnknownOrder ( )
inline

Definition at line 246 of file MutableNodeRefList.hpp.

◆ swap()

void xalanc::MutableNodeRefList::swap ( MutableNodeRefList theOther)
inline

Definition at line 319 of file MutableNodeRefList.hpp.

References xalanc::swap().


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