This reference page is linked to from the following overview topics: Object Model, FBComponent - The Base Entity Class, FBPlug - Object Connection Management.
Connections Basic Open Reality SDK Element.
Most elements that are available in the SDK inherit from this base class since FBComponent and FBProperty inherit from FBPlug. Basically, all objects can be connected together because they are all "plugs". To simplify the graph, you can think of a "source" connection as a child, and a "destination" connection as a parent. Also, it is correct to assume that a source affect/work on its destination. For example, a shader applyed on an object would be seen as the source while the object is the destination. So FBPlug is a set of functions that enables you to control those connections with flexibility and ease.
#include <fbplug.h>
Public Member Functions |
|
FBPlug (HIObject pObject) | |
Constructor. |
|
virtual | ~FBPlug () |
Destructor. |
|
virtual HIObject | GetHIObject () const |
Return an internal pointer. |
|
virtual bool | SetHIObject (HIObject pObject, bool pSDKComponent) |
Assign component to an internal pointer.
|
|
bool | IsSDKComponent () |
Return whether or not item is an SDK
component. |
|
bool | ConnectSrc (HFBPlug pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a source connection. |
|
bool | ConnectDst (HFBPlug pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a destination connection. |
|
bool | ConnectSrcAt (int pDst_SrcIndex, HFBPlug pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a source connection. |
|
bool | ConnectDstAt (int pSrc_DstIndex, HFBPlug pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
Add a destination connection. |
|
K_DEPRECATED bool | ConnectAt (HFBPlug pSrc, int pSrc_DstIndex, HFBPlug pDst, int pDst_SrcIndex, FBConnectionType pConnectionType=kFBConnectionTypeNone) |
bool | DisconnectDst (HFBPlug pDst) |
Remove a destination connection. |
|
bool | DisconnectSrc (HFBPlug pSrc) |
Remove a source connection. |
|
void | DisconnectAllSrc () |
Remove all source connections. |
|
void | DisconnectAllDst () |
Remove all destination connections. |
|
bool | DisconnectDstAt (int pIndex) |
Remove a destination connection at a
specifyed index. |
|
bool | DisconnectSrcAt (int pIndex) |
Remove a source connection at a specifyed
index. |
|
bool | ReplaceDstAt (int pIndex, HFBPlug pDst) |
Replace a destination connection at a
specifyed index. |
|
bool | ReplaceSrcAt (int pIndex, HFBPlug pSrc) |
Replace a source connection at a specifyed
index. |
|
bool | SwapSrc (int pIndexA, int pIndexB) |
Swap source connection at index A with
source connection at index B. |
|
bool | MoveSrcAt (int pIndex, int pAtIndex) |
Move source connection at pIndex to
pAtIndex. |
|
bool | MoveSrcAt (HFBPlug pSrc, HFBPlug pAtSrc) |
Move source connection pSrc to the position
of pAtSrc. |
|
int | GetSrcCount () |
Get source connection count. |
|
HFBPlug | GetSrc (int pIndex) |
Get a source connection's plug at specifyed
index. |
|
FBConnectionType | GetSrcType (int pIndex) |
Get a source connection's type at specifyed
index. |
|
int | GetDstCount () |
Get destination connection count. |
|
HFBPlug | GetDst (int pIndex) |
Get a destination connection's plug at
specifyed index. |
|
FBConnectionType | GetDstType (int pIndex) |
Get a destination connection's type at
specifyed index. |
|
bool | BeginChange () |
Begins a change on multiple plugs. |
|
void | EndChange () |
Ends a change on multiple plugs. |
|
HFBPlug | GetOwner () |
Get the owner of this plug. |
|
int | GetOwnerCount () |
Get the owner count of this plug. |
|
HFBPlug | GetOwned (int pIndex) |
Get the owned plug at specifyed index.
|
|
int | GetOwnedCount () |
Get the owned plug count. |
|
virtual char * | ClassName () |
internal System vars. |
|
virtual bool | Is (int pTypeId) |
Is( int pTypeId ) |
|
virtual int | GetTypeId () |
GetTypeId( int pTypeId ) |
|
virtual bool | PlugDataNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0) |
PlugDataNotify when overloaded is equivalent
of FBSystem.OnConnectionDataNotify
but in the context of the derived object only. |
|
virtual bool | PlugStateNotify (FBConnectionAction pAction, FBPlug *pThis, void *pData=NULL, void *pDataOld=NULL, int pDataSize=0) |
PlugStateNotify when overloaded is
equivalent of
FBSystem.OnConnectionStateNotify but in the context of the
derived object only. |
|
virtual bool | PlugNotify (FBConnectionAction pAction, FBPlug *pThis, int pIndex, FBPlug *pPlug=NULL, FBConnectionType pConnectionType=kFBConnectionTypeNone, FBPlug *pNewPlug=NULL) |
PlugNotify when overloaded is equivalent of
FBSystem.OnConnectionNotify
but in the context of the derived object only. |
|
IObject_Declare (Implementation) | |
ICallback_Declare (Implementation) | |
Public Attributes |
|
bool | mAllocated |
Contain the Allocation State of the
Component. |
|
Static Public Attributes |
|
static int | TypeInfo |
TypeInfo. |
|
Protected Member Functions |
|
virtual void | FBDelete () |
Actual destructor for a FBPlug. |
|
Static Protected Member Functions |
|
static int | GetInternalClassId () |
Internal class Id. |
|
Protected Attributes |
|
HIObject | mObject |
Handle on the Plug. |
|
bool | mSDKComponent |
bool Plug is an SDK component. |
|
Static Protected Attributes |
|
static int | mGlobalTypeInfo |
Represente the Type Index. |
FBPlug | ( | HIObject | pObject | ) |
Constructor.
virtual ~FBPlug | ( | ) | [virtual] |
Destructor.
virtual HIObject GetHIObject | ( | ) | const [virtual] |
Return an internal pointer.
virtual bool SetHIObject | ( | HIObject | pObject, |
bool | pSDKComponent | ||
) | [virtual] |
bool IsSDKComponent | ( | ) |
Return whether or not item is an SDK component.
bool ConnectSrc | ( | HFBPlug | pSrc, |
FBConnectionType | pConnectionType =
kFBConnectionTypeNone |
||
) |
Add a source connection.
pSrc | Source plug. |
pConnectionType | Type of connection, taken from FBConnectionType. Default value should work in all cases. |
bool ConnectDst | ( | HFBPlug | pDst, |
FBConnectionType | pConnectionType =
kFBConnectionTypeNone |
||
) |
Add a destination connection.
pDst | Destination plug. |
pConnectionType | Type of connection, taken from FBConnectionType. Default value should work in all cases. |
bool ConnectSrcAt | ( | int | pDst_SrcIndex, |
HFBPlug | pSrc, | ||
FBConnectionType | pConnectionType =
kFBConnectionTypeNone |
||
) |
Add a source connection.
pDst_SrcIndex | Index that tells where to add this source connection in the destination's connection list. |
pSrc | Source plug. |
pConnectionType | Type of connection, taken from FBConnectionType. Default value should work in all cases. |
bool ConnectDstAt | ( | int | pSrc_DstIndex, |
HFBPlug | pDst, | ||
FBConnectionType | pConnectionType =
kFBConnectionTypeNone |
||
) |
Add a destination connection.
pSrc_DstIndex | Index that tells where to add this destination connection in the source's connection list. |
pDst | Destination plug. |
pConnectionType | Type of connection, taken from FBConnectionType. Default value should work in all cases. |
K_DEPRECATED bool ConnectAt | ( | HFBPlug | pSrc, |
int | pSrc_DstIndex, | ||
HFBPlug | pDst, | ||
int | pDst_SrcIndex, | ||
FBConnectionType | pConnectionType =
kFBConnectionTypeNone |
||
) |
pSrc | Source plug. |
pSrc_DstIndex | Index that tells where to add this destination connection in the source's connection list. |
pDst | Destination plug. |
pDst_SrcIndex | Index that tells where to add this source connection in the destination's connection list. |
pConnectionType | Type of connection, taken from FBConnectionType. Default value should work in all cases. |
bool DisconnectDst | ( | HFBPlug | pDst | ) |
Remove a destination connection.
pDst | Destination plug. |
bool DisconnectSrc | ( | HFBPlug | pSrc | ) |
Remove a source connection.
pSrc | Source plug. |
void DisconnectAllSrc | ( | ) |
Remove all source connections.
void DisconnectAllDst | ( | ) |
Remove all destination connections.
bool DisconnectDstAt | ( | int | pIndex | ) |
Remove a destination connection at a specifyed index.
pIndex | Destination plug index. |
bool DisconnectSrcAt | ( | int | pIndex | ) |
Remove a source connection at a specifyed index.
pIndex | Source plug index. |
bool ReplaceDstAt | ( | int | pIndex, |
HFBPlug | pDst | ||
) |
Replace a destination connection at a specifyed index.
pIndex | Destination plug index. |
pDst | Plug that will replace the other at index. |
bool ReplaceSrcAt | ( | int | pIndex, |
HFBPlug | pSrc | ||
) |
Replace a source connection at a specifyed index.
pIndex | Source plug index. |
pSrc | Plug that will replace the other at index. |
bool SwapSrc | ( | int | pIndexA, |
int | pIndexB | ||
) |
Swap source connection at index A with source connection at index B.
pIndexA | Plug index. |
pIndexB | Other plug index. |
bool MoveSrcAt | ( | int | pIndex, |
int | pAtIndex | ||
) |
Move source connection at pIndex to pAtIndex.
pIndex | Plug current index. |
pAtIndex | Plug new index. |
bool MoveSrcAt | ( | HFBPlug | pSrc, |
HFBPlug | pAtSrc | ||
) |
Move source connection pSrc to the position of pAtSrc.
pSrc | Plug. |
pAtSrc | Plug that mark where we want to insert (will insert before this one). |
int GetSrcCount | ( | ) |
HFBPlug GetSrc | ( | int | pIndex | ) |
Get a source connection's plug at specifyed index.
pIndex | Index of the source connection's plug. |
FBConnectionType GetSrcType | ( | int | pIndex | ) |
Get a source connection's type at specifyed index.
pIndex | Index of the source connection's type. |
int GetDstCount | ( | ) |
Get destination connection count.
HFBPlug GetDst | ( | int | pIndex | ) |
Get a destination connection's plug at specifyed index.
pIndex | Index of the destination connection's plug. |
FBConnectionType GetDstType | ( | int | pIndex | ) |
Get a destination connection's type at specifyed index.
pIndex | Index of the destination connection's type. |
bool BeginChange | ( | ) |
Begins a change on multiple plugs.
void EndChange | ( | ) |
Ends a change on multiple plugs.
HFBPlug GetOwner | ( | ) |
Get the owner of this plug.
Very useful for properties since they are plugs too.
int GetOwnerCount | ( | ) |
Get the owner count of this plug.
(Obsolete)
HFBPlug GetOwned | ( | int | pIndex | ) |
Get the owned plug at specifyed index.
pIndex | Index of the owned plug to get. |
int GetOwnedCount | ( | ) |
virtual char* ClassName | ( | ) | [virtual] |
virtual bool Is | ( | int | pTypeId | ) | [virtual] |
pTypeId | Type Identifiant. |
Reimplemented in FBComponent, and FBCustomManager.
virtual int GetTypeId | ( | ) | [virtual] |
GetTypeId( int pTypeId )
Reimplemented in FBComponent, and FBCustomManager.
virtual bool PlugDataNotify | ( | FBConnectionAction | pAction, |
FBPlug * | pThis, | ||
void * | pData = NULL , |
||
void * | pDataOld = NULL , |
||
int | pDataSize =
0 |
||
) | [virtual] |
PlugDataNotify when overloaded is equivalent of FBSystem.OnConnectionDataNotify but in the context of the derived object only.
pAction | Plug action, the event type. |
pThis | Plug concerned. |
pData | Current data, meaning depends of plug action. |
pDataOld | Previous data, meaning depends of plug action. |
pDataSize | Size of data. |
virtual bool PlugStateNotify | ( | FBConnectionAction | pAction, |
FBPlug * | pThis, | ||
void * | pData = NULL , |
||
void * | pDataOld = NULL , |
||
int | pDataSize =
0 |
||
) | [virtual] |
PlugStateNotify when overloaded is equivalent of FBSystem.OnConnectionStateNotify but in the context of the derived object only.
pAction | Plug action, the event type. |
pThis | Plug concerned. |
pData | Current data, meaning depends of plug action. |
pDataOld | Previous data, meaning depends of plug action. |
pDataSize | Size of data. |
virtual bool PlugNotify | ( | FBConnectionAction | pAction, |
FBPlug * | pThis, | ||
int | pIndex, | ||
FBPlug * | pPlug = NULL , |
||
FBConnectionType | pConnectionType =
kFBConnectionTypeNone , |
||
FBPlug * | pNewPlug =
NULL |
||
) | [virtual] |
PlugNotify when overloaded is equivalent of FBSystem.OnConnectionNotify but in the context of the derived object only.
pAction | Plug action, the event type. |
pThis | Plug concerned. |
pIndex | Index of the plug. |
pPlug | Other plug concerned. |
pConnectionType | Connection type between the plugs. |
pNewPlug | New plug (for the replace event). |
IObject_Declare | ( | Implementation | ) |
Reimplemented in FBAssetFile, FBAssetFolder, FBAssetMng, FBCharacter, FBActorFace, FBCharacterFace, FBCharacterSolver, FBCommand, FBComponent, FBConstraint, FBConstraintRelation, FBBox, FBDevice, FBDeck, FBSurface, FBProperty, FBShader, FBTriggerGroup, FBTrigger, FBMotionClip, FBTriggerBranch, FBVisualComponent, FBLayout, and FBView.
ICallback_Declare | ( | Implementation | ) |
Reimplemented in FBComponent, FBModel, and FBVisualComponent.
virtual void FBDelete | ( | ) | [protected, virtual] |
Actual destructor for a FBPlug.
It should never be called from client code. This is meant for internal use only!
Reimplemented in FBAudioClip, FBActor, FBCharacter, FBCharacterExtension, FBActorFace, FBCharacterFace, FBComponent, FBFCurve, FBAnimationLayer, FBTake, FBFolder, FBGroup, FBSet, FBImage, FBKeyingGroup, FBModel, FBTexture, FBLayeredTexture, FBMotionClip, FBScene, FBStoryFolder, FBStoryTrack, FBStoryClip, and FBVideoClip.
static int GetInternalClassId | ( | ) | [static, protected] |
int TypeInfo
[static] |
TypeInfo.
Reimplemented in FBComponent, FBCustomManager, FBPropertyBaseComponent< tType >, FBPropertyBaseComponent< HFBPlug >, and FBPropertyBaseComponent< HFBComponent >.
bool mAllocated |
Contain the Allocation State of the Component.
int mGlobalTypeInfo
[static, protected] |
HIObject mObject
[protected] |
bool mSDKComponent
[protected] |