NAME

OTC_Job - Base class for jobs to be executed by the dispatcher.

SYNOPSIS


#include <OTC/dispatch/job.hh>

class OTC_Job
{
  public:
    virtual ~OTC_Job();
    inline void* operator new(size_t theSize);
    inline void operator delete(void* theMemory, size_t theSize);
    virtual void execute() = 0;
    virtual void destroy();
  protected:
    inline OTC_Job();
};

CLASS TYPE

Concrete

DESCRIPTION

OTC_Job is the base class for any jobs to be executed by the dispatcher. Derived classes must override the execute() function to perform the actual work. The dispatcher will call destroy() once the job has executed. The default action of destroy() is to delete the object; this can be overridden in a derived class if necessary. Space for any derived classes is allocated from OTC_CommonPool.

EXECUTION

virtual void execute() = 0;

DESTRUCTION

virtual void destroy();

SEE ALSO

OTC_JobQueue, OTC_Dispatcher, OTC_CommonPool

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED