COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
WSLink.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef WSLINK_H
9 #define WSLINK_H
10 
11 #include <QObject>
12 
13 #include "WSExport.h"
14 #include "WSCoviseStub.h"
15 
16 namespace covise
17 {
18 
19 class WSPort;
20 
21 class WSLIBEXPORT WSLink : public QObject
22 {
23  Q_OBJECT
24 public:
25  WSLink(WSPort *from, WSPort *to);
26  virtual ~WSLink();
27 
28  static QString makeID(WSPort *from, WSPort *to);
29  static QString makeID(const QString &fromModule, const QString &fromPort, const QString &toModule, const QString &toPort);
30 
31  virtual covise__Link getSerialisable() const;
32 
33 signals:
34  void deleted(const QString &linkID);
35 
36 public slots:
37  WSPort *from() const;
38  WSPort *to() const;
39  bool isLinkTo(const WSPort *port) const;
40  const QString &getLinkID() const;
41 
42 private slots:
43  void portDeleted();
44 
45 private:
48 
49  QString id;
50 };
51 }
52 #endif // WSLINK_H
#define WSLIBEXPORT
Definition: coExport.h:355
QString id
Definition: WSLink.h:49
Definition: WSLink.h:21
WSPort * fromPort
Definition: WSLink.h:46
Definition: WSPort.h:24
WSPort * toPort
Definition: WSLink.h:47