Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b4eb3b0bfbd15df8074cfb4e95cfbecdff5ae994 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*******************************************************************************
 * Copyright (c) 2016 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * CONTRIBUTORS:
 * 		Jan Belle (initial contribution)
 *
 *******************************************************************************/

#ifndef SRC_COMMON_MODELBASE_REPLICATEDACTORCLASSBASE_H_
#define SRC_COMMON_MODELBASE_REPLICATEDACTORCLASSBASE_H_

#include "common/messaging/RTObject.h"
#include "common/modelbase/ActorClassBase.h"
#include "common/containers/String.h"
#include "common/containers/Vector.h"

namespace etRuntime {

class ReplicatedActorClassBase : public RTObject {

public:
	static const char SEP = ':';

	ReplicatedActorClassBase(IRTObject* parent, const String& name);
	virtual ~ReplicatedActorClassBase(void);
	void createSubActors(int number);
	void initialize(void);
	void setProbesActive(bool recursive, bool active);
	int getNSubActors(void) { return m_items.size(); }
	ActorClassBase* getSubActor(int index) { return m_items[index]; }

protected:
	virtual ActorClassBase* createActor(IRTObject* parent, const String& name) = 0;

private:
	Vector<ActorClassBase*> m_items;
};

} // namespace et Runtime

#endif /* SRC_COMMON_MODELBASE_REPLICATEDACTORCLASSBASE_H_ */

Back to the top