C++ TargetRTS
Loading...
Searching...
No Matches
RTDefaultActorFactory.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 __RTDefaultActorFactory_h__
11#define __RTDefaultActorFactory_h__
12
13#include "RTActorFactoryInterface.h"
14
20template <typename CapsuleClass>
22public:
23 RTActor* create(RTController *rts, RTActorRef *ref, int index) override {
24 return new CapsuleClass(rts, ref);
25 }
26
27 void destroy(RTActor* actor) override {
28 delete actor;
29 }
30};
31
39public:
40 RTActor* create(RTController *rts, RTActorRef *ref, int index) override {
41 return nullptr;
42 }
43
44 void destroy(RTActor* actor) override {
45 delete actor;
46 }
47};
48
49#endif // __RTDefaultActorFactory_h__
Interface of a capsule factory responsible for creating and destroying capsule instances in a capsule...
Definition: RTActorFactoryInterface.h:15
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
A capsule factory with a default destroy implementation, but without a create implementation (the cre...
Definition: RTDefaultActorFactory.h:38
RTActor * create(RTController *rts, RTActorRef *ref, int index) override
Called by the TargetRTS to create a capsule instance, which later will be inserted into a capsule par...
Definition: RTDefaultActorFactory.h:40
void destroy(RTActor *actor) override
Called by the TargetRTS to destroy a capsule instance.
Definition: RTDefaultActorFactory.h:44
A capsule factory with a default implementation for how to create and destroy capsule instances.
Definition: RTDefaultActorFactory.h:21
void destroy(RTActor *actor) override
Called by the TargetRTS to destroy a capsule instance.
Definition: RTDefaultActorFactory.h:27
RTActor * create(RTController *rts, RTActorRef *ref, int index) override
Called by the TargetRTS to create a capsule instance, which later will be inserted into a capsule par...
Definition: RTDefaultActorFactory.h:23