C++ TargetRTS
Loading...
Searching...
No Matches
RTFrame.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 __RTFrame_h__
11#define __RTFrame_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTActorId_h__
18#include <RTActorId.h>
19#endif
20
21#ifndef __RTController_h__
22#include <RTController.h>
23#endif
24
25#ifndef __RTProtocol_h__
26#include <RTProtocol.h>
27#endif
28
29struct RTActorClass;
30class RTActorRef;
31class RTController;
32struct RTTypedValue;
33
35struct Frame
36{
38 class Base : public RTProtocol
39 {
40 public:
41 RTS_INLINE Base( void );
42 RTS_INLINE ~Base( void );
43
44 static const RTProtocolDescriptor rt_class;
45
52
59
73 const void * data,
74 const RTObject_class * type,
75 RTController * controller,
76 int index );
77
91 const RTActorClass & cap,
92 const void * data,
93 const RTObject_class * type,
94 RTController * controller,
95 int index );
96
109 const RTDataObject & data,
110 RTController * controller = nullptr,
111 int index = -1 );
112
125 const RTActorClass & cap,
126 const RTDataObject & data,
127 RTController * controller = nullptr,
128 int index = -1 );
129
142 const RTTypedValue & info,
143 RTController * controller = nullptr,
144 int index = -1 );
145
158 const RTActorClass & cap,
159 const RTTypedValue & info,
160 RTController * controller = nullptr,
161 int index = -1 );
162#if RTUseCPP11
174 RTActorFactory& factory,
175 int index = -1);
176
178 RTActorFactory&& factory, // To allow temporary factory objects
179 int index = -1);
180
195 const void * data,
196 const RTObject_class * type,
197 RTActorFactory& factory,
198 int index = -1);
199
201 const void * data,
202 const RTObject_class * type,
203 RTActorFactory&& factory, // To allow temporary factory objects
204 int index = -1);
205#endif
206
213
219 int destroy( RTActorRef & cp);
220
231 int import( const RTActorId & i,
232 RTActorRef & cp_dest,
233 int index = -1 );
234
246 int import( RTActorRef & cp_src,
247 RTActorRef & cp_dest,
248 int index = -1 );
249
255 int deport( const RTActorId & i,
256 RTActorRef & cp);
257
267
273 int index );
274
278 RTActorId me( void );
279
283 const RTActorClass & myClass( void );
284
290 const RTActorClass & classOf( const RTActorId & instance );
291
298 int classIsKindOf( const RTActorClass & subClass,
299 const RTActorClass & superClass );
300
304 const char * className( const RTActorClass & );
305
306 private:
307#if RTFRAME_CHECKING != RTFRAME_CHECK_NONE
308 int permissionCheck( RTController::Primitive,
309 RTActorRef *,
310 int trace );
311#endif
312
313 // unavailable methods
314 Base( const Base & );
315 Base & operator=( const Base & );
316 };
317};
318
319#if RTS_INLINES
320#include <RTFrame.inl>
321#endif
322
323#endif // __RTFrame_h__
Represents a frame port.
Definition: RTFrame.h:39
RTActorId incarnate(RTActorRef &cp)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
RTActorId incarnateCustom(RTActorRef &cp, RTActorFactory &factory, int index=-1)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part using a custo...
const char * className(const RTActorClass &)
Get the name of a capsule type.
RTActorId incarnate(RTActorRef &cp, const RTActorClass &cap, const void *data, const RTObject_class *type, RTController *controller, int index)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
RTActorId me(void)
Return the capsule instance that owns the frame service port.
int deport(const RTActorId &i, RTActorRef &cp)
Remove a capsule instance from a plug-in capsule part.
RTActorId incarnate(RTActorRef &cp, const RTActorClass &cap)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
RTActorId incarnateCustom(RTActorRef &cp, const void *data, const RTObject_class *type, RTActorFactory &factory, int index=-1)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part using a custo...
RTActorId incarnationAt(const RTActorRef &cp, int index)
Return a capsule instance contained in a certain capsule part.
int destroy(RTActorId &i)
Destroy a capsule instance.
RTActorId incarnate(RTActorRef &cp, const RTTypedValue &info, RTController *controller=nullptr, int index=-1)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
RTActorId incarnate(RTActorRef &cp, const RTActorClass &cap, const RTTypedValue &info, RTController *controller=nullptr, int index=-1)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
int classIsKindOf(const RTActorClass &subClass, const RTActorClass &superClass)
Determine if a capsule is the same or inherits from another capsule.
RTActorId incarnate(RTActorRef &cp, const RTActorClass &cap, const RTDataObject &data, RTController *controller=nullptr, int index=-1)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
const RTActorClass & classOf(const RTActorId &instance)
Get the type of a certain capsule instance.
const RTActorClass & myClass(void)
Get the type of the capsule instance that owns the frame service port.
RTActorId incarnate(RTActorRef &cp, const void *data, const RTObject_class *type, RTController *controller, int index)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
int destroy(RTActorRef &cp)
Destroy all capsule instances contained in a certain capsule part.
RTActorId incarnate(RTActorRef &cp, const RTDataObject &data, RTController *controller=nullptr, int index=-1)
Incarnates a capsule by creating an instance of the capsule in an optional capsule part.
RTActorId ** incarnationsOf(const RTActorRef &cp)
Return all capsule instances contained in a certain capsule part.
A capsule factory where capsule instances are created by means of a provided 'create' function,...
Definition: RTActorFactory.h:27
An object that identifies a capsule instance at run-time.
Definition: RTActorId.h:27
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
Provides a common interface to certain data type implementations (e.g.
Definition: RTDataObject.h:33
Represents a general capsule port typed by a protocol which determines the set of events that can be ...
Definition: RTProtocol.h:50
Represents the predefined "Frame" protocol.
Definition: RTFrame.h:36
A type descriptor providing information about the external characteristics of a capsule.
Definition: RTActorClass.h:36
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTProtocolDescriptor.h:40
Encapsulates a data object and its type descriptor.
Definition: RTTypedValue.h:29