C++ TargetRTS
Loading...
Searching...
No Matches
RTMain.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 __RTMain_h__
11#define __RTMain_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTConfig_h__
18#include <RTConfig.h>
19#endif
20
21class RTActor;
22class RTActorRef;
23class RTController;
24class RTSuperActor;
26
27class RTMain
28{
29private:
30 friend class RTSuperActor;
31
32 static int execute( void );
33 static int mainLine( void );
34
35 static void targetStartup( void );
36 static void installHandlers( void );
37 static void installOneHandler( int,
38 void (*)( int ) );
39 static void removeHandlers( void );
40 static void removeOneHandler( int );
41 static void targetShutdown( void );
42
43 static const RTSystemDescriptor * _system;
44 static int _argc;
45 static const char * const * _argv;
46
47 static RTController * _controller;
48 static RTActor * _superActor;
49 static RTActorRef * _topReference;
50
51#if USE_THREADS && OTRTSDEBUG != DEBUG_NONE
52 static int debugPriority;
53 static int debugStackSize;
54#endif
55
56public:
57 // entryPoint must be provided by the generated code
58 static int entryPoint( int, const char * const * );
59
60 static int shutdown( RTController * );
61 static const char * debugName( void );
62
63 static RTS_INLINE RTController * controller( void );
64 static RTS_INLINE RTActorRef * topReference( void );
65 static RTS_INLINE RTActor * topActor( void );
66
67 static RTS_INLINE
68 const RTSystemDescriptor * systemInfo( void );
69 static RTS_INLINE int argCount( void );
70 static RTS_INLINE const char * const * argStrings( void );
71
72#if USE_THREADS
73 static void lock( void );
74 static void unlock( void );
75#else
76 static RTS_INLINE void lock( void );
77 static RTS_INLINE void unlock( void );
78#endif
79};
80
81#if RTS_INLINES
82#include <RTMain.inl>
83#endif
84
85#endif // __RTMain_h__
An instance of this class represents a capsule instance.
Definition: RTActor.h:44
Represents a capsule part.
Definition: RTActorRef.h:39
A controller manages a group of capsule instances that all run in the same physical thread (i....
Definition: RTController.h:54
Definition: RTMain.h:28
Definition: RTSuperActor.h:37
Definition: RTSystemDescriptor.h:26