- Main Page
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends

# FbxLayerElementArrayTemplate< T > Class Template Reference

This reference page is linked to from the following overview topics: Meshes, List of Python Fbx classes.

Search for all occurrences

## Detailed Description

### template<class T>
class FbxLayerElementArrayTemplate< T >

FbxLayerElementArrayTemplate provides data array manipulation of the data buffer for FbxLayerElement.

It is the subclass of FbxLayerElementArray.

Definition at line 865 of file fbxlayer.h.

`#include <fbxlayer.h>`

Inheritance diagram for FbxLayerElementArrayTemplate< T >:
[legend]

List of all members.

## Public Member Functions
| FbxLayerElementArrayTemplate (EFbxType pDataType)
| Constructor.
int | Add (T const &pItem)
| Appends a new item to the end of the data buffer.
int | InsertAt (int pIndex, T const &pItem)
| Inserts a new item at the specified position of the data buffer.
void | SetAt (int pIndex, T const &pItem)
| Sets the value of the specified item.
void | SetLast (T const &pItem)
| Sets the value of the last item.
T | RemoveAt (int pIndex)
| Removes the specified item from the data buffer.
T | RemoveLast ()
| Removes the last item from the data buffer.
bool | RemoveIt (T const &pItem)
| Removes one item from the data buffer.
T | GetAt (int pIndex) const
| Returns the specified item's value.
T | GetFirst () const
| Returns the first item's value.
T | GetLast () const
| Returns the last item's value.
int | Find (T const &pItem)
| Searches for an item in the data buffer.
int | FindAfter (int pAfterIndex, T const &pItem)
| Searches for an item after the specified index in the data buffer.
int | FindBefore (int pBeforeIndex, T const &pItem)
| Searches for one item before the specified index in the data buffer.
T | operator[] (int pIndex) const
| Returns the specified item's value.
FbxLayerElementArray & | operator= (const FbxArray< T > &pArrayTemplate)
| Assignment operator.
FbxLayerElementArrayTemplate< T > & | operator= (const FbxLayerElementArrayTemplate< T > &pArrayTemplate)
| Assignment operator.
## Friends
class | FbxLayerElementUserData

## Constructor & Destructor Documentation

FbxLayerElementArrayTemplate | ( | EFbxType | pDataType | ) | `[inline]`

Constructor.

Parameters:

  pDataType | The data type of the array items.

Definition at line 872 of file fbxlayer.h.

                                                         :
            FbxLayerElementArray(pDataType)
            {
            }

## Member Function Documentation

int Add | ( | T const & | pItem | ) | `[inline]`

Search for all occurrences

Appends a new item to the end of the data buffer.

Parameters:

  pItem | The new item to be added

Returns:
  The index of the new item

Reimplemented from FbxLayerElementArray.

Definition at line 881 of file fbxlayer.h.

    { return FbxLayerElementArray::Add(pItem); }

int InsertAt | ( | int | pIndex,
|  | T const & | pItem
| ) |  | `[inline]`

Search for all occurrences

Inserts a new item at the specified position of the data buffer.

Parameters:

  pIndex | The specified position
  pItem | The new item to be inserted

Returns:
  The index of the inserted item

Reimplemented from FbxLayerElementArray.

Definition at line 888 of file fbxlayer.h.

    { return FbxLayerElementArray::InsertAt(pIndex, pItem); }

void SetAt | ( | int | pIndex,
|  | T const & | pItem
| ) |  | `[inline]`

Search for all occurrences

Sets the value of the specified item.

Parameters:

  pIndex | The index of the item to be updated.
  pItem | The item whose value is copied to pIndex'th item

Reimplemented from FbxLayerElementArray.

Definition at line 894 of file fbxlayer.h.

    { FbxLayerElementArray::SetAt(pIndex, pItem); }

void SetLast | ( | T const & | pItem | ) | `[inline]`

Search for all occurrences

Sets the value of the last item.

Parameters:

  pItem | The item whose value is copied to the last item

Reimplemented from FbxLayerElementArray.

Definition at line 899 of file fbxlayer.h.

    { FbxLayerElementArray::SetLast(pItem); }

T RemoveAt | ( | int | pIndex | ) | `[inline]`

Search for all occurrences

Removes the specified item from the data buffer.

Parameters:

  pIndex | The index of the item to be removed

Returns:
  The value of the item removed

Definition at line 905 of file fbxlayer.h.

    { T lValue; FbxLayerElementArray::RemoveAt(pIndex, &lValue); return lValue; }

T RemoveLast | ( |  | ) | `[inline]`

Search for all occurrences

Removes the last item from the data buffer.

Returns:
  The value of the last item removed

Definition at line 910 of file fbxlayer.h.

    { T lValue; FbxLayerElementArray::RemoveLast(&lValue); return lValue; }

bool RemoveIt | ( | T const & | pItem | ) | `[inline]`

Search for all occurrences

Removes one item from the data buffer.

Parameters:

  pItem | The first item who equals pItem is to be removed

Returns:
  `True` if the item is removed successfully, `false` otherwise

Definition at line 916 of file fbxlayer.h.

    { return FbxLayerElementArray::RemoveIt(&pItem); }

T GetAt | ( | int | pIndex | ) | const `[inline]`

Search for all occurrences

Returns the specified item's value.

Parameters:

  pIndex | Index of the item

Returns:
  The value of the specified item

Remarks:
  If the index is invalid, pItem is set to zero.

Definition at line 923 of file fbxlayer.h.

    { T lValue; FbxLayerElementArray::GetAt(pIndex, &lValue); return lValue; }

T GetFirst | ( |  | ) | const `[inline]`

Search for all occurrences

Returns the first item's value.

Returns:
  The first item's value.

Definition at line 928 of file fbxlayer.h.

    { T lValue; FbxLayerElementArray::GetFirst(&lValue); return lValue; }

T GetLast | ( |  | ) | const `[inline]`

Search for all occurrences

Returns the last item's value.

Returns:
  The last item's value.

Definition at line 933 of file fbxlayer.h.

    { T lValue; FbxLayerElementArray::GetLast(&lValue); return lValue; }

int Find | ( | T const & | pItem | ) | `[inline]`

Search for all occurrences

Searches for an item in the data buffer.

Parameters:

  pItem | The value of the item for which to search

Returns:
  The index of the item found, -1 if not found.

Remarks:
  The index of the first item whose value equals pItem is returned.

Definition at line 940 of file fbxlayer.h.

    { return FbxLayerElementArray::Find(pItem); }

int FindAfter | ( | int | pAfterIndex,
|  | T const & | pItem
| ) |  | `[inline]`

Search for all occurrences

Searches for an item after the specified index in the data buffer.

Parameters:

  pAfterIndex | The specified index after which the searching begins
  pItem | The value of the item for which to search, the searching begins after pAfterIndex.

Returns:
  The index of the item found, -1 if not found.

Remarks:
  The index of the first item whose value equals pItem is returned.

Definition at line 948 of file fbxlayer.h.

    { return FbxLayerElementArray::FindAfter(pAfterIndex, pItem); }

int FindBefore | ( | int | pBeforeIndex,
|  | T const & | pItem
| ) |  | `[inline]`

Search for all occurrences

Searches for one item before the specified index in the data buffer.

Parameters:

  pBeforeIndex | The specified index before which the searching begins
  pItem | The value of the item for which to search, the searching begins before pBeforeIndex.

Returns:
  The index of the item found, -1 if not found.

Remarks:
  The index of the first item whose value equals pItem is returned.

Definition at line 956 of file fbxlayer.h.

    { return FbxLayerElementArray::FindBefore(pBeforeIndex, pItem); }

T operator[] | ( | int | pIndex | ) | const `[inline]`

Returns the specified item's value.

Parameters:

  pIndex | Index of the item

Returns:
  The value of the item

Remarks:
  If the index is invalid, pItem is set to zero.

Definition at line 963 of file fbxlayer.h.

    { T lValue; FbxLayerElementArray::GetAt(pIndex, &lValue); return lValue; }

FbxLayerElementArray& operator= | ( | const FbxArray< T > & | pArrayTemplate | ) | `[inline]`

Assignment operator.

Parameters:

  pArrayTemplate | The source array whose items are copied to this array.

Definition at line 968 of file fbxlayer.h.

        {
            SetStatus(LockAccessStatus::eNoWriteLock);
            if (WriteLock())
            {
                SetCount(pArrayTemplate.GetCount());
                for (int i = 0; i < pArrayTemplate.GetCount(); i++)
                    SetAt(i, pArrayTemplate.GetAt(i));
                WriteUnlock();
                SetStatus(LockAccessStatus::eSuccess);
            }
            return *this;
        }

FbxLayerElementArrayTemplate<T>& operator= | ( | const FbxLayerElementArrayTemplate< T > & | pArrayTemplate | ) | `[inline]`

Assignment operator.

Parameters:

  pArrayTemplate | The source array whose items are copied to this array.

Definition at line 985 of file fbxlayer.h.

        {
            if ( this != &pArrayTemplate )
            {
                SetStatus(LockAccessStatus::eNoWriteLock);
                if (WriteLock())
                {
                    SetCount(pArrayTemplate.GetCount());
                    for (int i = 0; i < pArrayTemplate.GetCount(); i++)
                        SetAt(i, pArrayTemplate.GetAt(i));
                    WriteUnlock();
                    SetStatus(LockAccessStatus::eSuccess);
                }
            }
            return *this;
        }

## Friends And Related Function Documentation

friend class FbxLayerElementUserData `[friend]`

Search for all occurrences

Definition at line 1006 of file fbxlayer.h.

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

- fbxsdk/scene/geometry/fbxlayer.h