iXrefProxy.h

Go to the documentation of this file.
00001 //**************************************************************************/
00002 // Copyright (c) 1998-2005 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 working with xref that support proxies
00012 // AUTHOR: Attila Szabo - created Feb.09.2005
00013 //***************************************************************************/
00014 
00015 #pragma once
00016 
00017 #include "..\iFnPub.h"
00018 #include "..\AssetManagement\AssetUser.h"
00019 
00020 // Foreward declarations
00021 class IObjXRefRecord;
00022 
00024 #define IID_XREF_PROXY Interface_ID(0x30d59df, 0x2f06322b)
00025 
00027 
00036 class IXRefProxy : public FPMixinInterface
00037 {
00038 public:
00040 
00042     virtual const MaxSDK::AssetManagement::AssetUser& GetProxyFile() const = 0;
00043 
00045 
00047     virtual const MCHAR* GetProxyItemName() const = 0;
00048 
00050 
00054     virtual IObjXRefRecord* GetProxyRecord() const = 0;
00055 
00057 
00060     virtual void SetUseForDisplay(bool bUseProxy) = 0;
00061     
00063 
00065     virtual bool GetUseForDisplay() const = 0;
00066     
00068 
00071     virtual void SetUseForRendering(bool bUseProxy) = 0;
00072     
00074 
00076     virtual bool GetUseForRendering() const = 0;
00077 
00079 
00082     static bool IsIXRefProxy(InterfaceServer& is) {
00083         return (is.GetInterface(IID_XREF_PROXY) != NULL);
00084     };
00085 
00086     using FPMixinInterface::GetInterface;
00088 
00091     static IXRefProxy* GetInterface(InterfaceServer& is) {
00092         return static_cast<IXRefProxy*>(is.GetInterface(IID_XREF_PROXY));
00093     };
00094 
00095     // --- Function publishing
00096     virtual Interface_ID GetID() { return IID_XREF_PROXY; }
00097 
00098     enum {
00099         kfpGetProxyFileName, kfpSetProxyFileName,
00100         kfpGetProxyFileAssetId, kfpSetProxyFileAssetId,
00101         kfpGetProxyItemName, kfpSetProxyItemName,
00102         kfpGetProxyRecord,
00103         kfpGetUseForDisplay,
00104         kfpSetUseForDisplay,
00105         kfpGetUseForRendering,
00106         kfpSetUseForRendering,
00107     };
00108 
00109     BEGIN_FUNCTION_MAP
00110         PROP_FNS(kfpGetProxyFileName, FPGetProxyFileName, kfpSetProxyFileName, FPSetProxyFileName, TYPE_FILENAME);
00111         PROP_FNS(kfpGetProxyItemName, GetProxyItemName, kfpSetProxyItemName, FPSetProxyItemName, TYPE_STRING);
00112         RO_PROP_FN(kfpGetProxyRecord, GetProxyRecord, TYPE_INTERFACE);
00113         PROP_FNS(kfpGetUseForDisplay, GetUseForDisplay, kfpSetUseForDisplay, SetUseForDisplay, TYPE_bool);
00114         PROP_FNS(kfpGetUseForRendering, GetUseForRendering, kfpSetUseForRendering, SetUseForRendering, TYPE_bool);
00115     END_FUNCTION_MAP
00116 
00117     // From FPMixinInterface
00118     virtual FPInterfaceDesc* GetDesc() { return &mFPInterfaceDesc; }
00119     static FPInterfaceDesc mFPInterfaceDesc;
00120 
00121 protected:
00123 
00124 
00125     virtual void FPSetProxyFileName(const MCHAR* fileName) = 0;
00127     virtual const MCHAR* FPGetProxyFileName() const = 0;
00129     virtual void FPSetProxyItemName(const MCHAR* itemName) = 0;
00131 };
00132