FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxIteratorDstBase Class Reference

#include <fbxobject.h>

Class Description

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

Definition at line 1279 of file fbxobject.h.

+ Inheritance diagram for FbxIteratorDstBase:

Public Member Functions

 FbxIteratorDstBase (FbxProperty &pProperty, FbxClassId pClassId)
 Constructor. More...
 
 FbxIteratorDstBase (FbxObject *pObject, FbxClassId pClassId)
 Constructor. More...
 
FbxObjectGetFirst ()
 Get the first destination object that connects to the property or object. More...
 
FbxObjectGetNext ()
 Get next destination object that connects to the property or object. More...
 
FbxObjectGetSafeNext ()
 Get next destination object that connects to the property or object. More...
 
FbxObjectGetLast ()
 Get the last destination object that connects to the property or object. More...
 
FbxObjectGetPrevious ()
 Get previous destination object that connects to the property or object. More...
 
FbxObjectGetSafePrevious ()
 Get previous destination object that connects to the property or object. More...
 

Protected Member Functions

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

Protected Attributes

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

Constructor & Destructor Documentation

◆ FbxIteratorDstBase() [1/2]

FbxIteratorDstBase ( FbxProperty pProperty,
FbxClassId  pClassId 
)
inline

Constructor.

Parameters
pPropertyProperty object. The iterator will iterate destination objects that connect to it.
pClassIdThe class ID specifies the type of the destination objects.

Definition at line 1297 of file fbxobject.h.

1297  :
1298  mProperty(pProperty),
1299  mClassId(pClassId),
1300  mSize(0),
1301  mIndex(-1)
1302  {
1303  ResetToBegin();
1304  }
void ResetToBegin()
Reset the iterate index to the beginning.
Definition: fbxobject.h:1388
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

◆ FbxIteratorDstBase() [2/2]

FbxIteratorDstBase ( FbxObject pObject,
FbxClassId  pClassId 
)
inline

Constructor.

Parameters
pObjectFBX object. The iterator will iterate source objects that connect to it.
pClassIdThe class ID specifies the type of the source objects.

Definition at line 1311 of file fbxobject.h.

1311  :
1312  mProperty(pObject->RootProperty),
1313  mClassId(pClassId),
1314  mSize(0),
1315  mIndex(-1)
1316  {
1317  ResetToBegin();
1318  }
void ResetToBegin()
Reset the iterate index to the beginning.
Definition: fbxobject.h:1388
FbxProperty RootProperty
The root property that holds all children property for this object.
Definition: fbxobject.h:973
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

Member Function Documentation

◆ GetFirst()

FbxObject* GetFirst ( )
inline

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

Returns
The first destination object.

Definition at line 1324 of file fbxobject.h.

1325  {
1326  ResetToBegin();
1327  return GetNext();
1328  }
void ResetToBegin()
Reset the iterate index to the beginning.
Definition: fbxobject.h:1388
FbxObject * GetNext()
Get next destination object that connects to the property or object.
Definition: fbxobject.h:1334

◆ GetNext()

FbxObject* GetNext ( )
inline

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

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

Definition at line 1334 of file fbxobject.h.

1335  {
1336  mIndex++;
1338  }
#define NULL
Definition: fbxarch.h:210
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxObject * GetDstObject(const int pIndex=0) const
Returns the destination object at the specified index with which this property connects.
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

◆ GetSafeNext()

FbxObject* GetSafeNext ( )
inline

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

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

Definition at line 1345 of file fbxobject.h.

1346  {
1348  return GetNext();
1349  }
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int GetDstObjectCount() const
Returns the number of destination objects with which this property connects.
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxObject * GetNext()
Get next destination object that connects to the property or object.
Definition: fbxobject.h:1334
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

◆ GetLast()

FbxObject* GetLast ( )
inline

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

Returns
The last destination object.

Definition at line 1355 of file fbxobject.h.

1356  {
1357  ResetToEnd();
1358  return GetPrevious();
1359  }
void ResetToEnd()
Reset the iterate index to the end.
Definition: fbxobject.h:1397
FbxObject * GetPrevious()
Get previous destination object that connects to the property or object.
Definition: fbxobject.h:1365

◆ GetPrevious()

FbxObject* GetPrevious ( )
inline

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

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

Definition at line 1365 of file fbxobject.h.

1366  {
1367  mIndex--;
1369  }
#define NULL
Definition: fbxarch.h:210
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxObject * GetDstObject(const int pIndex=0) const
Returns the destination object at the specified index with which this property connects.
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

◆ GetSafePrevious()

FbxObject* GetSafePrevious ( )
inline

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

Returns
The previous destination 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 destination object is returned.

Definition at line 1377 of file fbxobject.h.

1378  {
1380  while (mIndex>mSize) mIndex--;
1381  return GetPrevious();
1382  }
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int GetDstObjectCount() const
Returns the number of destination objects with which this property connects.
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxObject * GetPrevious()
Get previous destination object that connects to the property or object.
Definition: fbxobject.h:1365
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

◆ ResetToBegin()

void ResetToBegin ( )
inlineprotected

Reset the iterate index to the beginning.

Definition at line 1388 of file fbxobject.h.

1389  {
1391  mIndex = -1;
1392  }
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int GetDstObjectCount() const
Returns the number of destination objects with which this property connects.
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

◆ ResetToEnd()

void ResetToEnd ( )
inlineprotected

Reset the iterate index to the end.

Definition at line 1397 of file fbxobject.h.

1398  {
1400  mIndex = mSize;
1401  }
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
int mSize
The number of destination objects whose type is specified by mClassId.
Definition: fbxobject.h:1287
int GetDstObjectCount() const
Returns the number of destination objects with which this property connects.
int mIndex
Iterate index.
Definition: fbxobject.h:1289
FbxProperty mProperty
The property to iterate.
Definition: fbxobject.h:1283
FbxClassId mClassId
The class ID specifies the type of the destination objects to be retrieved.
Definition: fbxobject.h:1285

Member Data Documentation

◆ mProperty

FbxProperty mProperty
protected

The property to iterate.

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

Definition at line 1283 of file fbxobject.h.

◆ mClassId

FbxClassId mClassId
protected

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

Definition at line 1285 of file fbxobject.h.

◆ mSize

int mSize
protected

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

Definition at line 1287 of file fbxobject.h.

◆ mIndex

int mIndex
protected

Iterate index.

Definition at line 1289 of file fbxobject.h.


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