CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
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
18namespace ctkEventBus {
19
27class org_commontk_eventbus_EXPORT ctkNetworkConnectorZeroMQ : public ctkNetworkConnector {
28 Q_OBJECT
29
30
31public:
34
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
57private Q_SLOTS:
59 virtual void processReturnValue( int requestId, QVariant value );
60
62
63
64protected:
65 //here goes zeromq vars
66
67private:
68 //here ges function for zeromq connection
69
71 void stopServer();
72
73
74};
75
76} //namespace ctkEventBus
77
78
79#endif // ctkNetworkConnectorZeroMQ_H
ctkNetworkConnector * clone()
retrieve an instance of the object
void initializeForEventBus()
register all the signals and slots
~ctkNetworkConnectorZeroMQ()
object destructor.
void startListen()
Start the server.
ctkNetworkConnectorZeroMQ()
object constructor.
void createServer(const unsigned int port)
create the unique instance of the server.
void send(const QString event_id, ctkEventArgumentsList *argList)
Allow to send a network request.
void createClient(const QString hostName, const unsigned int port)
create the unique instance of the client.