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 friend class RTTracer;
32
33 static int execute( void );
34 static int mainLine( void );
35
36 static void targetStartup( void );
37 static void installHandlers( void );
38 static void installOneHandler( int,
39 void (*)( int ) );
40 static void removeHandlers( void );
41 static void removeOneHandler( int );
42 static void targetShutdown( void );
43
44 static const RTSystemDescriptor * _system;
45 static int _exitCode;
46 static int _argc;
47 static const char * const * _argv;
48
49 static RTController * _controller;
50 static RTActor * _superActor;
51 static RTActorRef * _topReference;
52
53#if USE_THREADS && OTRTSDEBUG != DEBUG_NONE
54 static int debugPriority;
55 static int debugStackSize;
56#endif
57
58public:
59 // entryPoint must be provided by the generated code
60 static int entryPoint( int, const char * const * );
61
62 static int shutdown( RTController * );
63 static const char * debugName( void );
64
65 static RTS_INLINE RTController * controller( void );
66 static RTS_INLINE RTActorRef * topReference( void );
67 static RTS_INLINE RTActor * topActor( void );
68
69 static RTS_INLINE
70 const RTSystemDescriptor * systemInfo( void );
71 static RTS_INLINE int argCount( void );
72 static RTS_INLINE const char * const * argStrings( void );
73 static RTS_INLINE void setExitCode(int code);
74 static RTS_INLINE int getExitCode(void);
75
76#if USE_THREADS
77 static void lock( void );
78 static void unlock( void );
79#else
80 static RTS_INLINE void lock( void );
81 static RTS_INLINE void unlock( void );
82#endif
83};
84
85#if RTS_INLINES
86#include <RTMain.inl>
87#endif
88
89#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:56
Definition: RTMain.h:28
Definition: RTSuperActor.h:37
Definition: RTTracer.h:15
Definition: RTSystemDescriptor.h:26