IPFSystemPool.h

Go to the documentation of this file.
00001 
00008 /**********************************************************************
00009  *<
00010     CREATED BY: Oleg Bayborodin
00011 
00012     HISTORY: created 08-20-02
00013 
00014  *> Copyright (c) 2001, All Rights Reserved.
00015  **********************************************************************/
00016 
00017 #pragma once
00018 #include "PFExport.h"
00019 #include "..\ifnpub.h"
00020 #include "..\notify.h"
00021 
00022 // interface ID
00023 #define PFSYSTEMPOOL_INTERFACE Interface_ID(0x74f93d0a, 0x1eb34500)
00024 
00025 #define GetPFSystemPoolInterface(obj) ((IPFSystemPool*)obj->GetInterface(PFSYSTEMPOOL_INTERFACE))
00026 
00027 class IPFSystemPool : public FPMixinInterface
00028 {
00029 public:
00030 
00031     // function IDs
00032     enum {  kNumPFSystems,
00033             kGetPFSystem,
00034             kHasPFSystem,
00035             kHasPFSystemByHandle,
00036             kRegisterNotification,
00037             kUnRegisterNotification
00038     };
00039 
00040     BEGIN_FUNCTION_MAP
00041     FN_0(kNumPFSystems, TYPE_INT, NumPFSystems );
00042     FN_1(kGetPFSystem, TYPE_INODE, GetPFSystem, TYPE_INDEX );
00043     FN_1(kHasPFSystem, TYPE_bool, HasPFSystem, TYPE_INODE );
00044     FN_1(kHasPFSystemByHandle, TYPE_bool, HasPFSystemByHandle, TYPE_INT );
00045     END_FUNCTION_MAP
00046 
00054     virtual int NumPFSystems() = 0;
00055 
00060     virtual INode* GetPFSystem(int i) = 0;
00061 
00066     virtual bool HasPFSystem(INode* node) = 0;
00067 
00071     virtual bool HasPFSystemByHandle(int handle) = 0;
00072 
00079     virtual int RegisterNotification(NOTIFYPROC proc, void *param) = 0;
00080 
00088     virtual int UnRegisterNotification(NOTIFYPROC proc, void *param) = 0;
00089 
00093     FPInterfaceDesc* GetDesc() { return GetDescByID(PFSYSTEMPOOL_INTERFACE); }
00094 
00098     friend PFExport IPFSystemPool* GetPFSystemPool();
00099 
00100 protected:
00101     PFExport IPFSystemPool();
00102 
00103     static IPFSystemPool* m_pool; // the one and only PFSystem Pool in the scene
00104 };
00105 
00109 PFExport IPFSystemPool* GetPFSystemPool();
00110