Public Member Functions | Protected Member Functions | Protected Attributes

FbxIteratorSrcBase Class Reference

Search for all occurrences

Detailed Description

A utility class for iterating over source objects that connect to property (FbxProperty) or object (FbxObject).

Definition at line 1224 of file fbxobject.h.

#include <fbxobject.h>

Inheritance diagram for FbxIteratorSrcBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FbxIteratorSrcBase (FbxProperty &pProperty, FbxClassId pClassId)
  Constructor.
  FbxIteratorSrcBase (FbxObject *pObject, FbxClassId pClassId)
  Constructor.
FbxObject GetFirst ()
  Get the first source object that connects to the property or object.
FbxObject GetNext ()
  Get next source object that connects to the property or object.
FbxObject GetSafeNext ()
  Get next source object that connects to the property or object.
FbxObject GetLast ()
  Get the last source object that connects to the property or object.
FbxObject GetPrevious ()
  Get previous source object that connects to the property or object.
FbxObject GetSafePrevious ()
  Get previous source object that connects to the property or object.

Protected Member Functions

void  ResetToBegin ()
  Reset the iterate index to the beginning.
void  ResetToEnd ()
  Reset the iterate index to the end.

Protected Attributes

FbxProperty  mProperty
  The property to iterate.
FbxClassId  mClassId
  The class ID specifies the type of the source objects to be retrieved.
int  mSize
  The number of source objects whose type is specified by mClassId.
int  mIndex
  Iterate index.

Constructor & Destructor Documentation

FbxIteratorSrcBase ( FbxProperty pProperty,
FbxClassId  pClassId 
) [inline]

Constructor.

Parameters:
pProperty Property object. The iterator will iterate source objects that connect to it.
pClassId The class ID specifies the type of the source objects.

Definition at line 1241 of file fbxobject.h.

                                                                          :
        mProperty(pProperty),
        mClassId(pClassId),
        mSize(0),
        mIndex(-1)
    {
        ResetToBegin();
    }
FbxIteratorSrcBase ( FbxObject pObject,
FbxClassId  pClassId 
) [inline]

Constructor.

Parameters:
pObject FBX object. The iterator will iterate source objects that connect to it.
pClassId The class ID specifies the type of the source objects.

Definition at line 1255 of file fbxobject.h.

                                                                      :
        mProperty(pObject->RootProperty),
        mClassId(pClassId),
        mSize(0),
        mIndex(-1)
    {
        ResetToBegin();
    }

Member Function Documentation

FbxObject* GetFirst ( ) [inline]

Get the first source object that connects to the property or object.

Returns:
The first source object.

Reimplemented in FbxIteratorSrc< Type >.

Definition at line 1268 of file fbxobject.h.

    {
        ResetToBegin();
        return GetNext();
    }
FbxObject* GetNext ( ) [inline]

Get next source object that connects to the property or object.

Returns:
The next source object. If there are no more objects, return NULL.

Reimplemented in FbxIteratorSrc< Type >.

Definition at line 1278 of file fbxobject.h.

    {
        mIndex++;
        return ((mIndex>=0) && (mIndex<mSize)) ? mProperty.GetSrcObject(mClassId,mIndex) : NULL;
    }
FbxObject* GetSafeNext ( ) [inline]

Get next source object that connects to the property or object.

Returns:
The next source object. If there are no more objects, return NULL.
Remarks:
This method makes sure the iterate index is not out of bounds.

Reimplemented in FbxIteratorSrc< Type >.

Definition at line 1289 of file fbxobject.h.

FbxObject* GetLast ( ) [inline]

Get the last source object that connects to the property or object.

Returns:
The last source object.

Reimplemented in FbxIteratorSrc< Type >.

Definition at line 1299 of file fbxobject.h.

    {
        ResetToEnd();
        return GetPrevious();
    }
FbxObject* GetPrevious ( ) [inline]

Get previous source object that connects to the property or object.

Returns:
The previous source object. If there are no more objects, return NULL.

Reimplemented in FbxIteratorSrc< Type >.

Definition at line 1309 of file fbxobject.h.

    {
        mIndex--;
        return ((mIndex>=0) && (mIndex<mSize)) ? mProperty.GetSrcObject(mClassId,mIndex) : NULL;
    }
FbxObject* GetSafePrevious ( ) [inline]

Get previous source object that connects to the property or object.

Returns:
The previous source object. If there are no more objects, return NULL.
Remarks:
This method makes sure the iterate index is not out of bounds. If the iterate index is out of bounds, the last source object is returned.

Reimplemented in FbxIteratorSrc< Type >.

Definition at line 1321 of file fbxobject.h.

void ResetToBegin ( ) [inline, protected]

Reset the iterate index to the beginning.

Definition at line 1334 of file fbxobject.h.

void ResetToEnd ( ) [inline, protected]

Reset the iterate index to the end.

Definition at line 1343 of file fbxobject.h.


Member Data Documentation

FbxProperty mProperty [protected]

The property to iterate.

If iterate an object, this is the root property of the object.

Definition at line 1228 of file fbxobject.h.

FbxClassId mClassId [protected]

The class ID specifies the type of the source objects to be retrieved.

Definition at line 1230 of file fbxobject.h.

int mSize [protected]

The number of source objects whose type is specified by mClassId.

Definition at line 1232 of file fbxobject.h.

int mIndex [protected]

Iterate index.

Definition at line 1234 of file fbxobject.h.


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

FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase
FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase FbxIteratorSrcBase