Contains the basic classes that most SDK objects will derive from. These classes form the base of many functionalities of the SDK. The file also contains the base macros used in the definition/registration of the SDK classes.
Definition in file fbcomponent.h.
#include <kaydaradef.h>
#include <fbsdk/fblibrary.h>
#include <fbsdk/fbplug.h>
#include <fbsdk/fbarray.h>
#include <fbsdk/fbstring.h>
#include <fbsdk/fbproperties.h>
Go to the source code of this file.
Classes |
|
class | FBPropertyListComponentBase |
PropertyList: Component. More... |
|
class | FBPropertyListComponent |
PropertyList: Concrete class for
PropertyList of component More... |
|
class | FBPropertyListObject |
List of scene objects. More... |
|
class | FBComponent |
MotionBuilder SDK base class. More... |
|
class | FBEvent |
Base Event class. More... |
|
class | FBEventConnectionNotify |
Connection notify event class. More... |
|
class | FBEventConnectionDataNotify |
Connection notify event class. More... |
|
class | FBEventConnectionStateNotify |
Connection notify event class. More... |
|
class | FBLibraryBase |
Library class for DLL registration. More... |
|
class | FBLibrary |
Library class for DLL registration. More... |
|
class | FBCustomManager |
Custom manager class for user controlled
observer objects. More... |
|
Defines |
|
#define | FBSDK_DLL K_DLLIMPORT |
Be sure that FBSDK_DLL is defined only once.
|
|
#define | FB_DEFAULT_SDK_ICON "openreality_noicon.tif" |
Define SDK icon filename. |
|
#define | __FBClassInit mLocalPtr = NULL; |
For internal use only. |
|
#define | __FBClassInitSDKComponent(pObjectToWrappedIsAllocated) |
For internal use onlyL decide if we need to
delete the corresponding KObject. |
|
#define | __FBClassImplementation(ThisComponent, pInternalClassId) |
For internal use only. |
|
#define | __FBClassDeclare(Name, Parent) |
For internal use only. |
|
#define | FBStorableClassImplementation(ClassName, Type) |
Storable Class implementation. |
|
#define | FBElementClassImplementation(ClassName, IconFileName) |
Element Class implementation. |
|
#define | FBStorableClassDeclare(Name, Parent) |
Storable Class declaration. |
|
#define | FBPropertyInitComponent(Param, Type, PropName, Get, Set) |
Initialize a property: component. |
|
#define | FBIS(Component, ComponentType) ((Component) && (Component)->Is( ComponentType::TypeInfo )) |
Macro to verify the type of a component.
|
|
#define | FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/unregistration. |
|
#define | FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/unregistration. |
|
#define | FBRegisterObject(LocalId, Path, Name, Description, Constructor, IsMultipleAllowed, IconFilename) static int __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) |
Event registration/unregistration. |
|
#define | FBDeclareUserObject(ClassName) |
Event registration/unregistration. |
|
#define | FBLibraryDeclare(LibName) |
Declare the library for the application.
|
|
#define | FBLibraryModule(Name) void FBModule##Name() |
FBLibraryModule Define a module registration
call. |
|
#define | FBLibraryRegister(ClassName) |
FBLibraryRegister Declare the module's
registration functions. |
|
#define | FBLibraryRegisterStorable(ClassName) |
FBLibraryRegisterStorable Declare the
module's registration functions for storable classes. |
|
#define | FBLibraryRegisterElement(ClassName) |
FBLibraryRegisterElement Declare the
module's registration functions for element classes. |
|
#define | FBLibraryDeclareEnd |
Finish library declaration. |
|
#define | FBCustomManagerImplementation(ThisComponent) FBClassImplementation( ThisComponent ) \ |
FBCustomManagerImplementation. |
|
#define | FBRegisterCustomManager(ClassName) |
FBRegisterCustomManager. |
|
#define | FBCustomManagerDeclare(ClassName) |
FBRegisterCustomDeclare. |
|
Typedefs |
|
typedef FBArrayTemplate < FBComponent * > |
FBComponentList |
typedef FBArrayTemplate<FBComponent*>
FBComponentList; |
|
typedef HIRegister | HISender |
HISender. |
|
typedef HKEventBase | HKEvent |
HKEvent. |
|
typedef void(ICallback::* | FBCallback )(HISender pSender, HKEvent pEvent) |
FBCallback. |
|
typedef FBComponent | FBObject |
Equivalent to FBComponent for gradual
transition. |
|
Enumerations |
|
enum | FBObjectFlag
{ kFBFlagSelectable = (1 << 0), kFBFlagDeletable = (1 << 1), kFBFlagSavable = (1 << 2), kFBFlagVisible = (1 << 3), kFBFlagClonable = (1 << 4), kFBFlagSystem = (1 << 5), kFBFlagNewable = (1 << 6), kFBFlagRenamable = (1 << 7), kFBFlagMergeable = (1 << 8), kFBFlagBrowsable = (1 << 9), kFBFlagDetachable = (1 << 10), kFBFlagUndoable = (1 << 11), kFBFlagKeyable = (1 << 12), kFBFlagAllocated = (1 << 13), kFBFlagStory = (1 << 14), kFBFlagStorable6 = (1 << 15), kFBFlagStorableData6 = (1 << 16), kFBFlagStorableBlindData = (1 << 17), kFBFlagUniqueName = (1 << 18) } |
Available flags for any component. More... |
|
enum | FBObjectStatus
{ kFBStatusNone = 0, kFBStatusCreating = (1 << 0), kFBStatusStoring = (1 << 1), kFBStatusRetrieving = (1 << 2), kFBStatusMerging = (1 << 3), kFBStatusDestroying = (1 << 4), kFBStatusOwnedByUndo = (1 << 5) } |
Available lifetime status for any component.
More... |
|
enum | FBNamespaceAction
{ kFBConcatNamespace, kFBReplaceNamespace, kFBRemoveAllNamespace } |
Namespace flags. More... |
|
Functions |
|
K_DLLIMPORT FBComponent * | GetFBComponent (const HIObject Object) |
Get a handle to the FBComponent belonging to an
HIObject. |
|
K_DLLIMPORT FBVisualComponent * |
FBGetFBVisualComponent (HIKtView pObject, bool pAutoCreate=true) |
Get the FBComponent from an Internal
Object. |
|
K_DLLIMPORT FBComponent * | FBGetFBComponent (HIObject pObject, bool pAutoCreate=true) |
Get the FBComponent from an Internal
Object. |
|
K_DLLIMPORT FBPlug * | FBGetFBPlug (HIObject pObject, bool pAutoCreate=true) |
Get the FBPlug from an
Internal Object. |
|
K_DLLIMPORT FBArrayTemplate < FBComponent * > & |
FBGetComponentArray () |
Get the Root FBComponent. |
|
K_DLLIMPORT FBComponent * | FBCreateObject (char *pGroupName, char *pEntryName, char *pName, void *pData=NULL, int nth=0) |
FBCreateObject. |
|
bool | FBUnregisterObject (char *pGroupName, char *pEntryName, int nth=0) |
FBUnregisterObject. |
#define __FBClassDeclare | ( | Name, | |||
Parent | ) |
For internal use only.
Definition at line 117 of file fbcomponent.h.
#define __FBClassImplementation | ( | ThisComponent, | |||
pInternalClassId | ) |
Value:
int ThisComponent::TypeInfo=FBPlug::mGlobalTypeInfo++; \ int ThisComponent::mInternalClassId=pInternalClassId
Definition at line 110 of file fbcomponent.h.
#define __FBClassInit mLocalPtr = NULL; |
For internal use only.
Definition at line 96 of file fbcomponent.h.
#define __FBClassInitSDKComponent | ( | pObjectToWrappedIsAllocated | ) |
Value:
__FBClassInit; \ mSDKComponent = pObjectToWrappedIsAllocated;
Definition at line 102 of file fbcomponent.h.
#define FB_DEFAULT_SDK_ICON "openreality_noicon.tif" |
Define SDK icon filename.
Definition at line 90 of file fbcomponent.h.
#define FBCustomManagerDeclare | ( | ClassName | ) |
Value:
FBClassDeclare( ClassName, FBCustomManager ); \ public: \ ClassName() : FBCustomManager() { FBClassInit; } \ private: \
ClassName | Class to declare registration functions for. |
Definition at line 1009 of file fbcomponent.h.
#define FBCustomManagerImplementation | ( | ThisComponent | ) | FBClassImplementation( ThisComponent ) \ |
FBCustomManagerImplementation.
ThisComponent | Component to customize |
Definition at line 992 of file fbcomponent.h.
#define FBDeclareUserObject | ( | ClassName | ) |
Value:
public:\ static int ClassId;\ virtual int GetUserClassId();\ virtual char* FbxGetObjectSubType()
For internal use only.
Definition at line 302 of file fbcomponent.h.
#define FBElementClassImplementation | ( | ClassName, | |||
IconFileName | ) |
Value:
HIObject RegisterElement##ClassName##Create(HIObject /*pOwner*/, char* pName, void* /*pData*/){\ ClassName* Class = new ClassName(pName);\ Class->mAllocated = true;\ if( Class->FBCreate() ){\ return Class->GetHIObject();\ } else {\ delete Class;\ return NULL;}}\ FBLibraryModule(ClassName##Element){\ FBRegisterObject(ClassName##R2, "Browsing/Templates/Elements", #ClassName, "", RegisterElement##ClassName##Create, true, IconFileName);}
This should be placed in the source code file for a class.
Definition at line 158 of file fbcomponent.h.
#define FBIS | ( | Component, | |||
ComponentType | ) | ((Component) && (Component)->Is( ComponentType::TypeInfo )) |
Macro to verify the type of a component.
Used to compare a component to another, by verifying their Class::TypeInfo values.
Component | Component to verify. | |
ComponentType | Type to verify Component with. |
Definition at line 202 of file fbcomponent.h.
#define FBLibraryDeclare | ( | LibName | ) |
Value:
static FBLibrary LibName##GlobalFBLibrary; \ extern "C" { \ K_DLLEXPORT bool LIBRARY_INIT(HIError /*Error*/) \ { \ FB_EXT_INIT( LibName ); if (LibName##GlobalFBLibrary.LibInit()) return true; return false; \ } \ } \ FB_DLL_INIT( LibName, Operation ) \ { \ switch( Operation ) \ { \ case kFBDllLoad: \ {
Creates the FBLibrary object and generic interface functions for DLL access.
Definition at line 932 of file fbcomponent.h.
#define FBLibraryDeclareEnd |
Value:
} \ break; \ default: \ break; \ } \ }
Definition at line 979 of file fbcomponent.h.
#define FBLibraryModule | ( | Name | ) | void FBModule##Name() |
FBLibraryModule Define a module registration call.
Name | Module to register. |
Definition at line 951 of file fbcomponent.h.
#define FBLibraryRegister | ( | ClassName | ) |
Value:
extern void FBModule##ClassName( ); \ FBModule##ClassName( );
ClassName | Class to declare registration functions for. |
Definition at line 958 of file fbcomponent.h.
#define FBLibraryRegisterElement | ( | ClassName | ) |
Value:
extern void FBModule##ClassName##Element( ); \ FBModule##ClassName##Element( );
ClassName | Class to declare registration functions for. |
Definition at line 974 of file fbcomponent.h.
#define FBLibraryRegisterStorable | ( | ClassName | ) |
Value:
extern void FBModule##ClassName##Storable( ); \ FBModule##ClassName##Storable( );
ClassName | Class to declare registration functions for. |
Definition at line 966 of file fbcomponent.h.
#define FBPropertyInitComponent | ( | Param, | |||
Type, | |||||
PropName, | |||||
Get, | |||||
Set | ) |
Value:
{ \ PropertyAdd(PropName.Init( (void *)Param,#PropName,(H##Type (*)(void *))Get,(void (*)(void *,H##Type))Set )); \ PropName.TypeInfo = &Type::TypeInfo; \ }
Param | Owner name. | |
Type | Type of variable. | |
PropName | Component name. | |
Get | Get function pointer. | |
Set | Set function pointer. |
Definition at line 189 of file fbcomponent.h.
#define FBRegisterCustomManager | ( | ClassName | ) |
Value:
FBLibraryModule( ClassName ) \ { \ static ClassName g##ClassName; \ g##ClassName.FBCreate(); \ g##ClassName.RegisterManager(); \ } \
ClassName | Class to declare registration functions for. |
Definition at line 998 of file fbcomponent.h.
#define FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/unregistration.
For internal use only.
Definition at line 257 of file fbcomponent.h.
#define FBRegisterObject | ( | LocalId, | |||
Path, | |||||
Name, | |||||
Description, | |||||
Constructor, | |||||
IsMultipleAllowed, | |||||
IconFilename | ) | static int __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) |
Event registration/unregistration.
For internal use only.
Definition at line 285 of file fbcomponent.h.
#define FBSDK_DLL K_DLLIMPORT |
#define FBStorableClassDeclare | ( | Name, | |||
Parent | ) |
Value:
FBClassDeclare(Name, Parent);\ public:\ virtual char* FbxGetObjectSubType();
Overloads the necessary functions when a class inherits from FBComponent (or its derivatives) and that you want it to be persistent.
Name | Name of class to declare. | |
Parent | Parent class to associate with Name. |
Definition at line 176 of file fbcomponent.h.
#define FBStorableClassImplementation | ( | ClassName, | |||
Type | ) |
Value:
char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\ HIObject RegisterStorable##ClassName##Create(HIObject /*pOwner*/, char* pName, void* /*pData*/){\ ClassName* Class = new ClassName(pName);\ Class->mAllocated = true;\ if( Class->FBCreate() ){\ return Class->GetHIObject();\ } else {\ delete Class;\ return NULL;}}\ FBLibraryModule(ClassName##Storable){\ FBString lGroup = "FbxStorable/";\ lGroup += #Type;\ FBRegisterObject(ClassName##R2, lGroup, #ClassName, "", RegisterStorable##ClassName##Create, true, NULL);}
This should be placed in the source code file for a class.
Definition at line 140 of file fbcomponent.h.
#define FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc ); |
Event registration/unregistration.
For internal use only.
Definition at line 262 of file fbcomponent.h.
typedef void(ICallback::* FBCallback)(HISender pSender, HKEvent pEvent) |
FBCallback.
pSender | Set the sender | |
pEvent | Set the event |
Definition at line 295 of file fbcomponent.h.
typedef FBArrayTemplate<FBComponent*> FBComponentList |
typedef FBArrayTemplate<FBComponent*> FBComponentList;
Definition at line 244 of file fbcomponent.h.
typedef FBComponent FBObject |
Equivalent to FBComponent for gradual transition.
Definition at line 736 of file fbcomponent.h.
typedef HIRegister HISender |
HISender.
Definition at line 288 of file fbcomponent.h.
typedef HKEventBase HKEvent |
HKEvent.
Definition at line 290 of file fbcomponent.h.
enum FBNamespaceAction |
Namespace flags.
kFBConcatNamespace | Use to add a namespace name to object. |
kFBReplaceNamespace | Use to replace a define namespace. |
kFBRemoveAllNamespace | Remove all the namespace name. |
Definition at line 367 of file fbcomponent.h.
enum FBObjectFlag |
Available flags for any component.
Definition at line 330 of file fbcomponent.h.
enum FBObjectStatus |
Available lifetime status for any component.
Definition at line 356 of file fbcomponent.h.
K_DLLIMPORT FBComponent* FBCreateObject | ( | char * | pGroupName, | |
char * | pEntryName, | |||
char * | pName, | |||
void * | pData = NULL , |
|||
int | nth = 0 |
|||
) |
FBCreateObject.
pGroupName | Set the name of the Group. | |
pEntryName | Set the name of the Entry. | |
pName | Set the name of the Object to create. | |
pData | Data to pass to object creator function. | |
nth | Set the occurence of the object to remove. |
K_DLLIMPORT FBArrayTemplate<FBComponent*>& FBGetComponentArray | ( | ) |
Get the Root FBComponent.
K_DLLIMPORT FBComponent* FBGetFBComponent | ( | HIObject | pObject, | |
bool | pAutoCreate = true |
|||
) |
Get the FBComponent from an Internal Object.
pObject | Object to get SDK object for. | |
pAutoCreate | Create object if it doesn't exist? (default is true) |
K_DLLIMPORT FBPlug* FBGetFBPlug | ( | HIObject | pObject, | |
bool | pAutoCreate = true |
|||
) |
Get the FBPlug from an Internal Object.
pObject | Object to get SDK object for. | |
pAutoCreate | Create object if it doesn't exist? (default is true) |
K_DLLIMPORT FBVisualComponent* FBGetFBVisualComponent | ( | HIKtView | pObject, | |
bool | pAutoCreate = true |
|||
) |
Get the FBComponent from an Internal Object.
pObject | Object to get SDK object for. | |
pAutoCreate | Create object if it doesn't exist? (default is true) |
bool FBUnregisterObject | ( | char * | pGroupName, | |
char * | pEntryName, | |||
int | nth = 0 |
|||
) | [inline] |
FBUnregisterObject.
pGroupName | Set the Name of the Group from which unregister an object. | |
pEntryName | Set the name of the Object to unregister. | |
nth | Set the occurence of the object to remove. |
Definition at line 280 of file fbcomponent.h.
K_DLLIMPORT FBComponent* GetFBComponent | ( | const HIObject | Object | ) |
Get a handle to the FBComponent belonging to an HIObject.
This will not create the internal SDK object, and will return NULL if the SDK object has not been initialized.
Object | Internal object for which the FBComponent is required. |