- Main Page
- Classes
- Files
- Directories

- 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 57 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 60 of file fbxintrusivelist.h.

typedef T value_type

Search for all occurrences

Definition at line 61 of file fbxintrusivelist.h.

typedef T& reference

Search for all occurrences

Definition at line 62 of file fbxintrusivelist.h.

typedef const T& const_reference

Search for all occurrences

Definition at line 63 of file fbxintrusivelist.h.

typedef T* pointer

Search for all occurrences

Definition at line 64 of file fbxintrusivelist.h.

typedef const T* const_pointer

Search for all occurrences

Definition at line 65 of file fbxintrusivelist.h.

typedef FbxListNode<T> NodeT

Search for all occurrences

Definition at line 67 of file fbxintrusivelist.h.

typedef IntrusiveListIterator iterator

Search for all occurrences

Definition at line 228 of file fbxintrusivelist.h.

typedef IntrusiveListConstIterator const_iterator

Search for all occurrences

Definition at line 229 of file fbxintrusivelist.h.

## Constructor & Destructor Documentation

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

Definition at line 70 of file fbxintrusivelist.h.

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

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

Definition at line 74 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 81 of file fbxintrusivelist.h.

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

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

Search for all occurrences

Definition at line 87 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 109 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 131 of file fbxintrusivelist.h.

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

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

Search for all occurrences

Definition at line 137 of file fbxintrusivelist.h.

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

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

Search for all occurrences

Definition at line 232 of file fbxintrusivelist.h.

    { return iterator(mHead.mNext); }

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

Search for all occurrences

Definition at line 233 of file fbxintrusivelist.h.

    { return const_iterator(mHead.mNext); }

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

Search for all occurrences

Definition at line 234 of file fbxintrusivelist.h.

    { return iterator(&mHead); }

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

Search for all occurrences

Definition at line 235 of file fbxintrusivelist.h.

    { return const_iterator(&mHead); }

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

Search for all occurrences

Definition at line 240 of file fbxintrusivelist.h.

    {return (*Begin());}

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

Search for all occurrences

Definition at line 241 of file fbxintrusivelist.h.

    { return (*Begin()); }

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

Search for all occurrences

Definition at line 242 of file fbxintrusivelist.h.

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

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

Search for all occurrences

Definition at line 243 of file fbxintrusivelist.h.

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

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

Search for all occurrences

Definition at line 245 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