OpenNI 1.5.4: XnListT< T, TAlloc > Class Template Reference

OpenNI

XnListT< T, TAlloc > Class Template Reference

#include <XnListT.h>

Inheritance diagram for XnListT< T, TAlloc >:

List of all members.

Classes

class  ConstIterator
class  Iterator

Public Types

typedef XnLinkedNodeT< T > LinkedNode
typedef T TValue
typedef TAlloc TAllocator

Public Member Functions

 XnListT ()
 XnListT (const XnListT &other)
XnListToperator= (const XnListT &other)
 ~XnListT ()
Iterator Begin ()
ConstIterator Begin () const
Iterator End ()
ConstIterator End () const
Iterator ReverseBegin ()
ConstIterator ReverseBegin () const
Iterator ReverseEnd ()
ConstIterator ReverseEnd () const
XnStatus AddAfter (ConstIterator where, T const &value)
XnStatus AddBefore (ConstIterator where, T const &value)
XnStatus AddFirst (T const &value)
XnStatus AddLast (T const &value)
ConstIterator Find (T const &value) const
Iterator Find (T const &value)
XnStatus Remove (ConstIterator where)
XnStatus Remove (T const &value)
XnStatus Clear ()
XnBool IsEmpty () const
XnUInt32 Size () const
void CopyTo (T *pArray) const

Protected Member Functions

XnStatus InsertAfter (LinkedNode *pAfter, T const &val)

Protected Attributes

LinkedNode m_anchor
XnUInt32 m_nSize

Detailed Description

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
class XnListT< T, TAlloc >

A linked list.

Template Parameters:
TThe type of value in the list
TAlloc[Optional] A class for allocating and deallocating nodes in the list. The allocator must have two static methods: Allocate() and Deallocate().

Member Typedef Documentation

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
typedef XnLinkedNodeT<T> XnListT< T, TAlloc >::LinkedNode
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
typedef TAlloc XnListT< T, TAlloc >::TAllocator
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
typedef T XnListT< T, TAlloc >::TValue

Constructor & Destructor Documentation

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnListT< T, TAlloc >::XnListT ( ) [inline]
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnListT< T, TAlloc >::XnListT ( const XnListT< T, TAlloc > &  other) [inline]
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnListT< T, TAlloc >::~XnListT ( ) [inline]

Member Function Documentation

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::AddAfter ( ConstIterator  where,
T const &  value 
) [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
value[in] The value to add to the list
Returns:
XN_STATUS_ALLOC_FAILED failed to allocate new node XN_STATUS_ILLEGAL_POSITION iterator is invalid
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::AddBefore ( ConstIterator  where,
T const &  value 
) [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
value[in] The value to add to the list
Returns:
XN_STATUS_ALLOC_FAILED failed to allocate new node XN_STATUS_ILLEGAL_POSITION iterator is invalid
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::AddFirst ( T const &  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 allocate new node
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::AddLast ( T const &  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 allocate new node
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
Iterator XnListT< T, TAlloc >::Begin ( ) [inline]

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

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
ConstIterator XnListT< T, TAlloc >::Begin ( ) const [inline]

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

Reimplemented in XnStackT< T, TAlloc >.

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::Clear ( ) [inline]

Remove all entries from the list

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
void XnListT< T, TAlloc >::CopyTo ( T *  pArray) const [inline]

Copies all values in the list to an array.

Parameters:
pArrayA pre-allocated array that values should be copied to. The allocation size can be determined using Size().
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
Iterator XnListT< T, TAlloc >::End ( ) [inline]

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

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
ConstIterator XnListT< T, TAlloc >::End ( ) const [inline]

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

Reimplemented in XnStackT< T, TAlloc >.

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
ConstIterator XnListT< T, TAlloc >::Find ( T const &  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
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
Iterator XnListT< T, TAlloc >::Find ( T const &  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
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::InsertAfter ( LinkedNode pAfter,
T const &  val 
) [inline, protected]

Add a new value to the list

Parameters:
pAfter[in] The node 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,
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnBool XnListT< T, TAlloc >::IsEmpty ( ) const [inline]

Check if list is empty

Reimplemented in XnStackT< T, TAlloc >.

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnListT& XnListT< T, TAlloc >::operator= ( const XnListT< T, TAlloc > &  other) [inline]
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::Remove ( ConstIterator  where) [inline]

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
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnStatus XnListT< T, TAlloc >::Remove ( T const &  value) [inline]

Removes the first occurrence of a value from the list

Parameters:
value[in] The value to be removed
Returns:
XN_STATUS_NO_MATCH value wasn't found.
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
Iterator XnListT< T, TAlloc >::ReverseBegin ( ) [inline]

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

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
ConstIterator XnListT< T, TAlloc >::ReverseBegin ( ) const [inline]

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

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
Iterator XnListT< T, TAlloc >::ReverseEnd ( ) [inline]

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

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
ConstIterator XnListT< T, TAlloc >::ReverseEnd ( ) const [inline]

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

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnUInt32 XnListT< T, TAlloc >::Size ( ) const [inline]

Gets the current size of the list


Member Data Documentation

template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
LinkedNode XnListT< T, TAlloc >::m_anchor [protected]
template<class T, class TAlloc = XnLinkedNodeDefaultAllocatorT<T>>
XnUInt32 XnListT< T, TAlloc >::m_nSize [protected]

The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:06 for OpenNI 1.5.4 by   doxygen 1.7.5.1