VPTissue Reference Manual
SimResult.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_SIM_RESULT_H_INCLUDED
2 #define SIMPT_PAREX_SIM_RESULT_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include <string>
23 
24 namespace SimPT_Parex {
25 
29 class SimResult
30 {
31 public:
32  enum class ResultType
33  {
34  Success = 0,
35  Failure = 1,
36  Stopped = 2
37  };
38 
40  SimResult();
41 
43  SimResult(const std::string& explorationName, int taskId, ResultType result,
44  const std::string& nodeIP="", int nodePort=0);
45 
47  std::string GetExplorationName() const { return m_exploration_name; }
48 
50  int GetTaskId() const { return m_task_id; }
51 
53  ResultType GetResult() const { return m_success; }
54 
56  std::string GetNodeIP() const { return m_node_ip; }
57 
59  int GetNodePort() const { return m_node_port; }
60 
61 private:
62  std::string m_exploration_name;
63  ResultType m_success;
64  int m_task_id;
65 
66 private:
67  std::string m_node_ip;
68  int m_node_port;
69 };
70 
71 } // namespace
72 
73 #endif // end-of-include-guard
A container class for the final result of a simulation.
Definition: SimResult.h:29
std::string GetNodeIP() const
Returns the IP of the node that has the result.
Definition: SimResult.h:56
int GetTaskId() const
Return the id of the finished task.
Definition: SimResult.h:50
ResultType GetResult() const
Check if the simulation was successfully completed.
Definition: SimResult.h:53
std::string GetExplorationName() const
Returns the name of the exploration of the finished task.
Definition: SimResult.h:47
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
int GetNodePort() const
Returns the Port of the TCP server of the node that has the result.
Definition: SimResult.h:59
SimResult()
Default constructor, needed by Qt signals.
Definition: SimResult.cpp:24