IParticleChannelVoid.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 "VoidPtr"
00019 // interface ID
00020 #define PARTICLECHANNELVOIDR_INTERFACE Interface_ID(0x74f93c0b, 0x1eb34500)
00021 #define PARTICLECHANNELVOIDW_INTERFACE Interface_ID(0x74f93c0b, 0x1eb34501)
00022 
00023 // since it's a "type" channel there is no "GetChannel" defines
00024 //#define GetParticleChannelVoidRInterface(obj) ((IParticleChannelVoidR*)obj->GetInterface(PARTICLECHANNELVOIDR_INTERFACE))
00025 //#define GetParticleChannelVoidWInterface(obj) ((IParticleChannelVoidW*)obj->GetInterface(PARTICLECHANNELVOIDW_INTERFACE))
00026 
00027 
00028 class IParticleChannelVoidR : 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_VALUE, GetValue, TYPE_INT);
00043     FN_0(kIsGlobal, TYPE_bool, IsGlobal);
00044     FN_0(kGetValueGlobal, TYPE_VALUE, GetValue);
00045 
00046     END_FUNCTION_MAP
00047 
00055     virtual void*       GetValue(int index) const = 0;
00056 
00060     virtual bool    IsGlobal() const = 0;
00061 
00065     virtual void*       GetValue() const = 0;
00066 
00070     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELVOIDR_INTERFACE); }
00071 };
00072 
00073 class IParticleChannelVoidW : 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_VALUE);
00087     VFN_1(kSetValueGlobal, SetValue, TYPE_VALUE);
00088 
00089     END_FUNCTION_MAP
00090 
00098     virtual void    SetValue(int index, void* value) = 0;
00099 
00103     virtual void    SetValue(void* value) = 0;
00104 
00108     FPInterfaceDesc* GetDesc() { return GetDescByID(PARTICLECHANNELVOIDW_INTERFACE); }
00109 };
00110