Purpose:
|
Used by the DistributeStates function below to find the
HISTORY_STREAM corresponding to a given entity.
|
|
Derivation:
|
StreamFinder : ACIS_OBJECT : -
|
|
Filename:
|
kern/kernel/sg_husk/history/history.hxx
|
|
Description:
|
This class is used by the DistributeStates function below to find the
HISTORY_STREAM corresponding to a given entity. It gives a great deal of flexibility and supports a variety of usage scenarios. At the same time user needs to be careful during usage. This is a class, instead of function pointers, hence it can cache data or arguments without using the global data hack. Examples of implementations are:
|
|
. Find the top level owner and get the stream from an
ATTRIB_HISTORY found there.
|
|
. Find the
PART for the
ENTITY and return the stream associated with the
PART.
|
|
. Always return the same stream. This is useful when the application has some knowledge about what has transpired and knows all
BULLETINs go on the same stream.
|
|
|
|
References:
|
by KERN
|
HISTORY_MANAGER
|
|
Data:
|
public enum LookStrategy;
|
|
Type of look strategy.
|
|
Constructor:
|
public: StreamFinder::StreamFinder
();
|
|
|
C++ allocation constructor requests memory for this object.
|
|
|
|
Methods:
|
public: virtual HISTORY_STREAM* StreamFinder::findStream
(
|
|
|
ENTITY*,
|
//Entity Object
|
|
|
LookStrategy strategy
|
//Type of look strategy
|
|
|
|
= LookNormal
|
//
|
|
|
)= 0;
|
|
|
Function to return the
HISTORY_STREAM for any entity.
|
|
|
|
|
|
|
public: virtual HISTORY_STREAM* StreamFinder::quick_findStream
(
|
|
|
ENTITY*
|
//Entity Object
|
|
|
);
|
|
|
Function to return the
HISTORY_STREAM for any entity whose stream needs to be quickly determined. This check is very fast.
|