IParticleChannelINode.h

Go to the documentation of this file.
00001 
00004 /**********************************************************************
00005  *<
00006     CREATED BY:     Oleg Bayborodin
00007 
00008     HISTORY:        created 07-08-02
00009 
00010  *> Copyright (c) 2001, All Rights Reserved.
00011  **********************************************************************/
00012 
00013 #pragma once
00014 
00015 #include "PFExport.h"
00016 #include "..\ifnpub.h"
00017 
00018 // generic particle channel "INodePtr"
00019 // interface ID
00020 #define PARTICLECHANNELINODER_INTERFACE Interface_ID(0x74f93c09, 0x1eb34500)
00021 #define PARTICLECHANNELINODEW_INTERFACE Interface_ID(0x74f93c09, 0x1eb34501)
00022 
00023 // since it's a "type" channel there is no "GetChannel" defines
00024 //#define GetParticleChannelINodeRInterface(obj) ((IParticleChannelINodeR*)obj->GetInterface(PARTICLECHANNELINODER_INTERFACE))
00025 //#define GetParticleChannelINodeWInterface(obj) ((IParticleChannelINodeW*)obj->GetInterface(PARTICLECHANNELINODEW_INTERFACE))
00026 
00027 
00028 class IParticleChannelINodeR : public FPMixinInterface
00029 {
00030 public:
00031 
00032     // function IDs Read
00033     enum {  kGetValue,
00034             kIsGlobal,
00035             kGetValueGlobal
00036     };
00037 
00038     // Function Map for Function Publish System
00039     //***********************************
00040     BEGIN_FUNCTION_MAP
00041 
00042     FN_1(kGetValue, TYPE_INODE, GetValue, TYPE_INT);
00043     FN_0(kIsGlobal, TYPE_bool, IsGlobal);
00044     FN_0(kGetValueGlobal, TYPE_INODE, GetValue);
00045 
00046     END_FUNCTION_MAP
00047 
00055     virtual INode*      GetValue(int index) const = 0;
00056 
00060     virtual bool    IsGlobal() const = 0;
00061 
00065     virtual INode*      GetValue() const = 0;
00066 
00070     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELINODER_INTERFACE); }
00071 };
00072 
00073 class IParticleChannelINodeW : public FPMixinInterface
00074 {
00075 public:
00076 
00077     // function IDs Write
00078     enum {  kSetValue,
00079             kSetValueGlobal,
00080     };
00081 
00082     // Function Map for Function Publish System
00083     //***********************************
00084     BEGIN_FUNCTION_MAP
00085 
00086     VFN_2(kSetValue, SetValue, TYPE_INT, TYPE_INODE);
00087     VFN_1(kSetValueGlobal, SetValue, TYPE_INODE);
00088 
00089     END_FUNCTION_MAP
00090 
00098     virtual void    SetValue(int index, INode* value) = 0;
00099 
00103     virtual void    SetValue(INode* value) = 0;
00104 
00108     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELINODEW_INTERFACE); }
00109 };
00110