CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ctkNetworkConnectorZeroMQ.h
Go to the documentation of this file.
1 /*
2  * ctkNetworkConnectorZeroMQ.h
3  * ctkEventBus
4  *
5  * Created by Daniele Giunchi on 11/04/10.
6  * Copyright 2009 B3C. All rights reserved.
7  *
8  * See Licence at: http://tiny.cc/QXJ4D
9  *
10  */
11 
12 #ifndef ctkNetworkConnectorZeroMQ_H
13 #define ctkNetworkConnectorZeroMQ_H
14 
15 // include list
16 #include "ctkNetworkConnector.h"
17 
18 namespace ctkEventBus {
19 
27 class org_commontk_eventbus_EXPORT ctkNetworkConnectorZeroMQ : public ctkNetworkConnector {
28  Q_OBJECT
29 
30 
31 public:
34 
36  /*virtual*/ ~ctkNetworkConnectorZeroMQ();
37 
39  /*virtual*/ void createClient(const QString hostName, const unsigned int port);
40 
42  /*virtual*/ void createServer(const unsigned int port);
43 
45  /*virtual*/ void startListen();
46 
47  //retrieve an instance of the object
48  /*virtual*/ ctkNetworkConnector *clone();
49 
51  /*virtual*/ void initializeForEventBus();
52 
54 
55  /*virtual*/ void send(const QString event_id, ctkEventArgumentsList *argList);
56 
57 private Q_SLOTS:
59  virtual void processReturnValue( int requestId, QVariant value );
60 
62 
63 
64 protected:
65  //here goes zeromq vars
66 
67 private:
68  //here ges function for zeromq connection
69 
71  void stopServer();
72 
73 
74 };
75 
76 } //namespace ctkEventBus
77 
78 
79 #endif // ctkNetworkConnectorZeroMQ_H