FBPlug Class Reference
 
 
 
FBPlug Class Reference

#include <fbplug.h>


Class Description

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

Definition at line 198 of file fbplug.h.

Inheritance diagram for FBPlug:
FBWrapperHolder FBComponent FBProperty FBActionManager FBActorFace FBAMMenu FBAnimationLayer FBAnimationNode FBApplication FBApplyManagerRule FBAssetItem FBAssetMng FBAudioClip FBAudioIn FBAudioOut FBBox FBCharacterManipulator FBCharacterMarkerSet FBCluster FBCommand FBCommPort FBConsole FBConsoleChannel FBConstraintManager FBConstructionHistory FBContainer FBControlSet FBCustomManager FBDeck FBDeformer FBDeviceInstrument FBDeviceOpticalMarker FBDeviceSyncPacket FBEvaluateManager FBFbxObject FBFbxOptions FBFCurve FBFileMonitoringManager FBFilter FBFolder FBGenericMenu FBGenericMenuItem FBGeometry FBImage FBJLCooper FBKernel FBKeyControl FBKeyingGroup FBLogger FBManipulator FBMarkerSet FBMenuManager FBModelOpticalAdvanced FBModelTemplate FBModelVertexData FBMotionClip FBMotionClip FBNamespace FBOGLContextWrapper FBOpticalGap FBOpticalSegment FBPlayerControl FBPointCacheFile FBPointCacheManager FBPose FBProfiler FBPropertyViewManager FBReferenceTime FBRenderer FBRendererCallback FBRigidBody FBScene FBSpreadPart FBStory FBStoryClip FBStoryFolder FBSyncReference FBSystem FBTake FBTCPIP FBTimeWarpManager FBTreeNode FBTrigger FBTriggerBranch FBTriggerGroup FBTriggerManager FBVideoGrabber FBVisualComponent FBPropertyAnimatable FBPropertyBase< tType, pPT > FBPropertyBase< bool, kFBPT_Action > FBPropertyBase< const char *, kFBPT_charptr > FBPropertyBase< tType, kFBPT_enum > FBPropertyBase< tType, kFBPT_object > FBPropertyBasicList FBPropertyEvent FBPropertyStringList

Public Member Functions

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 (FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone)
  Add a source connection.
bool  ConnectDst (FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
  Add a destination connection.
bool  ConnectSrcAt (int pDst_SrcIndex, FBPlug *pSrc, FBConnectionType pConnectionType=kFBConnectionTypeNone)
  Add a source connection.
bool  ConnectDstAt (int pSrc_DstIndex, FBPlug *pDst, FBConnectionType pConnectionType=kFBConnectionTypeNone)
  Add a destination connection.
bool  DisconnectDst (FBPlug *pDst)
  Remove a destination connection.
bool  DisconnectSrc (FBPlug *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 specified index.
bool  DisconnectSrcAt (int pIndex)
  Remove a source connection at a specified index.
bool  ReplaceDstAt (int pIndex, FBPlug *pDst)
  Replace a destination connection at a specified index.
bool  ReplaceSrcAt (int pIndex, FBPlug *pSrc)
  Replace a source connection at a specified 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 (FBPlug *pSrc, FBPlug *pAtSrc)
  Move source connection pSrc to the position of pAtSrc.
int  GetSrcCount ()
  Get source connection count.
FBPlug GetSrc (int pIndex)
  Get a source connection's plug at specified index.
FBConnectionType  GetSrcType (int pIndex)
  Get a source connection's type at specified index.
int  GetDstCount ()
  Get destination connection count.
FBPlug GetDst (int pIndex)
  Get a destination connection's plug at specified index.
FBConnectionType  GetDstType (int pIndex)
  Get a destination connection's type at specified index.
bool  BeginChange ()
  Begins a change on multiple plugs.
void  EndChange ()
  Ends a change on multiple plugs.
void  SetSelfModified (FBPlugModificationFlag pFlag, bool pBool)
  Set the plug's self modification flag.
bool  GetSelfModified (FBPlugModificationFlag pFlag)
  Tell if the plug's self has changed.
void  SetContentModified (FBPlugModificationFlag pFlag, bool pBool)
  Set the plug's owned property/object's modification flag.
bool  GetContentModified (FBPlugModificationFlag pFlag)
  Tell if the plug's content has changed.
int  GetPlugConnectionModifiedList (FBPlugList &pPlugList, FBPlugModificationFlag pConnectionModificatonFlag, bool pAddRemove)
  Get plug's modified src/dst property/object connection added/removed List.
bool  RevertModification (FBPlugModificationFlag pFlag=kFBAllModifiedMask)
  Revert the plug's modification to original status.
void  SetStatusFlag (FBPlugStatusFlag pStatus, bool pValue)
  Set the plug's status flag.
bool  GetStatusFlag (FBPlugStatusFlag pStatus) const
  Tell if the plug's status has changed.
FBPlug GetOwner ()
  Get the owner of this plug.
FBPlug GetOwned (int pIndex)
  Get the owned plug at specified index.
int  GetOwnedCount ()
  Get the owned plug count.
virtual const 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 (K_IMPLEMENTATION)
  ICallback_Declare (K_IMPLEMENTATION)
FBScriptWrapper GetWrapper ()
  Return the wrapper interface of this FBObject.
void  AddWrapper (FBScriptWrapper *)
void  RemoveWrapper (FBScriptWrapper *)

Static Public Member Functions

static void  PrintClassDefinitions ()
  Print out internal Class (ID) Definition table.

Public Attributes

bool  mAllocated
  Contain the Allocation State of the Component.

Static Public Attributes

static const char *  ClassGroupName
  ClassGroupName of the object.
static int  TypeInfo
  TypeInfo.

Protected Member Functions

  FBPlug (HIObject pObject)
  ! Constructor Internal use only.
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.

Friends

K_DLLIMPORT friend int  __FBRegisterTypeInfo (int pInternalClassId)
  __FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id.

Constructor & Destructor Documentation

FBPlug::FBPlug ( HIObject  pObject ) [protected]

! Constructor Internal use only.

User code shouldn't instantiate FBPlug directly.

virtual FBPlug::~FBPlug ( ) [virtual]

Destructor.


Member Function Documentation

virtual HIObject FBPlug::GetHIObject ( ) const [virtual]

Return an internal pointer.

virtual bool FBPlug::SetHIObject ( HIObject  pObject,
bool  pSDKComponent 
) [virtual]

Assign component to an internal pointer.

Reimplemented in FBComponent.

bool FBPlug::IsSDKComponent ( )

Return whether or not item is an SDK component.

bool FBPlug::ConnectSrc ( FBPlug pSrc,
FBConnectionType  pConnectionType = kFBConnectionTypeNone 
)

Add a source connection.

Parameters:
pSrc Source plug.
pConnectionType Type of connection, taken from FBConnectionType. Default value should work in all cases.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::ConnectDst ( FBPlug pDst,
FBConnectionType  pConnectionType = kFBConnectionTypeNone 
)

Add a destination connection.

Parameters:
pDst Destination plug.
pConnectionType Type of connection, taken from FBConnectionType. Default value should work in all cases.
Returns:
A boolean indicating success (True) or failure (False)
bool FBPlug::ConnectSrcAt ( int  pDst_SrcIndex,
FBPlug pSrc,
FBConnectionType  pConnectionType = kFBConnectionTypeNone 
)

Add a source connection.

Parameters:
pDst_SrcIndex Index that tells where to add this source connection in the destination's connection list. if index is out of bound, and this source connection will be appended at the end.
pSrc Source plug.
pConnectionType Type of connection, taken from FBConnectionType. Default value should work in all cases.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::ConnectDstAt ( int  pSrc_DstIndex,
FBPlug pDst,
FBConnectionType  pConnectionType = kFBConnectionTypeNone 
)

Add a destination connection.

Parameters:
pSrc_DstIndex Index that tells where to add this destination connection in the source's connection list. if index is out of bound, and this destination connection will be appended at the end.
pDst Destination plug.
pConnectionType Type of connection, taken from FBConnectionType. Default value should work in all cases.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::DisconnectDst ( FBPlug pDst )

Remove a destination connection.

Parameters:
pDst Destination plug.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::DisconnectSrc ( FBPlug pSrc )

Remove a source connection.

Parameters:
pSrc Source plug.
Returns:
A boolean indicating success (True) or failure (False).
void FBPlug::DisconnectAllSrc ( )

Remove all source connections.

void FBPlug::DisconnectAllDst ( )

Remove all destination connections.

bool FBPlug::DisconnectDstAt ( int  pIndex )

Remove a destination connection at a specified index.

Parameters:
pIndex Destination plug index.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::DisconnectSrcAt ( int  pIndex )

Remove a source connection at a specified index.

Parameters:
pIndex Source plug index.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::ReplaceDstAt ( int  pIndex,
FBPlug pDst 
)

Replace a destination connection at a specified index.

Parameters:
pIndex Destination plug index.
pDst Plug that will replace the other at index.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::ReplaceSrcAt ( int  pIndex,
FBPlug pSrc 
)

Replace a source connection at a specified index.

Parameters:
pIndex Source plug index.
pSrc Plug that will replace the other at index.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::SwapSrc ( int  pIndexA,
int  pIndexB 
)

Swap source connection at index A with source connection at index B.

Parameters:
pIndexA Plug index.
pIndexB Other plug index.
Returns:
A boolean indicating success (True) or failure (False).
bool FBPlug::MoveSrcAt ( int  pIndex,
int  pAtIndex 
)

Move source connection at pIndex to pAtIndex.

Parameters:
pIndex Plug current index.
pAtIndex Plug new index.
Returns:
A boolean indicating success (True) or failure (False).
Remarks:
This is not like the swap function since the connection at pAtIndex is untouched.
bool FBPlug::MoveSrcAt ( FBPlug pSrc,
FBPlug pAtSrc 
)

Move source connection pSrc to the position of pAtSrc.

Parameters:
pSrc Plug.
pAtSrc Plug that mark where we want to insert (will insert before this one).
Returns:
A boolean indicating success (True) or failure (False).
Remarks:
This is not like the swap function since the connection at pAtSrc is untouched.
int FBPlug::GetSrcCount ( )

Get source connection count.

Returns:
Total sources connections count.
FBPlug* FBPlug::GetSrc ( int  pIndex )

Get a source connection's plug at specified index.

Parameters:
pIndex Index of the source connection's plug.
Returns:
Source plug at specified index.
FBConnectionType FBPlug::GetSrcType ( int  pIndex )

Get a source connection's type at specified index.

Parameters:
pIndex Index of the source connection's type.
Returns:
Source connection's type at specified index.
int FBPlug::GetDstCount ( )

Get destination connection count.

Returns:
Total destinations connections count.
FBPlug* FBPlug::GetDst ( int  pIndex )

Get a destination connection's plug at specified index.

Parameters:
pIndex Index of the destination connection's plug.
Returns:
Destination plug at specified index.
FBConnectionType FBPlug::GetDstType ( int  pIndex )

Get a destination connection's type at specified index.

Parameters:
pIndex Index of the destination connection's type.
Returns:
Destination connection's type at specified index.
bool FBPlug::BeginChange ( )

Begins a change on multiple plugs.

Returns:
A boolean indicating success (True) or failure (False).
void FBPlug::EndChange ( )

Ends a change on multiple plugs.

void FBPlug::SetSelfModified ( FBPlugModificationFlag  pFlag,
bool  pBool 
)

Set the plug's self modification flag.

Parameters:
pFlag bitwise AND of self modification flags.
pBool true if self changed.
bool FBPlug::GetSelfModified ( FBPlugModificationFlag  pFlag )

Tell if the plug's self has changed.

Parameters:
pFlag bitwise AND of self modification flags.
Returns:
true if self changed
void FBPlug::SetContentModified ( FBPlugModificationFlag  pFlag,
bool  pBool 
)

Set the plug's owned property/object's modification flag.

Parameters:
pFlag bitwise AND of content modification flags.
pBool true if content has modification.
bool FBPlug::GetContentModified ( FBPlugModificationFlag  pFlag )

Tell if the plug's content has changed.

Parameters:
pFlag bitwise AND of content modification flags.
Returns:
true if content connection changed.
int FBPlug::GetPlugConnectionModifiedList ( FBPlugList pPlugList,
FBPlugModificationFlag  pConnectionModificatonFlag,
bool  pAddRemove 
)

Get plug's modified src/dst property/object connection added/removed List.

Parameters:
pPlugList plug list to fill up.
pConnectionModificatonFlag Src/Dst Property/Object connection modification flag.
pAddRemove Ask for the added list if true, removed list if false.
Returns:
count of list;
bool FBPlug::RevertModification ( FBPlugModificationFlag  pFlag = kFBAllModifiedMask )

Revert the plug's modification to original status.

Parameters:
pFlag the type of modification to be reverted.
Returns:
true if revert successfully.
void FBPlug::SetStatusFlag ( FBPlugStatusFlag  pStatus,
bool  pValue 
)

Set the plug's status flag.

Parameters:
pStatus bitwise AND of status flags.
pValue true if status has modification.
bool FBPlug::GetStatusFlag ( FBPlugStatusFlag  pStatus ) const

Tell if the plug's status has changed.

Parameters:
pStatus bitwise AND of self modification flags.
Returns:
true if self changed
FBPlug* FBPlug::GetOwner ( )

Get the owner of this plug.

Very useful for properties since they are plugs too.

Returns:
The owner of this plug.
FBPlug* FBPlug::GetOwned ( int  pIndex )

Get the owned plug at specified index.

Parameters:
pIndex Index of the owned plug to get.
Returns:
The owned plug at specified index.
int FBPlug::GetOwnedCount ( )

Get the owned plug count.

Returns:
The owned plug count.
virtual const char* FBPlug::ClassName ( ) [virtual]

internal System vars.

Reimplemented in FBComponent, and FBCustomManager.

virtual bool FBPlug::Is ( int  pTypeId ) [virtual]

Is( int pTypeId )

Parameters:
pTypeId Type Identification.
Returns:
True if Plug is a Instance of pTypeId.

Reimplemented in FBComponent, and FBCustomManager.

virtual int FBPlug::GetTypeId ( ) [virtual]

GetTypeId( int pTypeId )

Returns:
The TypeInfo of the object

Reimplemented in FBComponent, and FBCustomManager.

virtual bool FBPlug::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.

Parameters:
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.
Returns:
unused should return true
virtual bool FBPlug::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.

Parameters:
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.
Returns:
unused should return true except in the case of property rename kFBRename
virtual bool FBPlug::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.

Parameters:
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).
Returns:
should by default return true except in the case of connection requests (kFBRequestConnectSrc or kFBRequestConnectDst)
FBPlug::ICallback_Declare ( K_IMPLEMENTATION  )
static void FBPlug::PrintClassDefinitions ( ) [static]

Print out internal Class (ID) Definition table.

For internal debug purpose only.

virtual void FBPlug::FBDelete ( ) [protected, virtual]
static int FBPlug::GetInternalClassId ( ) [static, protected]

Internal class Id.

Reimplemented in FBComponent, and FBCustomManager.

FBScriptWrapper* FBWrapperHolder::GetWrapper ( ) [inherited]

Return the wrapper interface of this FBObject.

void FBWrapperHolder::AddWrapper ( FBScriptWrapper ) [inherited]
void FBWrapperHolder::RemoveWrapper ( FBScriptWrapper ) [inherited]

Friends And Related Function Documentation

K_DLLIMPORT friend int __FBRegisterTypeInfo ( int  pInternalClassId ) [friend]

__FBRegisterTypeInfo For internal use only, Register the TypeInfo mapped to internal class id.


Member Data Documentation

const char* FBPlug::ClassGroupName [static]

ClassGroupName of the object.

Definition at line 444 of file fbplug.h.

Contain the Allocation State of the Component.

Definition at line 450 of file fbplug.h.

int FBPlug::mGlobalTypeInfo [static, protected]

Represente the Type Index.

Definition at line 500 of file fbplug.h.

HIObject FBPlug::mObject [protected]

Handle on the Plug.

Definition at line 502 of file fbplug.h.

bool FBPlug::mSDKComponent [protected]

bool Plug is an SDK component.

Definition at line 503 of file fbplug.h.


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