提交 b866662b 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

Add cross-Svr nodes

上级 ac5abc4b
......@@ -27,7 +27,8 @@ SOURCES += main.cpp\
smartlink/st_clientnode_app_imp.cpp \
smartlink/st_clientnode_applayer.cpp \
cluster/zp_clusterterm.cpp \
dialogaddressinput.cpp
dialogaddressinput.cpp \
cluster/zp_clusternode.cpp
HEADERS += zpmainframe.h \
network/zp_tcpserver.h \
......@@ -45,7 +46,8 @@ HEADERS += zpmainframe.h \
smartlink/st_clientnode_applayer.h \
cluster/zp_clusterterm.h \
cluster/cross_svr_messages.h \
dialogaddressinput.h
dialogaddressinput.h \
cluster/zp_clusternode.h
FORMS += zpmainframe.ui \
dialogaddressinput.ui
......
#include "zp_clusternode.h"
namespace ZP_Cluster{
zp_ClusterNode::zp_ClusterNode(QObject *parent) :
ZPTaskEngine::zp_plTaskBase(parent)
{
}
int zp_ClusterNode::run()
{
return 0;
}
}
#ifndef ZP_CLUSTERNODE_H
#define ZP_CLUSTERNODE_H
#include <QObject>
#include "../pipeline/zp_pltaskbase.h"
namespace ZP_Cluster{
/**
* @brief This class stand for a remote server.
* when local server establish a connection between itself and remote svr,
* a zp_ClusterNode object will be created.
*/
class zp_ClusterNode : public ZPTaskEngine::zp_plTaskBase
{
Q_OBJECT
public:
explicit zp_ClusterNode(QObject *parent = 0);
int run();
signals:
public slots:
};
}
#endif // ZP_CLUSTERNODE_H
......@@ -5,12 +5,22 @@
#include <QMutex>
#include <QMutexLocker>
namespace ZPTaskEngine{
/**
* @brief the pure-base class for tasks , will be called by zp_plWorkingThread
* Users will imp your own int zp_plTaskBase::run() function.
*/
class zp_plTaskBase : public QObject
{
Q_OBJECT
public:
explicit zp_plTaskBase(QObject *parent = 0);
/**
* @brief the virtual function called by zp_plWorkingThread
* this function will be called in thread pool
* @return int 0 means this object will be removed from pipeline-fifo. otherwise,
* when run() finished, the object will be re-injected into the tail of task-fifo.
*/
virtual int run() = 0;
int addRef()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册