00001 /********************************************************************** 00002 00003 FILE: IFaceDataMgr.h 00004 00005 DESCRIPTION: Face-Data management API 00006 00007 CREATED BY: Attila Szabo, Discreet 00008 00009 HISTORY: [attilas|30.8.2000] 00010 00011 00012 *> Copyright (c) 1998-2000, All Rights Reserved. 00013 **********************************************************************/ 00014 #pragma once 00015 00016 #include "idatachannel.h" 00017 #include "baseinterface.h" 00018 // forward declarations 00019 class ISave; 00020 class ILoad; 00021 00022 // GUID that identifies this ifc (interface) 00023 #define FACEDATAMGR_INTERFACE Interface_ID(0x1b454148, 0x6a066927) 00024 00025 // Interface for managing face-data channels. 00026 // Objects that want to have face-data channels should implement this ifc 00027 // 00028 // If this interface needs to b changed, a new one should be derived from 00029 // it and changed (IFaceDataMgr2) and made sure objects that support 00030 // face-data implement both old and new interfaces 00040 class IFaceDataMgr : public BaseInterface 00041 { 00042 public: 00043 // 00044 // Modifiers and procedural objects should call these methods 00045 // to add\remove\retrieve a face-data channel on an object (mesh,patch,poly) 00046 // 00047 00048 // Returns the number of face-data-channels 00050 virtual ULONG NumFaceDataChans( ) const = 0; 00051 00052 // Retrieves a face-data-channel 00057 virtual IFaceDataChannel* GetFaceDataChan( const Class_ID& ID ) const = 0; 00058 00059 // Adds a face-data-channel to the object. Returns TRUE on success 00065 virtual BOOL AddFaceDataChan( IFaceDataChannel* pChan ) = 0; 00066 00067 // Removes a face-data-channel from the object. Returns TRUE on success 00073 virtual BOOL RemoveFaceDataChan( const Class_ID& ID ) = 0; 00074 00075 // 00076 // The "system" (Max) should call these methods to manage the 00077 // face-data channels when the object flows up the stack 00078 // 00079 00080 // Appends a face-data-channel to the object. Returns TRUE on success 00086 virtual BOOL AppendFaceDataChan( const IFaceDataChannel* pChan ) = 0; 00087 00088 // Adds or appends face-data channels from the from object, to this object 00089 // If the channel already exists on this object, it's appended otherwise 00090 // gets added 00098 virtual BOOL CopyFaceDataChans( const IFaceDataMgr* pFrom ) = 0; 00099 00100 // Deletes all face-data-channels from this object 00103 virtual void RemoveAllFaceDataChans() = 0; 00104 00105 // Mechanism for executing an operation for all face-data-channels on this object: 00106 // For all face-data-channels calls IFaceDataEnumCallBack::proc() with 00107 // a pointer to that face-data- channel and a context data 00108 // Returns FALSE if the call back returns FALSE for any of the face-data-channels 00120 virtual BOOL EnumFaceDataChans( IFaceDataChannelsEnumCallBack& cb, void* pContext ) const = 0; 00121 00122 // Allow persistance of info kept in object implementing this interface 00125 virtual IOResult Save(ISave* isave) = 0; 00128 virtual IOResult Load(ILoad* iload) = 0; 00129 00130 // --- from GenericInterface 00134 virtual Interface_ID GetID() { return FACEDATAMGR_INTERFACE; } 00135 00136 }; 00137