Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ProcessCreator< T > Class Template Reference

The class is a helper that allows to instantiate a class as an Aperios process. More...

#include <ProcessFramework.h>

Inheritance diagram for ProcessCreator< T >:

Inheritance graph
[legend]
Collaboration diagram for ProcessCreator< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ProcessCreator (const char *name)
 Constuctor.


Private Member Functions

virtual OStatus DoInit (const OSystemEvent &event)
 The function registers the global functions for object communication.

virtual OStatus DoStart (const OSystemEvent &event)
 The function starts the process.

virtual OStatus DoStop (const OSystemEvent &event)
 The function stops the process.

virtual OStatus DoDestroy (const OSystemEvent &event)
 The function destroys the process.

void processNextFrame ()
 The function is called once for each frame.

virtual PlatformProcessgetProcess ()
 The function returns the address of the associated process.


Private Attributes

T * process
 A pointer to the only instance of the process.

const char * name
 The name of the process.

int lastTime
 The last time when Process::Main() was finished.


Detailed Description

template<class T>
class ProcessCreator< T >

The class is a helper that allows to instantiate a class as an Aperios process.

ProcessCreator contains the parts that need to be implemented as a template. It will only be used by the macro MAKE_PROCESS and should never be used directly.

Definition at line 231 of file ProcessFramework.h.


Constructor & Destructor Documentation

template<class T>
ProcessCreator< T >::ProcessCreator const char *  name  )  [inline]
 

Constuctor.

It is only called from MAKE_PROCESS.

Parameters:
name The name of the process.

Definition at line 359 of file ProcessFramework.h.

References ProcessBase::init(), ProcessCreator< T >::lastTime, ProcessCreator< T >::process, and VERIFY.

Here is the call graph for this function:


Member Function Documentation

template<class T>
virtual OStatus ProcessCreator< T >::DoInit const OSystemEvent &  event  )  [inline, private, virtual]
 

The function registers the global functions for object communication.

It is called by OObject::Init().

Parameters:
event An Open-R event.
Returns:
The status. Currently, the function always reports success.

Definition at line 244 of file ProcessFramework.h.

References ASSERT, ENTRY_TABLE_MIN, SenderList::getName(), ReceiverList::getName(), SenderList::getNext(), ReceiverList::getNext(), ProcessCreator< T >::name, ProcessCreator< T >::process, ProcessBase::setBlockingId(), and VERIFY.

Here is the call graph for this function:

template<class T>
virtual OStatus ProcessCreator< T >::DoStart const OSystemEvent &  event  )  [inline, private, virtual]
 

The function starts the process.

It is called by OObject::Start().

Parameters:
event An Open-R event.
Returns:
The status. Currently, the function always reports success.

Definition at line 283 of file ProcessFramework.h.

References ReceiverList::getNext(), ProcessCreator< T >::process, and ProcessBase::setEventId().

Here is the call graph for this function:

template<class T>
virtual OStatus ProcessCreator< T >::DoStop const OSystemEvent &  event  )  [inline, private, virtual]
 

The function stops the process.

It is called by OObject::Stop(). However, OObject::Stop() is never called. Therefore, this function is called neither.

Parameters:
event An Open-R event.
Returns:
The status. Currently, the function always reports success.

Definition at line 299 of file ProcessFramework.h.

References ReceiverList::getNext(), ProcessCreator< T >::process, and ProcessBase::stop().

Here is the call graph for this function:

template<class T>
virtual OStatus ProcessCreator< T >::DoDestroy const OSystemEvent &  event  )  [inline, private, virtual]
 

The function destroys the process.

It is called by OObject::Destroy(). However, OObject::Destroy() is never called. Therefore, this function is called neither.

Parameters:
event An Open-R event.
Returns:
The status. Currently, the function always reports success.

Definition at line 317 of file ProcessFramework.h.

template<class T>
void ProcessCreator< T >::processNextFrame  )  [inline, private, virtual]
 

The function is called once for each frame.

It calls Process::main() and will start a timer if Process::main() returned a nonzero value.

Implements ProcessBase.

Definition at line 324 of file ProcessFramework.h.

References SenderList::finishFrame(), SystemCall::getCurrentSystemTime(), PlatformProcess::getFirstReceiver(), PlatformProcess::getFirstSender(), ProcessCreator< T >::getProcess(), ProcessCreator< T >::lastTime, ProcessCreator< T >::process, ProcessBase::resetEventMask(), ProcessBase::setBlockingId(), and VERIFY.

Here is the call graph for this function:

template<class T>
virtual PlatformProcess* ProcessCreator< T >::getProcess  )  [inline, private, virtual]
 

The function returns the address of the associated process.

Returns:
The address of the object.

Implements ProcessBase.

Definition at line 351 of file ProcessFramework.h.

References ProcessCreator< T >::process.

Referenced by ProcessCreator< T >::processNextFrame().


Member Data Documentation

template<class T>
T* ProcessCreator< T >::process [private]
 

A pointer to the only instance of the process.

Definition at line 234 of file ProcessFramework.h.

Referenced by ProcessCreator< T >::DoInit(), ProcessCreator< T >::DoStart(), ProcessCreator< T >::DoStop(), ProcessCreator< T >::getProcess(), ProcessCreator< T >::ProcessCreator(), and ProcessCreator< T >::processNextFrame().

template<class T>
const char* ProcessCreator< T >::name [private]
 

The name of the process.

Definition at line 235 of file ProcessFramework.h.

Referenced by ProcessCreator< T >::DoInit().

template<class T>
int ProcessCreator< T >::lastTime [private]
 

The last time when Process::Main() was finished.

Definition at line 236 of file ProcessFramework.h.

Referenced by ProcessCreator< T >::ProcessCreator(), and ProcessCreator< T >::processNextFrame().


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:10:55 2004 for GT2004 by doxygen 1.3.6