C++ TargetRTS
Loading...
Searching...
No Matches
RTCustomController.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTCustomController_h__
11#define __RTCustomController_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTActor_h__
18#include <RTActor.h>
19#endif
20
21#ifndef __RTPeerController_h__
22#include <RTPeerController.h>
23#endif
24
29#define REGISTER_LAYER( wait, wakeup, process ) \
30 context()->registerLayer( this, \
31 wait, \
32 wakeup, \
33 process )
34
43{
44private:
45 RTActor * _customLayer;
46 RTActorFunction _waitFunc;
47 RTActorFunction _wakeupFunc;
48 RTActorFunction _processFunc;
49
50public:
51 RTCustomController( RTDebugger *, const char * );
52 virtual ~RTCustomController( void );
53
54 virtual void mainLoop( void ) override;
55
66 void registerLayer( RTActor * newLayer,
67 RTActorFunction waitFunc,
68 RTActorFunction wakeupFunc,
69 RTActorFunction processFunc ) override;
70
71protected:
72 virtual void waitForEvents( void ) override;
73 virtual void wakeup( void ) override;
74
75private:
76 // unavailable methods
78 RTCustomController & operator=( const RTCustomController & );
79}; //lint !e1712
80
81#endif // __RTCustomController_h__
An instance of this class represents a capsule instance.
Definition: RTActor.h:44
A controller that allows a custom actor object to control the execution of a physical thread in a mul...
Definition: RTCustomController.h:43
void registerLayer(RTActor *newLayer, RTActorFunction waitFunc, RTActorFunction wakeupFunc, RTActorFunction processFunc) override
Register a custom actor object with the controller.
Definition: RTDebugger.h:58
A controller that acts as an interface to a physical thread which runs a group of capsule instances i...
Definition: RTPeerController.h:27