- Main Page
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions

# FbxIntrusiveList< T, NodeIndex > Class Template Reference

Search for all occurrences

## Detailed Description

### template<typename T, int NodeIndex = 0>
class FbxIntrusiveList< T, NodeIndex >

Definition at line 60 of file fbxintrusivelist.h.

`#include <fbxintrusivelist.h>`

List of all members.

## Classes
class | IntrusiveListConstIterator
class | IntrusiveListIterator
## Public Types
typedef T | allocator_type
typedef T | value_type
typedef T & | reference
typedef const T & | const_reference
typedef T * | pointer
typedef const T * | const_pointer
typedef FbxListNode< T > | NodeT
typedef IntrusiveListIterator | iterator
typedef IntrusiveListConstIterator | const_iterator
## Public Member Functions
| FbxIntrusiveList ()
| ~FbxIntrusiveList ()
bool | Empty () const
void | PushBack (T &pElement)
void | PushFront (T &pElement)
void | PopFront ()
void | PopBack ()
iterator | Begin ()
const_iterator | Begin () const
iterator | End ()
const_iterator | End () const
reference | Front ()
const_reference | Front () const
reference | Back ()
const_reference | Back () const
iterator & | Erase (iterator &it)

## Member Typedef Documentation

typedef T allocator_type

Search for all occurrences

Definition at line 63 of file fbxintrusivelist.h.

typedef T value_type

Search for all occurrences

Definition at line 64 of file fbxintrusivelist.h.

typedef T& reference

Search for all occurrences

Definition at line 65 of file fbxintrusivelist.h.

typedef const T& const_reference

Search for all occurrences

Definition at line 66 of file fbxintrusivelist.h.

typedef T* pointer

Search for all occurrences

Definition at line 67 of file fbxintrusivelist.h.

typedef const T* const_pointer

Search for all occurrences

Definition at line 68 of file fbxintrusivelist.h.

typedef FbxListNode<T> NodeT

Search for all occurrences

Definition at line 70 of file fbxintrusivelist.h.

typedef IntrusiveListIterator iterator

Search for all occurrences

Definition at line 231 of file fbxintrusivelist.h.

typedef IntrusiveListConstIterator const_iterator

Search for all occurrences

Definition at line 232 of file fbxintrusivelist.h.

## Constructor & Destructor Documentation

FbxIntrusiveList | ( |  | ) | `[inline]`

Definition at line 73 of file fbxintrusivelist.h.

                          :mHead(0)
        {
            mHead.mNext = mHead.mPrev = &mHead;
        }

~FbxIntrusiveList | ( |  | ) | `[inline]`

Definition at line 77 of file fbxintrusivelist.h.

        {
            while(!Empty())
                Begin().Get()->Disconnect();  // LINUXNote:  should be Erase(Begin()); but there's an issue with gcc 4.2
        };

## Member Function Documentation

bool Empty | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 84 of file fbxintrusivelist.h.

        {
            return ((mHead.mNext==&mHead)&&(mHead.mPrev==&mHead));
        }

void PushBack | ( | T & | pElement | ) | `[inline]`

Search for all occurrences

Definition at line 90 of file fbxintrusivelist.h.

        {
            NodeT* pNode = &pElement.GetListNode(NodeIndex);
            pNode->mData = &pElement;

            if (Empty())
            {
                pNode->mNext = &mHead;
                pNode->mPrev = &mHead;
                mHead.mNext = pNode;
                mHead.mPrev = pNode;
            }
            else
            {
                pNode->mNext = &mHead;
                pNode->mPrev = mHead.mPrev;

                pNode->mPrev->mNext = pNode;
                mHead.mPrev = pNode;
            }
        }

void PushFront | ( | T & | pElement | ) | `[inline]`

Search for all occurrences

Definition at line 112 of file fbxintrusivelist.h.

        {
            NodeT* pNode = &pElement.GetListNode(NodeIndex);
            pNode->mData = &pElement;

            if (Empty())
            {
                pNode->mNext = &mHead;
                pNode->mPrev = &mHead;
                mHead.mNext = pNode;
                mHead.mPrev = pNode;
            }
            else
            {
                pNode->mNext = mHead.mNext;
                pNode->mPrev = &mHead;

                pNode->mNext->mPrev = pNode;
                mHead.mNext = pNode;
            }
        }

void PopFront | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 134 of file fbxintrusivelist.h.

        {
            iterator begin = Begin();
            Erase(begin);
        }

void PopBack | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 140 of file fbxintrusivelist.h.

        {
            Erase(--(End()));
        }

iterator Begin | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 235 of file fbxintrusivelist.h.

    { return iterator(mHead.mNext); }

const_iterator Begin | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 236 of file fbxintrusivelist.h.

    { return const_iterator(mHead.mNext); }

iterator End | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 237 of file fbxintrusivelist.h.

    { return iterator(&mHead); }

const_iterator End | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 238 of file fbxintrusivelist.h.

    { return const_iterator(&mHead); }

reference Front | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 243 of file fbxintrusivelist.h.

    {return (*Begin());}

const_reference Front | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 244 of file fbxintrusivelist.h.

    { return (*Begin()); }

reference Back | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 245 of file fbxintrusivelist.h.

    { return (*(--End())); }

const_reference Back | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 246 of file fbxintrusivelist.h.

    { return (*(--End())); }

iterator& Erase | ( | iterator & | it | ) | `[inline]`

Search for all occurrences

Definition at line 248 of file fbxintrusivelist.h.

        {
            it.Get()->Disconnect();
            return (++it);
        }

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

- fbxsdk/core/base/fbxintrusivelist.h