Desc. & Idea | Warnings | Methods | Atributes | Operators | Specials |
This is the prototype class of global kernel info. It waits for certain number of differnet LKIs from different processes to be collected. It can also contain some global information computed from the pieces of local information contained in incomming LKIs. It contains the bag for storing these LKIs.
This GKI is not generic in the following sense: it awaits LKIs from all spawned child processes. Also the amount and kind of LKIs cannot differ by the process. If you need different behavior you have to override this class.
Public:
TGlobalKI(uint iid,int period)
TGlobalKI(BYTE** rawbytes,uint len,BOOL subclass=FALSE)
virtual ~TGlobalKI();
virtual char* Dump()
virtual uint GetSerSize(BOOL subclass=FALSE)
virtual uint Serialize(BYTE **rawbytes,BOOL subclass=FALSE)
virtual BOOL IsReady()
virtual BOOL Init()
virtual TKernelInfo* CreateKI(uint id,BYTE** rawbytes,uint len)
virtual void Compute()
virtual BOOL Add(uint kid,int pid,BYTE** rawbytes,uint len)
virtual BOOL IsWaitingFor(uint kid,int pid)
virtual void Spoil()
BOOL InitBag(uint nkis,uint* ids,int period)
Protected:
Private:
virtual BOOL Init()
This abstract method is intended to initialize the GKI and its bag.
Override this function and call InitBag() within it.
virtual void Spoil()
This method is intended to discard GKI after it's retrieval by some upper layer.
In default implementation it calls method TBag::ClearAll()
to remove all LKIs from its bag.
We suggest to call this method after each succesfull retrieval of GKI.
Public:
TBag *bag
Protected:
int lperiod
Private:
TBag *bag
This attribute points to the bag, containig arrived LKIs. (see class TBag)
int lperiod
This attribute contains the period, collection of this GKI was registered with.
Public:
Protected:
Private:
None.