iassetmanager.h

Go to the documentation of this file.
00001 //**************************************************************************/
00002 // Copyright (c) 1998-2008 Autodesk, Inc.
00003 // All rights reserved.
00004 // 
00005 // These coded instructions, statements, and computer programs contain
00006 // unpublished proprietary information written by Autodesk, Inc., and are
00007 // protected by Federal copyright law. They may not be disclosed to third
00008 // parties or copied or duplicated in any form, in whole or in part, without
00009 // the prior written consent of Autodesk, Inc.
00010 //**************************************************************************/
00011 // DESCRIPTION: Interface for the asset manager.
00012 // DATE: June.10.2008
00013 // AUTHOR: Chloe Mignot
00014 //***************************************************************************/
00015 
00016 #pragma once
00017 
00018 #include "..\maxheap.h"
00019 #include "..\iFnPub.h"
00020 #include "IAssetAccessor.h"
00021 #include "..\Path.h"
00022 #include "..\Noncopyable.h"
00023 #include "AssetType.h"
00024 #include "AssetUser.h"
00025 #include "AssetId.h"
00026 #include "assetmanagementExport.h"
00027 
00028 
00029 #define IID_ASSET_MANAGER   Interface_ID(0x35331479, 0x539570e8)
00030 
00031 namespace MaxSDK
00032 {
00033     namespace AssetManagement
00034     {
00035         class AssetManagerInterfaceImp;
00036 
00037         class IAssetManager: public FPStaticInterface, public MaxSDK::Util::Noncopyable
00038         {
00039         public:
00048             virtual AssetUser GetAsset(const MaxSDK::Util::Path& filename, AssetType type, bool autoAcquire=true) = 0;
00049 
00058             virtual AssetUser GetAsset(const MCHAR* filename, AssetType type, bool autoAcquire=true) = 0;
00059 
00068             virtual AssetUser GetAsset(const MSTR& filename, AssetType type, bool autoAcquire=true) = 0;
00069 
00075             virtual AssetUser GetAsset(const AssetId& assetId)const = 0;
00076 
00081             virtual bool ReleaseReference(const AssetId& assetid) = 0;
00082 
00086             virtual bool ReleaseReference(const MCHAR* guid_string) = 0;
00087 
00091             virtual bool AddReference(const AssetId& assetid) = 0;
00092 
00096             virtual bool AddReference(const MCHAR* guid_string) = 0;
00097 
00101             virtual MSTR AssetIdToString(const AssetId& assetId)const = 0;
00102 
00107             virtual bool StringToAssetId(const MSTR& string, AssetId& assetId)const = 0;
00108 
00113             virtual IOResult LoadAsset(ILoad* iload, AssetUser &assetUser) = 0;
00114 
00120             virtual void RemapLoadedAssetID(AssetId& assetId) = 0;
00121 
00127             virtual void RegisterAssetMetaData(const AssetId& assetId, const MSTR& filename, AssetType type) = 0;
00128 
00131             virtual IOResult Save(ISave *isave) = 0;
00132 
00135             virtual IOResult Load(ILoad *iload) = 0;
00136 
00139             virtual void PreSave(ISave *isave) = 0;
00140 
00143             virtual void PreLoad(ILoad *iload) = 0;
00144             
00147             virtual void PostLoad(ILoad *iload) = 0;
00148 
00150             AssetMgmntExport static IAssetManager* GetInstance();
00151         
00152         };
00153     }//End of namespace AssetManagement
00154 }
00155