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

#include <fbxobject.h>

Class Description

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

Definition at line 1095 of file fbxobject.h.

+ Inheritance diagram for FbxIteratorSrcBase:

Public Member Functions

 FbxIteratorSrcBase (FbxProperty &pProperty, FbxClassId pClassId)
 Constructor. More...
 
 FbxIteratorSrcBase (FbxObject *pObject, FbxClassId pClassId)
 Constructor. More...
 
FbxObjectGetFirst ()
 Get the first source object that connects to the property or object. More...
 
FbxObjectGetNext ()
 Get next source object that connects to the property or object. More...
 
FbxObjectGetSafeNext ()
 Get next source object that connects to the property or object. More...
 
FbxObjectGetLast ()
 Get the last source object that connects to the property or object. More...
 
FbxObjectGetPrevious ()
 Get previous source object that connects to the property or object. More...
 
FbxObjectGetSafePrevious ()
 Get previous source 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
 
FbxClassId mClassId
 The property to iterate. If iterate an object, this is the root property of the object. More...
 
int mSize
 The class ID specifies the type of the source objects to be retrieved. More...
 
int mIndex
 The number of source objects whose type is specified by mClassId. More...
 

Constructor & Destructor Documentation

◆ FbxIteratorSrcBase() [1/2]

FbxIteratorSrcBase ( FbxProperty pProperty,
FbxClassId  pClassId 
)
inline

Constructor.

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

Definition at line 1103 of file fbxobject.h.

1103  :
1104  mProperty(pProperty),
1105  mClassId(pClassId),
1106  mSize(0),
1107  mIndex(-1)
1108  {
1109  ResetToBegin();
1110  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxProperty mProperty
Definition: fbxobject.h:1209
void ResetToBegin()
Reset the iterate index to the beginning.
Definition: fbxobject.h:1194

◆ FbxIteratorSrcBase() [2/2]

FbxIteratorSrcBase ( 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 1117 of file fbxobject.h.

1117  :
1118  mProperty(pObject->RootProperty),
1119  mClassId(pClassId),
1120  mSize(0),
1121  mIndex(-1)
1122  {
1123  ResetToBegin();
1124  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxProperty mProperty
Definition: fbxobject.h:1209
void ResetToBegin()
Reset the iterate index to the beginning.
Definition: fbxobject.h:1194
FbxProperty RootProperty
The root property that holds all children property for this object.
Definition: fbxobject.h:973

Member Function Documentation

◆ GetFirst()

FbxObject* GetFirst ( )
inline

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

Returns
The first source object.

Definition at line 1130 of file fbxobject.h.

1131  {
1132  ResetToBegin();
1133  return GetNext();
1134  }
void ResetToBegin()
Reset the iterate index to the beginning.
Definition: fbxobject.h:1194
FbxObject * GetNext()
Get next source object that connects to the property or object.
Definition: fbxobject.h:1140

◆ 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.

Definition at line 1140 of file fbxobject.h.

1141  {
1142  mIndex++;
1144  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxObject * GetSrcObject(const int pIndex=0) const
Returns the source object at the specified index with which this property connects.
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
#define NULL
Definition: fbxarch.h:210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxProperty mProperty
Definition: fbxobject.h:1209
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...

◆ GetSafeNext()

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.

Definition at line 1151 of file fbxobject.h.

1152  {
1154  return GetNext();
1155  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
FbxProperty mProperty
Definition: fbxobject.h:1209
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...
FbxObject * GetNext()
Get next source object that connects to the property or object.
Definition: fbxobject.h:1140
int GetSrcObjectCount() const
Returns the number of source objects with which this property connects.

◆ GetLast()

FbxObject* GetLast ( )
inline

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

Returns
The last source object.

Definition at line 1161 of file fbxobject.h.

1162  {
1163  ResetToEnd();
1164  return GetPrevious();
1165  }
FbxObject * GetPrevious()
Get previous source object that connects to the property or object.
Definition: fbxobject.h:1171
void ResetToEnd()
Reset the iterate index to the end.
Definition: fbxobject.h:1203

◆ 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.

Definition at line 1171 of file fbxobject.h.

1172  {
1173  mIndex--;
1175  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxObject * GetSrcObject(const int pIndex=0) const
Returns the source object at the specified index with which this property connects.
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
#define NULL
Definition: fbxarch.h:210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxProperty mProperty
Definition: fbxobject.h:1209
static FbxCriteria ObjectType(const FbxClassId &pClassId)
Creates a new query criteria that only selects objects which have a specific class ID or derive from ...

◆ GetSafePrevious()

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.

Definition at line 1183 of file fbxobject.h.

1184  {
1186  while (mIndex>mSize) mIndex--;
1187  return GetPrevious();
1188  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxObject * GetPrevious()
Get previous source object that connects to the property or object.
Definition: fbxobject.h:1171
FbxProperty mProperty
Definition: fbxobject.h:1209
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 GetSrcObjectCount() const
Returns the number of source objects with which this property connects.

◆ ResetToBegin()

void ResetToBegin ( )
inlineprotected

Reset the iterate index to the beginning.

Definition at line 1194 of file fbxobject.h.

1195  {
1197  mIndex = -1;
1198  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxProperty mProperty
Definition: fbxobject.h:1209
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 GetSrcObjectCount() const
Returns the number of source objects with which this property connects.

◆ ResetToEnd()

void ResetToEnd ( )
inlineprotected

Reset the iterate index to the end.

Definition at line 1203 of file fbxobject.h.

1204  {
1206  mIndex = mSize;
1207  }
int mSize
The class ID specifies the type of the source objects to be retrieved.
Definition: fbxobject.h:1211
FbxClassId mClassId
The property to iterate. If iterate an object, this is the root property of the object.
Definition: fbxobject.h:1210
int mIndex
The number of source objects whose type is specified by mClassId.
Definition: fbxobject.h:1212
FbxProperty mProperty
Definition: fbxobject.h:1209
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 GetSrcObjectCount() const
Returns the number of source objects with which this property connects.

Member Data Documentation

◆ mProperty

FbxProperty mProperty
protected

Definition at line 1209 of file fbxobject.h.

◆ mClassId

FbxClassId mClassId
protected

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

Definition at line 1210 of file fbxobject.h.

◆ mSize

int mSize
protected

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

Definition at line 1211 of file fbxobject.h.

◆ mIndex

int mIndex
protected

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

Definition at line 1212 of file fbxobject.h.


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