DC_FilterInstance_t Class Reference

#include <dc_instance.h>

List of all members.

Public Methods

 DC_FilterInstance_t (void)
 ~DC_FilterInstance_t (void)
DC_WorkHandle_t AppendWork (DC_Work_t &work, bool fWait=true)
 appends the given work to a running instance, returns handle. More...


Public Attributes

DC_Filter_Base_t::arg_t arg
 fDetached == F -> used by console process to recv results.


Protected Types

enum  {
  INIT, WAIT, WORK, STOP,
  DONE
}

Protected Methods

Types::uint find_filter (const char *sbName)
DC_ConsoleStreamSpec* find_stream (const char *sbName, Types::uint &iStream)
bool _isDetached (void)
void _Delete (void)
int _Reset (DC_FilterService_t *pDC_in, DC_ConsoleProcessState *pConsole_in)
int _ProcessLayout (DC_FilterLayout_t &layout)
int _ProcessPlacement (DC_Placement_t &placement)
int _StartInstance (void)
int _StopInstance (void)
int _WaitUntilInstanceDone (void)
int _InstanceExit_Reader (void)

Protected Attributes

DC_FilterService_tpDC
DC_ConsoleProcessState* pConsole
int wInstanceNum
char* sbLayoutName
bool fDetached
enum DC_FilterInstance_t:: { ... }  eState
int wNextWorkNum
int wRemoteInstances
 total remote processes used for this instance.

int cRemoteInstanceExit
 count of remote processes that finished.

DArray<DC_ConsoleFilterSpec*> daFilterSpec
DArray<DC_ConsoleStreamSpec*> daStreamSpec
DC_Mutex mutex


Detailed Description

Encapsulates the state of a set of filters being executed, and work being directed at them. This is of use within the Console Process called by the application main() or front end.

Multiple instances all exist within a single remote process. That remote process is assumed to exist before this class can do anything.


Member Enumeration Documentation

anonymous enum [protected]
 

INIT - after ctor called WAIT - filters instantiated on remote libs, no work to do WORK - processing work STOP - currently being stopped DONE - instance is finished


Constructor & Destructor Documentation

DC_FilterInstance_t::DC_FilterInstance_t ( void )
 

ctor

DC_FilterInstance_t::~DC_FilterInstance_t ( void )
 

dtor


Member Function Documentation

DC_WorkHandle_t DC_FilterInstance_t::AppendWork ( DC_Work_t & work,
bool fWait = true )
 

appends the given work to a running instance, returns handle.

Append the given work buffer to this running instance.

Inputs: work - uow to add to the new instance fWait - T=indicates if user will eventually call DC.WaitWork() F=automatic reap of work state when finished Return: int - 0+=work handle, <0=failure

int DC_FilterInstance_t::_ProcessLayout ( DC_FilterLayout_t & layout ) [protected]
 

parse and validate the configinfo based layout, and fill out the specs in our instance.

case "thru": Indicated by a single filter with the name <console>. Can only have ins (we may remove this restiction in the future if needed). This filter is virtual, and no thread is created, as done for a normal remote process filter. The thread of the console process main is used instead. All the remote process structures are created but the ins[] struct necessarily needs to be different, because instances are dynamically created and stopped. The console's filterinstance obj is where the ins will be parked.

int DC_FilterInstance_t::_ProcessPlacement ( DC_Placement_t & placement ) [protected]
 

parse and validate the placement information, check which remote processes are not in daPlacementSpec and add them.

int DC_FilterInstance_t::_StartInstance ( void ) [protected]
 

generate and send the start instance command for each remote process

int DC_FilterInstance_t::_StopInstance ( void ) [protected]
 

Sends stop messages to all remote processes for this instance. The reader will later recv the INSTANCEEXIT packets and adjust the instance state accordingly.

Return: int - number of INSTANCEEXIT packets to expect for this instance

DC_ConsoleStreamSpec * DC_FilterInstance_t::find_stream ( const char * sbName,
Types::uint & iStream ) [protected]
 

look for a stream by name, and if not found, create a new one


Member Data Documentation

enum { ... } DC_FilterInstance_t::eState [protected]
 

INIT - after ctor called WAIT - filters instantiated on remote libs, no work to do WORK - processing work STOP - currently being stopped DONE - instance is finished

bool DC_FilterInstance_t::fDetached [protected]
 

false if [filter.<console>] is detected in filterlayout, which causes a pseudo-filter to be created for when results are funnelled back through the main console thread.


The documentation for this class was generated from the following files:
Generated at Mon Mar 3 13:53:22 2003 for DataCutter by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001