Open Reality Reference Guide
 
Loading...
Searching...
No Matches
fbuserobject.h
1#ifndef __FBUSEROBJECT_H__
2#define __FBUSEROBJECT_H__
3/**************************************************************************
4 Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5 All Rights Reserved.
6
7 The coded instructions, statements, computer programs, and/or related
8 material (collectively the "Data") in these files contain unpublished
9 information proprietary to Autodesk, Inc. and/or its licensors, which is
10 protected by Canada and United States of America federal copyright law
11 and by international treaties.
12
13 The Data may not be disclosed or distributed to third parties, in whole
14 or in part, without the prior written consent of Autodesk, Inc.
15 ("Autodesk").
16
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24 FREE.
25
26 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36
37**************************************************************************/
38
39#include <kaydaradef.h>
40#ifndef FBSDK_DLL
44 #define FBSDK_DLL K_DLLIMPORT
45#endif
46
47#include <fbsdk/fbcomponent.h>
48#include <fbsdk/fbcore.h>
49
50#ifdef FBSDKUseNamespace
51 namespace FBSDKNamespace {
52#endif
53
56
58//FBUserObject Register
60#define FBUserObjectImplement(ClassName, Description, IconFilename)\
61 HIObject RegisterUserObject##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
62 ClassName* Class = new ClassName(pName);\
63 Class->mAllocated = true;\
64 if( Class->FBCreate() ){\
65 return Class->GetHIObject();\
66 } else {\
67 delete Class;\
68 return NULL;}}\
69 FBLibraryModule(ClassName){\
70 FBRegisterObject(ClassName##R2, "FbxStorable/User", #ClassName, Description, RegisterUserObject##ClassName##Create, true, IconFilename);}\
71 FB_FORWARD(ClassName);\
72 int ClassName::ClassId = FBRegister_ClassId(#ClassName);\
73 int ClassName::GetUserClassId(){\
74 return ClassId; }\
75 const char* ClassName::FbxGetObjectSubType(){\
76 return #ClassName;}
77
79// FBUserObject
82{
83 //--- Open Reality declaration.
86
87public:
92 FBUserObject(const char* pName, HIObject pObject=NULL);
93
98 virtual bool FbxStore(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat) override;
99 virtual bool FbxRetrieve(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat) override;
100};
101
103// FBUserObjectList
105
110{
111 public:
118};
119
120#ifdef FBSDKUseNamespace
121 }
122#endif
123
124#endif /* __FBUSEROBJECT_H__ */
A box is a fundamental building block in the application architecture.
Definition fbcore.h:218
FBX file interface.
Definition fbfbx.h:80
PropertyList: Concrete class for PropertyList of component
PropertyList: UserObject.
FBUserObject * operator[](int pIndex)
Get the UserObject at pIndex.
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat) override
Store and Retrieve function that can be overloaded.
FBUserObject(const char *pName, HIObject pObject=NULL)
Constructor.
Basic class definitions.
#define FBDeclareUserObject(ClassName)
Event registration/un-registration.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Contains definitions for devices, boxes and models.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
Definition fbtypes.h:74
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68