VPTissue Reference Manual
parex_node.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "parex_node_mode.h"
21 
22 #include "parex_node/WorkerNode.h"
23 #include "parex_node/Simulator.h"
24 
25 #include <tclap/CmdLine.h>
26 #include <QApplication>
27 
28 namespace Modes {
29 
30 using namespace std;
31 using namespace SimPT_Parex;
32 
33 int ParexNodeMode::operator()(int argc, char** argv)
34 {
35  QCoreApplication app(argc, argv, false);
36 
37  TCLAP::CmdLine cmdLine("SimPT Parex Node");
38  TCLAP::SwitchArg quietArg("q", "quiet", "Quiet mode (no output)", cmdLine, false);
39  cmdLine.parse(argc, argv);
40 
41  const bool verbose = !quietArg.getValue();
42  WorkerNode node(new Simulator(), verbose);
43 
44  return app.exec();
45 }
46 
47 } // namesppace
STL namespace.
Interface/Implementation for the exec modes.
Namespace for startup modes for simPT tools.
Definition: mode_manager.h:36
Interface for the Simulator.
Broadcasts location on the network, then listens to incoming connections.
Definition: WorkerNode.h:43
Interface for WorkerNode.
Simulator handling requested simulation tasks.
Definition: Simulator.h:37
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52