00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #pragma once
00014
00015 #include "..\ifnpub.h"
00016
00017
00018 #define CHANNELCONTAINER_INTERFACE Interface_ID(0x74f93c00, 0x1eb34600)
00019
00020 #define GetChannelContainerInterface(obj) ((IChannelContainer*)obj->GetInterface(CHANNELCONTAINER_INTERFACE))
00021
00022
00023 class IChannelContainer : public FPMixinInterface
00024 {
00025 public:
00026
00027
00028 enum {
00029
00030
00031 kGetPublicChannel,
00032 kGetPrivateChannel,
00033 kAddChannel
00034 };
00035
00036
00037
00038
00039 BEGIN_FUNCTION_MAP
00040
00041
00042
00043 FN_2(kGetPublicChannel, TYPE_IOBJECT, GetPublicChannel, TYPE_INT, TYPE_INT);
00044 FN_4(kGetPrivateChannel, TYPE_IOBJECT, GetPrivateChannel, TYPE_INT, TYPE_INT, TYPE_OBJECT, TYPE_INODE);
00045 FN_1(kAddChannel, TYPE_bool, AddChannel, TYPE_IOBJECT);
00046
00047 END_FUNCTION_MAP
00048
00056 virtual Class_ID GetClassID() = 0;
00057
00061 virtual int NumChannels() const = 0;
00062
00066 virtual IObject*& GetChannel(int i) = 0;
00067
00071 virtual IObject* GetChannel(Interface_ID id, Object* privateOwner=NULL, INode* creatorAction=NULL) = 0;
00072
00073
00080 IObject* GetPublicChannel(int id_PartA, int id_PartB)
00081 { return GetChannel( Interface_ID(id_PartA, id_PartB), NULL); }
00082
00086 IObject* GetPrivateChannel(int id_PartA, int id_PartB, Object* privateOwner, INode* creatorAction)
00087 { return GetChannel( Interface_ID(id_PartA, id_PartB), privateOwner, creatorAction); }
00088
00092 virtual bool AddChannel(IObject* channel) = 0;
00093
00111 virtual IObject* EnsureChannel(Interface_ID& iChanID, Class_ID& channelClassID,
00112 bool isWrapper, Interface_ID& wrappingReadID, Interface_ID& wrappingWriteID,
00113 bool isTransferable=TRUE, INode* creatorAction=NULL, Object* privateOwner=NULL,
00114 bool* initChannel=NULL) = 0;
00115
00134 virtual BaseInterface* EnsureInterface(Interface_ID& iChanID, Class_ID& channelClassID,
00135 bool isWrapper, Interface_ID& wrappingReadID, Interface_ID& wrappingWriteID,
00136 bool isTransferable=TRUE, INode* creatorAction=NULL, Object* privateOwner=NULL,
00137 bool* initChannel=NULL) = 0;
00138
00144 virtual BaseInterface* GetPrivateInterface(Interface_ID id, Object* privateOwner) = 0;
00145
00151 virtual int RemoveNonTransferableChannels(INode* nextParticleGroup=NULL) = 0;
00152
00156 virtual IObject* Clone() = 0;
00157
00161 virtual bool Copy(IObject* container) = 0;
00162
00166 virtual IOResult Save(ISave* isave) const = 0;
00167
00171 virtual IOResult Load(ILoad* iload) = 0;
00172
00176 virtual int MemoryUsed() const = 0;
00177
00181 FPInterfaceDesc* GetDesc() { return GetDescByID(CHANNELCONTAINER_INTERFACE); }
00182
00185 };
00186
00187