Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #pragma once
00015
00016 #include "maxtypes.h"
00017 #include "tab.h"
00018 #include "baseinterface.h"
00019 #include "strbasic.h"
00020 #include "assetmanagement\AssetType.h"
00021 #include "assetmanagement\AssetId.h"
00022 #include "strclass.h"
00023
00024
00025 class ILoad;
00026 class INode;
00027 class ReferenceMaker;
00028 class ClassDesc;
00029
00036 #pragma warning(push)
00037 #pragma warning(disable:4100)
00038 class PostLoadCallback : public InterfaceServer {
00039 public:
00042 virtual void proc(ILoad *iload)=0;
00043
00055 virtual int Priority() { return 5; }
00068 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00069 };
00070 #pragma warning(pop)
00071
00072
00087 class IMergeManager : public InterfaceServer {
00088 public:
00094 virtual ULONG GetNewHandle(ULONG oldHandle) = 0;
00100 virtual bool HandleExist(ULONG handle) = 0;
00101 };
00102
00103
00104 #define NO_CLASSDESC_ID_RETURNED 0xffff
00105
00106
00130 #pragma warning(push)
00131 #pragma warning(disable:4100)
00132 class ISave : public InterfaceServer {
00133 public:
00134 virtual ~ISave(){};
00135
00136
00145 virtual int GetRefID(void *ptarg)=0;
00146
00147
00151 virtual void BeginChunk(USHORT id)=0;
00152
00153
00156 virtual void EndChunk()=0;
00157
00160 virtual int CurChunkDepth()=0;
00161
00162
00172 virtual IOResult Write(const void *buf, ULONG nbytes, ULONG *nwrit)=0;
00173
00174
00179 virtual IOResult WriteWString(const char *str)=0;
00184 virtual IOResult WriteWString(const mwchar_t *str)=0;
00190 virtual IOResult WriteCString(const char *str)=0;
00195 virtual IOResult WriteCString(const mwchar_t *str)=0;
00196
00197
00203 virtual FileIOType DoingWhat()=0;
00204
00205
00206
00220 virtual DWORD SavingVersion() { return 0; }
00221
00222
00230 virtual USHORT GetClassDescID(ReferenceMaker* rm) { return NO_CLASSDESC_ID_RETURNED; }
00231
00232 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00233
00234
00236 virtual const MCHAR* FileName() { return NULL; }
00237
00238
00242 virtual IOResult SaveAssetMetaData(const MaxSDK::AssetManagement::AssetId& assetId) { return IO_OK; }
00243
00244
00247 virtual bool SaveAssetAsAssetIDGuid() { return false; }
00248
00249 };
00250
00251
00252 #pragma warning(pop)
00253
00266 #pragma warning(push)
00267 #pragma warning(disable:4100)
00268 class ILoad : public InterfaceServer {
00269 public:
00270 enum BPFlag {
00271 FORCEMERGE = (1<<0)
00272 };
00273
00274 virtual ~ILoad(){};
00275
00276
00283 virtual void* GetAddr(int imaker)=0;
00284
00285
00286
00287
00288
00301 virtual void RecordBackpatch(int imaker, void** patchThis, DWORD flags = 0)=0;
00302
00303
00304
00305
00307 virtual void SetRootAddr(void *addr)=0;
00309 virtual void* GetRootAddr()=0;
00310
00311
00312
00325 virtual IOResult OpenChunk()=0;
00326
00327
00330 virtual USHORT CurChunkID()=0;
00336 virtual ChunkType CurChunkType()=0;
00338 virtual ULONGLONG CurChunkLength()=0;
00341 virtual int CurChunkDepth()=0;
00342
00343
00344
00349 virtual IOResult CloseChunk()=0;
00350
00351
00352
00355 virtual USHORT PeekNextChunkID()=0;
00356
00357
00365 virtual IOResult Read(void *buf, ULONG nbytes, ULONG *nread )=0;
00366
00367
00368
00369
00370
00371
00378 virtual IOResult ReadWStringChunk(char** buf)=0;
00385 virtual IOResult ReadWStringChunk(mwchar_t** buf)=0;
00386
00387
00397 virtual IOResult ReadCStringChunk(char** buf)=0;
00407 virtual IOResult ReadCStringChunk(mwchar_t** buf)=0;
00408
00409
00410
00413 virtual void SetObsolete()=0;
00414
00415
00416
00417
00418
00423 virtual void RegisterPostLoadCallback(PostLoadCallback *cb)=0;
00424
00425
00426
00432 virtual const MCHAR *GetDir(int which)=0;
00433
00434
00440 virtual FileIOType DoingWhat()=0;
00441
00442
00445 virtual INode *RootNode()=0;
00446
00447
00448
00456 virtual ClassDesc* GetClassDesc(USHORT refID) { return NULL; }
00457
00458 virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0) { return 0; }
00459
00461
00477 virtual DWORD GetFileSaveVersion() { return 0; };
00478
00495 virtual bool RecordNodeRefRemap(ReferenceMaker& aRefMaker, int aRefIdx, INode* aTargetNode, bool aIsIndirectRef) {return false;}
00496
00497
00499 virtual const MCHAR* FileName() { return NULL; }
00500
00501
00504 virtual IOResult LoadAssetMetaData() { return IO_OK; }
00505 };
00506 #pragma warning(pop)
00507
00508