00001 #ifndef __FBBASE_H__
00002 #define __FBBASE_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00047 #include <kaydaradef.h>
00048
00049
00050
00051 #include <fbsdk/fblibrary.h>
00052
00053 #ifndef FBSDK_DLL
00054
00057 #define FBSDK_DLL K_DLLIMPORT
00058 #endif
00059
00060
00061 #include <fbsdk/fbplug.h>
00062 #include <fbsdk/fbarray.h>
00063 #include <fbsdk/fbstring.h>
00064 #include <fbsdk/fbproperties.h>
00065
00066 #ifdef _MSC_VER
00067 #pragma warning (disable: 4275) // 'int' : forcing value to bool 'true' or 'false' (performance warning)
00068 #pragma warning (disable: 4661) // no suitable definition provided for explicit template instantiation request
00069 #endif
00070
00071 K_FORWARD( IRegister );
00072 K_FORWARD( IError );
00073 K_FORWARD( IStore );
00074 K_FORWARD( IKtView );
00075 K_FORWARD( KEventBase );
00076 K_FORWARD( KGlobalNamedEvent );
00077
00078 #ifdef FBSDKUseNamespace
00079 namespace FBSDKNamespace {
00080 #endif
00081
00082 #ifndef FBINCLUDE
00083
00084 #else
00085 #endif
00086
00089 #define FB_DEFAULT_SDK_ICON "openreality_noicon.png"
00090
00091
00095 #define __FBClassInit mLocalPtr = NULL;
00096
00097
00101 #define __FBClassInitSDKComponent( pObjectToWrappedIsAllocated ) \
00102 __FBClassInit; \
00103 mSDKComponent = pObjectToWrappedIsAllocated;
00104
00105
00109 #define __FBClassImplementation( ThisComponent,pInternalClassId ) \
00110 int ThisComponent::TypeInfo=__FBRegisterTypeInfo(pInternalClassId);\
00111 int ThisComponent::GetInternalClassId() { return pInternalClassId; }
00112
00113 #define __FBClassImplementationGroup( ThisComponent, pInternalClass ) \
00114 __FBClassImplementation( ThisComponent,pInternalClass::ClassId )\
00115 const char* ThisComponent::ClassGroupName = pInternalClass::ClassGroupName;
00116
00117
00122 FBSDK_DLL int __FBRegisterTypeInfo(int pInternalClassId);
00123
00128 FBSDK_DLL int __FBGetInternalClassId(int pTypeInfo);
00129
00134 FBSDK_DLL FBPlug* __FBObjectCreatorSub(HIObject pObject);
00135
00139 #define __FBClassDeclare( Name,Parent ) \
00140 friend FBSDK_DLL FBPlug* __FBObjectCreatorSub(HIObject pObject);\
00141 public: \
00142 \
00145 typedef Parent __FBParentClass;\
00146 \
00149 typedef Name __FBClassType;\
00150 \
00153 virtual const char* ClassName() override { return #Name; } \
00154 \
00158 virtual bool Is( int pTypeId ) override { return (pTypeId==TypeInfo) ? true : Parent::Is( pTypeId ); } \
00159 virtual int GetTypeId() override { return TypeInfo; } \
00160 \
00163 static int GetInternalClassId(); \
00164 \
00167 Data##Name* mLocalPtr; \
00168 virtual ~Name(); \
00169 static int TypeInfo; \
00170 \
00171 private:
00172
00176 #define __FBClassDeclareGroup( Name,Parent ) \
00177 __FBClassDeclare( Name,Parent )\
00178 public:\
00179 static const char* ClassGroupName; \
00180 \
00181 private:
00182
00183 FBSDK_DLL void __FBAddModelToScene( HIObject pObject );
00184 FBSDK_DLL void __FBRemoveModelFromScene( HIObject pObject );
00185
00189 #define FBStorableClassImplementation(ClassName, Type)\
00190 const char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\
00191 HIObject RegisterStorable##ClassName##Create(HIObject , const char* pName, void* ){\
00192 ClassName* Class = new ClassName(pName);\
00193 Class->mAllocated = true;\
00194 if( Class->FBCreate() ){\
00195 __FBRemoveModelFromScene( Class->GetHIObject() ); \
00196 return Class->GetHIObject();\
00197 } else {\
00198 delete Class;\
00199 return NULL;}}\
00200 FBLibraryModule(ClassName##Storable){\
00201 FBString lGroup = "FbxStorable/";\
00202 lGroup += #Type;\
00203 FBRegisterObject(ClassName##R2, lGroup, #ClassName, "", RegisterStorable##ClassName##Create, true, NULL);}
00204
00208 #define FBElementClassImplementation(ClassName,IconFileName)\
00209 HIObject RegisterElement##ClassName##Create(HIObject , const char* pName, void* ){\
00210 ClassName* Class = new ClassName(pName);\
00211 Class->mAllocated = true;\
00212 if( Class->FBCreate() ){\
00213 __FBRemoveModelFromScene( Class->GetHIObject() ); \
00214 return Class->GetHIObject();\
00215 } else {\
00216 delete Class;\
00217 return NULL;}}\
00218 FBLibraryModule(ClassName##Element){\
00219 FBRegisterObject(ClassName##R2, "Browsing/Templates/Elements", #ClassName, "", RegisterElement##ClassName##Create, true, IconFileName);}
00220
00224 #define FBShadingElementClassImplementation(ClassName,IconFileName)\
00225 HIObject RegisterShadingElement##ClassName##Create(HIObject , const char* pName, void* ){\
00226 ClassName* Class = new ClassName(pName);\
00227 Class->mAllocated = true;\
00228 if( Class->FBCreate() ){\
00229 return Class->GetHIObject();\
00230 } else {\
00231 delete Class;\
00232 return NULL;}}\
00233 FBLibraryModule(ClassName##ShadingElement){\
00234 FBRegisterObject(ClassName##R2, "Browsing/Templates/Shading Elements", #ClassName, "", RegisterShadingElement##ClassName##Create, true, IconFileName);}
00235
00242 #define FBStorableClassDeclare(Name, Parent)\
00243 FBClassDeclare(Name, Parent);\
00244 public:\
00245 virtual const char* FbxGetObjectSubType() override; \
00246 \
00247 private: \
00248
00249
00257 #define FBPropertyInitComponent( Param,Type,PropName,Get,Set ) \
00258 { \
00259 PropertyAdd(PropName.Init( (void *)Param,#PropName,(Type* (*)(void *))Get,(void (*)(void *,Type*))Set )); \
00260 PropName.TypeInfo = &Type::TypeInfo; \
00261 }
00262
00270 #define FBIS( Component,ComponentType ) \
00271 ((Component) && (Component)->Is( ComponentType::TypeInfo ))
00272
00274
00276
00277 __FB_FORWARD( FBComponent );
00278 __FB_FORWARD( FBVisualComponent );
00279
00286 FBSDK_DLL FBComponent* GetFBComponent( const HIObject Object );
00287
00288 #if !defined(K_NO_UI)
00289
00294 FBSDK_DLL FBVisualComponent* FBGetFBVisualComponent( HIKtView pObject,bool pAutoCreate=true );
00295 #endif
00296
00302 FBSDK_DLL FBComponent* FBGetFBComponent( HIObject pObject, bool pAutoCreate=true );
00303
00309 FBSDK_DLL FBPlug* FBGetFBPlug( HIObject pObject, bool pAutoCreate=true );
00310
00312 typedef FBArrayTemplate<FBComponent*> FBComponentList;
00315 FBSDK_DLL FBArrayTemplate<FBComponent*>& FBGetComponentArray();
00316
00318
00320
00325 #define FBRegisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Register ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
00326
00330 #define FBUnregisterEvent ( Object, EventId, EventProc ) IQ( Object,IRegister)->Unregister ( EventId,(HICallback)this,(kICallbackHandler)EventProc );
00331
00336 FBSDK_DLL void FBSetStoreableCustomModelRegistered();
00337 FBSDK_DLL bool FBGetStoreableCustomModelRegistered();
00338
00343 FBSDK_DLL void FBSetStoreableCustomMaterialRegistered();
00344 FBSDK_DLL bool FBGetStoreableCustomMaterialRegistered();
00345
00346 FBSDK_DLL bool FBObject_Register ( const char * pGroupName,const char * pEntryName,const char * pDescription, kObjectCreatorFnc pCreatorFnc, bool pIsMultipleAllowed,const char * pIconFilename);
00347 FBSDK_DLL bool FBObject_Unregister( const char * pGroupName,const char * pEntryName, int nth=0 );
00348
00356 FBSDK_DLL FBComponent* FBCreateObject( const char* pGroupName, const char* pEntryName, const char* pName, void* pData = NULL, int nth = 0 );
00357
00363 inline bool FBUnregisterObject( const char * pGroupName, const char * pEntryName, int nth=0 ) { return FBObject_Unregister( pGroupName,pEntryName,nth ); }
00368 #define FBRegisterObject( LocalId,Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename ) \
00369 static int __R##LocalId = FBObject_Register( Path,Name,Description,Constructor,IsMultipleAllowed,IconFilename )
00370
00371 typedef HIRegister HISender;
00373 typedef HKEventBase HKEvent;
00378 typedef void (ICallback::*FBCallback)(HISender pSender,HKEvent pEvent);
00379
00380 FBSDK_DLL int FBRegister_ClassId(const char* pClassName);
00385 #define FBDeclareUserObject(ClassName)\
00386 public:\
00387 static int ClassId;\
00388 virtual int GetUserClassId();\
00389 virtual const char* FbxGetObjectSubType() override;\
00390 \
00391 private:
00392
00394
00396 #ifdef new
00397
00400 #define RENEW new
00401 #undef new
00402 #endif
00403
00405
00407 FB_FORWARD( FBPropertyListComponent );
00408 __FB_FORWARD( FBComponent );
00409 FB_DEFINE_LIST( FBSDK_DLL, Component );
00410
00411 FB_FORWARD( FBFolder );
00412 FB_DEFINE_COMPONENT( FBSDK_DLL, Folder );
00413
00415 enum FBObjectFlag
00416 {
00417 kFBFlagSelectable = (1 << 0),
00418 kFBFlagDeletable = (1 << 1),
00419 kFBFlagSavable = (1 << 2),
00420 kFBFlagVisible = (1 << 3),
00421 kFBFlagClonable = (1 << 4),
00422 kFBFlagSystem = (1 << 5),
00423 kFBFlagNewable = (1 << 6),
00424 kFBFlagRenamable = (1 << 7),
00425 kFBFlagMergeable = (1 << 8),
00426 kFBFlagBrowsable = (1 << 9),
00427 kFBFlagParentable = (1 << 10),
00428 kFBFlagDetachable = (1 << 11),
00429 kFBFlagUndoable = (1 << 12),
00430 kFBFlagUndoableSeparately = (1 << 13),
00431 kFBFlagKeyable = (1 << 14),
00432 kFBFlagAllocated = (1 << 15),
00433 kFBFlagStory = (1 << 16),
00434 kFBFlagStorable6 = (1 << 17),
00435 kFBFlagStorableData6 = (1 << 18),
00436 kFBFlagStorableBlindData = (1 << 19),
00437 kFBFlagStorableBlindDataForceBinary = (1 << 20),
00438 kFBFlagUniqueName = (1 << 21),
00439 kFBFlagNotSelectableNameSpace = (1 << 22),
00440 kFBFlagNamespaceEditable = (1 << 23),
00441 kFBFlagCustomObject = (1 << 24)
00442 };
00443
00445 enum FBObjectStatus {
00446 kFBStatusNone = 0,
00447 kFBStatusCreating = (1 << 0),
00448 kFBStatusStoring = (1 << 1),
00449 kFBStatusRetrieving = (1 << 2),
00450 kFBStatusMerging = (1 << 3),
00451 kFBStatusDestroying = (1 << 4),
00452 kFBStatusOwnedByUndo= (1 << 5)
00453 };
00454
00456 enum FBNamespaceAction
00457 {
00458 kFBConcatNamespace,
00459 kFBReplaceNamespace,
00460 kFBRemoveAllNamespace
00461 };
00462
00463 FB_DEFINE_ENUM(FBSDK_DLL, ConnectionType);
00464 FB_DEFINE_ENUM(FBSDK_DLL, ConnectionAction);
00465 FB_DEFINE_ENUM(FBSDK_DLL, ObjectFlag);
00466
00469 class FBSDK_DLL FBPropertyListComponentBase : public FBPropertyBasicList
00470 {
00471 protected:
00473 int mClassId;
00475 bool mParents;
00476 public:
00478 FBPropertyListComponentBase();
00483 virtual int Add( FBComponent* pItem );
00487 virtual void RemoveAt( int pIndex );
00492 virtual FBComponent* GetAt(int pIndex)=0;
00497 FBComponent* operator[](int pIndex);
00501 virtual int GetCount();
00502
00507 virtual int Find( FBComponent* pItem );
00508
00513 virtual int Remove( FBComponent* pItem );
00514
00515
00516 void SetClassId( int pClassId );
00517 int GetClassId( );
00518 void SetListOfParents( bool pListOfParents );
00519 bool GetIsListOfParents();
00520
00524 virtual FBPropertyType GetPropertyType( ) override { return kFBPT_object; }
00525 };
00528 class FBSDK_DLL FBPropertyListComponent : public FBPropertyListComponentBase
00529 {
00530 public:
00535 virtual FBComponent* GetAt(int pIndex);
00536 };
00537
00539
00541
00542 FB_FORWARD( FBPropertyListObject );
00543
00548 class FBSDK_DLL FBPropertyListObject : public FBPropertyListComponent
00549 {
00550 public:
00552 FBPropertyListObject();
00553
00557 virtual int GetCount();
00558
00560
00564 virtual FBComponent* operator[]( int pIndex );
00565 virtual FBComponent* GetAt( int pIndex );
00567
00572 virtual int Add( FBComponent* pObject );
00573
00579 virtual int SetAt(int pIndex, FBComponent* pObject);
00580
00584 virtual void RemoveAt( int pIndex );
00585
00591 virtual int InsertAt(int pIndex, FBComponent* pObject);
00592
00595 virtual void Clear();
00596
00600 virtual void SetSingleConnect(bool pSingleConnect);
00601
00605 virtual int GetSingleConnect();
00606
00610 void SetFilter(int pInternalClassId);
00611
00615 int GetFilter();
00616
00617 private:
00619
00623 FBPropertyListObject( const FBPropertyListObject& );
00624 const FBPropertyListObject& operator =( const FBPropertyListObject& );
00626 };
00627
00628 __FB_FORWARD( FBNamespace );
00629
00642 class FBSDK_DLL FBComponent : public FBPlug
00643 {
00644 public:
00645 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00646
00647 HDataFBComponent mLocalPtr;
00648 protected:
00650 FBString mName;
00651 #endif
00652
00653 public:
00655 static int TypeInfo;
00656
00660 static int GetInternalClassId();
00661
00665 FBComponent( HIObject pObject );
00666
00668 virtual ~FBComponent();
00669
00673 virtual bool FBCreate();
00674
00676 virtual void FBDestroy();
00677
00679 virtual void FBDelete() override;
00680
00682 virtual bool SetHIObject(HIObject pObject, bool pSDKComponent) override;
00683
00688 virtual int PropertyAdd( FBProperty* pProperty );
00689
00694 bool PropertyAddReferenceProperty( FBProperty* pReferenceProperty );
00695
00700 void PropertyRemove( FBProperty* pProperty );
00701
00706 void PropertyGetModifiedList(FBArrayTemplate<FBProperty*>& pPropList, FBPlugModificationFlag pModificationFlags);
00707
00716 FBProperty* PropertyCreate( const char* pName, FBPropertyType pType, const char * pDataType, bool pAnimatable, bool pIsUser = false, FBProperty* pReferenceSource = NULL );
00717
00721 FBObjectFlag GetObjectFlags();
00722
00726 void SetObjectFlags(FBObjectFlag pFlags);
00727
00732 bool HasObjectFlags(FBObjectFlag pFlags);
00733
00737 void EnableObjectFlags(FBObjectFlag pFlags);
00738
00742 void DisableObjectFlags(FBObjectFlag pFlags);
00743
00748 void SetObjectStatus(FBObjectStatus pStatus, bool pValue);
00749
00753 bool GetObjectStatus(FBObjectStatus pStatus);
00754
00763 void ProcessNamespaceHierarchy( FBNamespaceAction pNamespaceAction, const char* pNamespaceName, const char* pReplaceTo=NULL, bool pAddRight=true );
00764
00769 void ProcessObjectNamespace ( FBNamespaceAction pNamespaceAction, const char* pNamespaceName, const char* pReplaceTo=NULL, bool pAddRight=true );
00770
00774 virtual const char* ClassName() override;
00775
00779 const char* GetFullName( void );
00780
00783 void SetOwnerNamespace(HFBNamespace pOwnerNSObj);
00784
00788 HFBNamespace GetOwnerNamespace( void );
00789
00790
00794 void HardSelect();
00795
00796 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00797
00798
00799 void *operator new( size_t stAllocateBlock );
00800 void operator delete( void *pvMem );
00801
00802 void *operator new( size_t stAllocateBlock, int blockType, const char *filename, int linenumber );
00803 #if _MSC_VER >= 1200
00804 void operator delete( void *pvMem, int blockType, const char *filename, int linenumber );
00805 #endif
00806
00807
00809
00810 void RegisterPropertyEvent(FBPropertyEvent* pPropertyEvent);
00811 void UnregisterPropertyEvent(FBPropertyEvent* pPropertyEvent);
00812 void InvalidatePropertyEventsParents();
00814 #endif
00815
00816 FBPropertyManager PropertyList;
00817 FBPropertyListComponent Components;
00818 FBPropertyListComponent Parents;
00819 FBPropertyBool Selected;
00820 FBPropertyString Name;
00821 FBPropertyString LongName;
00822
00823 #if !defined(K_NO_FOLDER)
00824 FBPropertyFolder Folder;
00825 #endif
00826
00827 public:
00828 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00829 IObject_Declare(Implementation);
00830 ICallback_Declare(Implementation);
00831 #endif
00832
00837 virtual bool Is( int pTypeId );
00838 virtual int GetTypeId();
00839
00840 static void FBComponentSetName( FBComponent* pObject, const char *pName );
00841 static const char* FBComponentGetName( FBComponent* pObject );
00842
00843 static void FBComponentSetLongName( FBComponent* pObject, const char *pName );
00844 static const char* FBComponentGetLongName( FBComponent* pObject );
00845
00846 public:
00847 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00848
00849 KObject* mDummyObject;
00850 void KObjectEvent(HIRegister pView, HKEventBase pEvent);
00851 #endif
00852 };
00853
00855 typedef FBComponent FBObject;
00856
00857 #ifdef RENEW
00858 #define new new( _NORMAL_BLOCK, __FILE__, __LINE__)
00859 #undef RENEW
00860 #endif
00861
00863
00865 __FB_FORWARD( FBEvent );
00866
00870 class FBSDK_DLL FBEvent
00871 {
00872 public:
00878 FBEvent( HKEvent pEvent );
00879
00880 FBPropertyInt Type;
00881 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00882 protected:
00884 HKEventBase mEvent;
00885 public:
00887 void PropertyAdd( FBProperty* ) {};
00888 #endif
00889 };
00890
00892
00894 __FB_FORWARD( FBEventConnectionNotify );
00895
00897 class FBSDK_DLL FBEventConnectionNotify : public FBEvent
00898 {
00899 public:
00903 FBEventConnectionNotify(HKEventBase pEvent);
00904
00905 FBPropertyConnectionAction Action;
00906 FBPropertyInt SrcIndex;
00907 FBPropertyConnectionType ConnectionType;
00908 FBPropertyPlug SrcPlug;
00909 FBPropertyPlug DstPlug;
00910 FBPropertyPlug NewPlug;
00911 };
00912
00914
00916 __FB_FORWARD( FBEventConnectionDataNotify );
00917
00919 class FBSDK_DLL FBEventConnectionDataNotify : public FBEvent
00920 {
00921 public:
00925 FBEventConnectionDataNotify(HKEventBase pEvent);
00926
00927 FBPropertyConnectionAction Action;
00928 FBPropertyPlug Plug;
00929 void* GetData();
00930 void* GetOldData();
00931 };
00932
00934
00936 __FB_FORWARD( FBEventConnectionStateNotify );
00937
00939 class FBSDK_DLL FBEventConnectionStateNotify : public FBEvent
00940 {
00941 public:
00945 FBEventConnectionStateNotify(HKEventBase pEvent);
00946
00947 FBPropertyConnectionAction Action;
00948 FBPropertyPlug Plug;
00949 void* GetData();
00950 void* GetOldData();
00951 };
00952
00954
00956 __FB_FORWARD( FBEventConnectionKeyingNotify );
00957
00958 class FBSDK_DLL FBEventConnectionKeyingNotify : public FBEvent
00959 {
00960 public:
00964 FBEventConnectionKeyingNotify(HKEventBase pEvent);
00965
00971 FBConnectionAction GetAction( void );
00972
00978 FBPlug* GetPlug( void );
00984 FBPlug* GetProperty( void );
00990 void* GetData( void );
00991 };
00992
00993
00995
00997
01001 class FBSDK_DLL FBLibraryBase : public ICallback
01002 {
01003 public:
01004 FBLibraryBase();
01005 virtual ~FBLibraryBase();
01006 IObject_Declare(Implementation);
01007 ICallback_Declare(Implementation);
01008
01013 virtual bool LibInit();
01014
01019 virtual bool LibOpen();
01020
01026 virtual bool LibReady();
01027
01031 virtual bool LibClose();
01032
01036 virtual bool LibRelease();
01038 KGlobalNamedEvent *mLibrary_Open,
01039 *mLibrary_Ready,
01040 *mLibrary_Close,
01041 *mLibrary_Release;
01042
01043 void Library_OpenHandler(HIRegister pCaller,HKEventBase pEvent);
01044 void Library_ReadyHandler(HIRegister pCaller,HKEventBase pEvent);
01045 void Library_CloseHandler(HIRegister pCaller,HKEventBase pEvent);
01046 void Library_ReleaseHandler(HIRegister pCaller,HKEventBase pEvent);
01047 };
01048
01050
01052
01056 class FBLibrary : public FBLibraryBase
01057 {
01058 public:
01063 virtual bool LibInit();
01064
01069 virtual bool LibOpen();
01070
01076 virtual bool LibReady();
01077
01081 virtual bool LibClose();
01082
01086 virtual bool LibRelease();
01087 };
01088
01092 #if defined(K_NODLL)
01093 #define FBLibraryDeclare( LibName ) \
01094 FB_DLL_INIT( LibName, Operation ) \
01095 { \
01096 switch( Operation ) \
01097 { \
01098 case kFBDllLoad: \
01099 { \
01100
01101 #else
01102 #define FBLibraryDeclare( LibName ) \
01103 static FBLibrary LibName##GlobalFBLibrary; \
01104 extern "C" { \
01105 K_DLLEXPORT bool LIBRARY_INIT(HIError ) \
01106 { \
01107 FB_EXT_INIT( LibName ); if (LibName##GlobalFBLibrary.LibInit()) return true; return false; \
01108 } \
01109 } \
01110 FB_DLL_INIT( LibName, Operation ) \
01111 { \
01112 switch( Operation ) \
01113 { \
01114 case kFBDllLoad: \
01115 {
01116 #endif
01117
01122 #define FBLibraryModule(Name) \
01123 void FBModule##Name()
01124
01129 #define FBLibraryRegister( ClassName ) \
01130 extern void FBModule##ClassName( ); \
01131 FBModule##ClassName( );
01132
01137 #define FBLibraryRegisterStorable( ClassName ) \
01138 extern void FBModule##ClassName##Storable( ); \
01139 FBModule##ClassName##Storable( );
01140
01145 #define FBLibraryRegisterElement( ClassName ) \
01146 extern void FBModule##ClassName##Element( ); \
01147 FBModule##ClassName##Element( );
01148
01153 #define FBLibraryRegisterShadingElement( ClassName ) \
01154 extern void FBModule##ClassName##ShadingElement( ); \
01155 FBModule##ClassName##ShadingElement( );
01156
01158 #define FBLibraryDeclareEnd \
01159 } \
01160 break; \
01161 default: \
01162 break; \
01163 } \
01164 }
01165
01166
01167
01171 #define FBCustomManagerImplementation( ThisComponent ) \
01172 FBClassImplementation( ThisComponent ) \
01173
01174
01177 #define FBRegisterCustomManager( ClassName ) \
01178 FBLibraryModule( ClassName ) \
01179 { \
01180 static ClassName g##ClassName; \
01181 g##ClassName.FBCreate(); \
01182 g##ClassName.RegisterManager(); \
01183 } \
01184
01185
01188 #define FBCustomManagerDeclare( ClassName ) \
01189 FBClassDeclare( ClassName, FBCustomManager ); \
01190 public: \
01191 ClassName() : FBCustomManager() { FBClassInit; } \
01192 \
01193 private:
01194
01195
01197
01199
01200 __FB_FORWARD( FBCustomManager );
01201
01214 class FBSDK_DLL FBCustomManager : public FBComponent {
01215 __FBClassDeclare( FBCustomManager, FBComponent );
01216 public:
01219 FBCustomManager();
01220
01225 void RegisterManager();
01226
01230 virtual bool FBCreate();
01231
01238 virtual bool Init() ;
01239
01245 virtual bool Open() ;
01246
01251 virtual bool Clear() ;
01252
01256 virtual bool Close() ;
01257
01258 };
01259
01260
01261 #ifdef FBSDKUseNamespace
01262 }
01263 #endif
01264
01265 #endif