Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6a1eba38d4b71ced79999831c29652767fefff48 (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
/*******************************************************************************
 * 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"

namespace etRuntime {

class ReplicatedActorClassBase : public RTObject {

public:
	static const char SEP = ':';

	ReplicatedActorClassBase(IRTObject* parent, const std::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.at(index); }

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

private:
	std::vector<ActorClassBase*> m_items;
};

} // namespace et Runtime

#endif /* SRC_COMMON_MODELBASE_REPLICATEDACTORCLASSBASE_H_ */

Back to the top