00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016
00017 #include "..\iFnPub.h"
00018 #include "..\tab.h"
00019 #include "..\assetmanagement\AssetUser.h"
00020
00021
00022 class IObjXRefRecord;
00023 class ReferenceMaker;
00024 class ReferenceTarget;
00025 class INodeTab;
00026
00028 #define IID_XREF_ITEM Interface_ID(0x5fa551f4, 0x442f057c)
00029
00031
00047 class IXRefItem : public FPMixinInterface
00048 {
00049 public:
00051
00053 enum XRefItemType
00054 {
00056 kType_Object = 1<<0,
00058 kType_Material = 1<<1,
00059
00060 kType_Controller = 1<<2,
00062 kType_Atmospheric = 1<<3,
00064 kType_All = (kType_Object |
00065 kType_Material |
00066 kType_Controller |
00067 kType_Atmospheric),
00069 kType_All_No_Atmospherics = (kType_Object |
00070 kType_Material |
00071 kType_Controller),
00072 };
00073
00080
00081
00084 virtual const MaxSDK::AssetManagement::AssetUser& GetSrcFile() const = 0;
00085
00087
00091 virtual const MCHAR* GetSrcItemName() const = 0;
00092
00094
00101 virtual ReferenceTarget* GetSrcItem(bool resolveNested = false) const = 0;
00102
00104
00113 virtual bool IsUnresolved() const = 0;
00114
00116
00120 virtual IObjXRefRecord* GetXRefRecord() const = 0;
00121
00123
00130 virtual void GetNodes(INodeTab& xrefNodes) const = 0;
00132
00138
00139
00145 virtual unsigned int GetParentItems(Tab<ReferenceTarget*>& parentItems) const = 0;
00147
00153 virtual unsigned int GetChildItems(Tab<ReferenceTarget*>& childItems) const = 0;
00155
00162 virtual unsigned int GetRootItems(Tab<ReferenceTarget*>& rootItems) const = 0;
00164
00168 virtual bool IsNested() const = 0;
00170
00171
00173
00176 static bool IsIXRefItem(InterfaceServer& is) {
00177 return (is.GetInterface(IID_XREF_ITEM) != NULL);
00178 };
00179
00180 using FPMixinInterface::GetInterface;
00182
00185 static IXRefItem* GetInterface(InterfaceServer& is) {
00186 return static_cast<IXRefItem*>(is.GetInterface(IID_XREF_ITEM));
00187 };
00188
00189
00190 virtual Interface_ID GetID() { return IID_XREF_ITEM; }
00191
00192 enum {
00193 kfpGetSrcFileName, kfpSetSrcFileName,
00194 kfpGetSrcItemName, kfpSetSrcItemName,
00195 kfpGetSrcItem,
00196 kfpGetParentItems,
00197 kfpGetChildItems,
00198 kfpGetRootItems,
00199 kfpGetXRefRecord,
00200 kfpIsUnresolved,
00201 kfpIsNested,
00202 kfpGetNodes,
00203 kfpLastID,
00204 };
00205
00206 BEGIN_FUNCTION_MAP
00207 PROP_FNS(kfpGetSrcFileName, FPGetSrcFileName, kfpSetSrcFileName, FPSetSrcFileName, TYPE_FILENAME);
00208 PROP_FNS(kfpGetSrcItemName, GetSrcItemName, kfpSetSrcItemName, FPSetSrcItemName, TYPE_STRING);
00209 RO_PROP_FN(kfpGetXRefRecord, GetXRefRecord, TYPE_INTERFACE);
00210 RO_PROP_FN(kfpIsUnresolved, IsUnresolved, TYPE_bool);
00211 RO_PROP_FN(kfpIsNested, IsNested, TYPE_bool);
00212 FN_1(kfpGetSrcItem, TYPE_REFTARG, GetSrcItem, TYPE_bool);
00213 FN_1(kfpGetParentItems, TYPE_DWORD, GetParentItems, TYPE_REFTARG_TAB_BR);
00214 FN_1(kfpGetRootItems, TYPE_DWORD, GetRootItems, TYPE_REFTARG_TAB_BR);
00215 FN_1(kfpGetChildItems, TYPE_DWORD, GetChildItems, TYPE_REFTARG_TAB_BR);
00216 VFN_1(kfpGetNodes, FPGetNodes, TYPE_INODE_TAB_BR);
00217 END_FUNCTION_MAP
00218
00219
00220 virtual FPInterfaceDesc* GetDesc() { return &mFPInterfaceDesc; }
00221 static FPInterfaceDesc mFPInterfaceDesc;
00222
00223 protected:
00225
00226
00227 virtual void FPSetSrcFileName(const MCHAR* fileName) = 0;
00229 virtual const MCHAR* FPGetSrcFileName() = 0;
00231 virtual void FPSetSrcItemName(const MCHAR* itemName) = 0;
00233
00234 private:
00235 void FPGetNodes(Tab<INode*>& xrefNodes);
00236 };
00237
00238