VPTissue Reference Manual
NodeProtocol.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_NODE_PROTOCOL_H_
2 #define SIMPT_PAREX_NODE_PROTOCOL_H_
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 "Protocol.h"
23 
24 class QTcpSocket;
25 
26 namespace SimPT_Parex {
27 
28 class Connection;
29 class SimResult;
30 class SimTask;
31 
35 class NodeProtocol : public Protocol
36 {
37  Q_OBJECT
38 public:
40  NodeProtocol(QTcpSocket *socket, QObject *parent = 0);
41 
43  virtual ~NodeProtocol();
44 
45 public slots:
47  void SendSimResult(const SimResult& result);
48 
49 signals:
51  void Delete(const std::string &name) const;
52 
54  void TaskReceived(const SimTask *task) const;
55 
57  void SuccessfullySent() const;
58 
60  void StopTask() const;
61 
62 protected:
64  virtual void ReceivePtree(const boost::property_tree::ptree &reader);
65 };
66 
67 } // namespace
68 
69 #endif // end-of-include-guard
Base class for the XML/ptree protocols between client, server and node.
Definition: Protocol.h:35
void Delete(const std::string &name) const
Emitted to indicate an exploration must be deleted from the disk.
Interface for Protocol.
void StopTask() const
Emitted to indicate the current task must be stopped.
virtual ~NodeProtocol()
Destructor.
A container class for the final result of a simulation.
Definition: SimResult.h:29
Class that implements the node version of the protocol.
Definition: NodeProtocol.h:35
void SendSimResult(const SimResult &result)
Sends the result of a simulation back to the server.
void TaskReceived(const SimTask *task) const
Signal emitted when a SimTask is received.
virtual void ReceivePtree(const boost::property_tree::ptree &reader)
Receive a ptree message (implementats Protocol::ReceivePtree).
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
NodeProtocol(QTcpSocket *socket, QObject *parent=0)
Constructor.
Contains all information needed for a transmitable simulation task.
Definition: SimTask.h:31
void SuccessfullySent() const
Signal emitted when a SimTask is successfully sent.
see the online Qt documentation