IParticleChannelInt.h

Go to the documentation of this file.
00001 
00004 /**********************************************************************
00005  *<
00006     CREATED BY:     Chung-An Lin
00007 
00008     HISTORY:        created 01-16-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 "Int"
00019 // interface ID
00020 #define PARTICLECHANNELINTR_INTERFACE Interface_ID(0x74f93c01, 0x1eb34500)
00021 #define PARTICLECHANNELINTW_INTERFACE Interface_ID(0x74f93c01, 0x1eb34501)
00022 
00023 // since it's a "type" channel there is no "GetChannel" defines
00024 //#define GetParticleChannelIntRInterface(obj) ((IParticleChannelIntR*)obj->GetInterface(PARTICLECHANNELINTR_INTERFACE))
00025 //#define GetParticleChannelIntWInterface(obj) ((IParticleChannelIntW*)obj->GetInterface(PARTICLECHANNELINTW_INTERFACE))
00026 
00027 
00028 class IParticleChannelIntR : 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_INT, GetValue, TYPE_INT);
00043     FN_0(kIsGlobal, TYPE_bool, IsGlobal);
00044     FN_0(kGetValueGlobal, TYPE_INT, GetValue);
00045 
00046     END_FUNCTION_MAP
00047 
00055     virtual int     GetValue(int index) const = 0;
00056 
00060     virtual bool    IsGlobal() const = 0;
00061 
00065     virtual int     GetValue() const = 0;
00066 
00070     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELINTR_INTERFACE); }
00071 };
00072 
00073 class IParticleChannelIntW : 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_INT);
00087     VFN_1(kSetValueGlobal, SetValue, TYPE_INT);
00088 
00089     END_FUNCTION_MAP
00090 
00098     virtual void    SetValue(int index, int value) = 0;
00099 
00103     virtual void    SetValue(int value) = 0;
00104 
00108     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELINTW_INTERFACE); }
00109 };
00110