XnList Class Reference

`#include <XnList.h>`

## Classes

class | ConstIterator
class | Iterator

## Public Member Functions

| XnList ()
virtual | ~XnList ()
XnStatus | AddFirst (const XnValue &value)
XnStatus | AddLast (const XnValue &value)
XnStatus | AddAfter (ConstIterator where, const XnValue &val)
XnStatus | AddBefore (ConstIterator where, const XnValue &val)
Iterator | Find (const XnValue &value)
ConstIterator | Find (const XnValue &value) const
XnStatus | Remove (ConstIterator where, XnValue &value)
virtual XnStatus | Remove (ConstIterator where)
XnStatus | Clear ()
XnBool | IsEmpty () const
XnUInt32 | Size () const
Iterator | begin ()
ConstIterator | begin () const
Iterator | end ()
ConstIterator | end () const
Iterator | rbegin ()
ConstIterator | rbegin () const
Iterator | rend ()
ConstIterator | rend () const

## Protected Member Functions

| XnList (INiNodeAllocator *pNodeAllocator)
void | Init (INiNodeAllocator *pNodeAllocator)
XnStatus | Add (XnNode *pWhere, const XnValue &val)

## Protected Attributes

XnNode * | m_pBase
INiNodeAllocator * | m_pNodeAllocator
XnBool | m_bOwnsAllocator

## Friends

class | XnNodeManager

## Detailed Description

The linked list

## Constructor & Destructor Documentation

## XnList() [1/2]

XnList::XnList | ( |  | ) |

inline

Constructor. Initialize internal representations

## ~XnList()

virtual XnList::~XnList | ( |  | ) |

inline virtual

Destructor. Destroy internal representations

## XnList() [2/2]

XnList::XnList | ( | INiNodeAllocator * | pNodeAllocator | ) |

inline protected

Constructor. Initialize internal representations

## Member Function Documentation

## Add()

XnStatus XnList::Add | ( | XnNode * | pWhere,
|  | const XnValue & | val )

inline protected

Add a new value to the list

Parameters

  pWhere | [in] The XnNode after which to add the new value
  val | [in] The value to add to the list

Returns
  XN_STATUS_ALLOC_FAILED Failed to add to the list because no nodes are available,

## AddAfter()

XnStatus XnList::AddAfter | ( | ConstIterator | where,
|  | const XnValue & | val )

inline

Add a new value after the object pointed to by the iterator

Parameters

  where | [in] iterator to the position after which to add the new value
  val | [in] The value to add to the list

Returns
  XN_STATUS_ALLOC_FAILED Failed to add to the list because no nodes are available, XN_STATUS_ILLEGAL_POSITION iterator is invalid

## AddBefore()

XnStatus XnList::AddBefore | ( | ConstIterator | where,
|  | const XnValue & | val )

inline

Add a new value before the object pointed to by the iterator

Parameters

  where | [in] iterator to the position before which to add the new value
  val | [in] The value to add to the list

Returns
  XN_STATUS_ALLOC_FAILED Failed to add to the list because no nodes are available,

## AddFirst()

XnStatus XnList::AddFirst | ( | const XnValue & | value | ) |

inline

Add a new value at the beginning of list

Parameters

  value | [in] The value to add to the head of the list

Returns
  XN_STATUS_ALLOC_FAILED Failed to add to the list because no nodes are available.

## AddLast()

XnStatus XnList::AddLast | ( | const XnValue & | value | ) |

inline

Add a new value at the end of the list

Parameters

  value | [in] The value to add to the tail of the list

Returns
  XN_STATUS_ALLOC_FAILED Failed to add to the list because no nodes are available.

## begin() [1/2]

Iterator XnList::begin | ( |  | ) |

inline

An iterator to the first entry of the list (non-const version)

## begin() [2/2]

ConstIterator XnList::begin | ( |  | ) | const

inline

An iterator to the first entry of the list (const version)

## Clear()

XnStatus XnList::Clear | ( |  | ) |

inline

Remove all entries from the list

## end() [1/2]

Iterator XnList::end | ( |  | ) |

inline

An iterator 1to the end of the list (non-const version). The position is invalid.

## end() [2/2]

ConstIterator XnList::end | ( |  | ) | const

inline

An iterator to the end of the list (const version). The position is invalid.

## Find() [1/2]

Iterator XnList::Find | ( | const XnValue & | value | ) |

inline

Get an iterator pointing to a value in the list.

Parameters

  value | [in] The searched value

Returns
  end() if value doesn't exist

## Find() [2/2]

ConstIterator XnList::Find | ( | const XnValue & | value | ) | const

inline

Get an iterator pointing to a value in the list.

Parameters

  value | [in] The searched value

Returns
  end() if value doesn't exist

## Init()

void XnList::Init | ( | INiNodeAllocator * | pNodeAllocator | ) |

inline protected

## IsEmpty()

XnBool XnList::IsEmpty | ( |  | ) | const

inline

Check if list is empty

## rbegin() [1/2]

Iterator XnList::rbegin | ( |  | ) |

inline

An iterator to the last entry of the list (non-const version)

## rbegin() [2/2]

ConstIterator XnList::rbegin | ( |  | ) | const

inline

An iterator to the last entry of the list (const version)

## Remove() [1/2]

virtual XnStatus XnList::Remove | ( | ConstIterator | where | ) |

inline virtual

Remove a value from the list

Parameters

  where | [in] Iterator pointing to an entry in the list

Returns
  XN_STATUS_ILLEGAL_POSITION iterator was invalid

## Remove() [2/2]

XnStatus XnList::Remove | ( | ConstIterator | where,
|  | XnValue & | value )

inline

Remove a value from the list

Parameters

  where | [in] Iterator pointing to an entry in the list
  value | [out] The value that was in the removed entry

Returns
  XN_STATUS_ILLEGAL_POSITION iterator was invalid

## rend() [1/2]

Iterator XnList::rend | ( |  | ) |

inline

An iterator to the beginning of the list (non-const version). This position is invalid

## rend() [2/2]

ConstIterator XnList::rend | ( |  | ) | const

inline

An iterator to the beginning of the list (const version). This position is invalid

## Size()

XnUInt32 XnList::Size | ( |  | ) | const

inline

Current size of the list

## Friends And Related Symbol Documentation

## XnNodeManager

friend class XnNodeManager

friend

## Member Data Documentation

## m_bOwnsAllocator

XnBool XnList::m_bOwnsAllocator

protected

## m_pBase

XnNode* XnList::m_pBase

protected

The base node for the list

## m_pNodeAllocator

INiNodeAllocator* XnList::m_pNodeAllocator

protected

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

- XnList.h