blob: 0a6a77ef325bd4939f639b6e8a725aa2e262fcb0 (
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
46
47
48
49
|
/*******************************************************************************
* Copyright (c) 2011 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:
* Henrik Rentz-Reichert (initial contribution)
*
*******************************************************************************/
package org.eclipse.etrice.generator.cpp.gen;
import org.eclipse.etrice.core.genmodel.etricegen.Root;
import org.eclipse.etrice.core.genmodel.base.ILogger;
import com.google.inject.Inject;
/**
* @author Henrik Rentz-Reichert
*
*/
public class Validator {
@Inject
private ILogger logger;
public boolean validate(Root genModel) {
// currently unused
int errorCount = 0;
// for (RoomModel mdl : genModel.getUsedRoomModels()) {
// TreeIterator<EObject> it = mdl.eAllContents();
// while (it.hasNext()) {
// EObject obj = it.next();
//
// }
// }
if (errorCount>0) {
logger.logError("C++ generator detected "+errorCount+" error(s) - terminating", null);
return false;
}
return true;
}
}
|