mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 01:51:45 +00:00
Rename device property to have a common format and some code cleanup.
FairMQDevice: Rename property for socket rate logging to have common format (old name is still available for compatibility). FairMQ: Avoid using std namespace in class headers (may require adding std namespace to some child devices). FairMQ: A bit of code cleanup FairMQConfigurable: Stop with an error if a property assignment failed due to incorrect key.
This commit is contained in:
committed by
Florian Uhlig
parent
61f24eb73a
commit
26a1033e9d
@@ -17,6 +17,8 @@
|
||||
#include "FairMQPollerZMQ.h"
|
||||
#include "FairMQLogger.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
FairMQPollerZMQ::FairMQPollerZMQ(const vector<FairMQSocket*>& inputs)
|
||||
: items()
|
||||
, fNumItems()
|
||||
|
@@ -20,12 +20,10 @@
|
||||
#include "FairMQPoller.h"
|
||||
#include "FairMQSocket.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class FairMQPollerZMQ : public FairMQPoller
|
||||
{
|
||||
public:
|
||||
FairMQPollerZMQ(const vector<FairMQSocket*>& inputs);
|
||||
FairMQPollerZMQ(const std::vector<FairMQSocket*>& inputs);
|
||||
|
||||
virtual void Poll(int timeout);
|
||||
virtual bool CheckInput(int index);
|
||||
|
@@ -17,6 +17,8 @@
|
||||
#include "FairMQSocketZMQ.h"
|
||||
#include "FairMQLogger.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
boost::shared_ptr<FairMQContextZMQ> FairMQSocketZMQ::fContext = boost::shared_ptr<FairMQContextZMQ>(new FairMQContextZMQ(1));
|
||||
|
||||
FairMQSocketZMQ::FairMQSocketZMQ(const string& type, int num, int numIoThreads)
|
||||
|
@@ -25,16 +25,16 @@
|
||||
class FairMQSocketZMQ : public FairMQSocket
|
||||
{
|
||||
public:
|
||||
FairMQSocketZMQ(const string& type, int num, int numIoThreads);
|
||||
FairMQSocketZMQ(const std::string& type, int num, int numIoThreads);
|
||||
|
||||
virtual string GetId();
|
||||
virtual std::string GetId();
|
||||
|
||||
virtual bool Bind(const string& address);
|
||||
virtual void Connect(const string& address);
|
||||
virtual bool Bind(const std::string& address);
|
||||
virtual void Connect(const std::string& address);
|
||||
|
||||
virtual int Send(FairMQMessage* msg, const string& flag="");
|
||||
virtual int Send(FairMQMessage* msg, const std::string& flag="");
|
||||
virtual int Send(FairMQMessage* msg, const int flags);
|
||||
virtual int Receive(FairMQMessage* msg, const string& flag="");
|
||||
virtual int Receive(FairMQMessage* msg, const std::string& flag="");
|
||||
virtual int Receive(FairMQMessage* msg, const int flags);
|
||||
|
||||
virtual void* GetSocket();
|
||||
@@ -42,21 +42,21 @@ class FairMQSocketZMQ : public FairMQSocket
|
||||
virtual void Close();
|
||||
virtual void Terminate();
|
||||
|
||||
virtual void SetOption(const string& option, const void* value, size_t valueSize);
|
||||
virtual void GetOption(const string& option, void* value, size_t* valueSize);
|
||||
virtual void SetOption(const std::string& option, const void* value, size_t valueSize);
|
||||
virtual void GetOption(const std::string& option, void* value, size_t* valueSize);
|
||||
|
||||
virtual unsigned long GetBytesTx();
|
||||
virtual unsigned long GetBytesRx();
|
||||
virtual unsigned long GetMessagesTx();
|
||||
virtual unsigned long GetMessagesRx();
|
||||
|
||||
static int GetConstant(const string& constant);
|
||||
static int GetConstant(const std::string& constant);
|
||||
|
||||
virtual ~FairMQSocketZMQ();
|
||||
|
||||
private:
|
||||
void* fSocket;
|
||||
string fId;
|
||||
std::string fId;
|
||||
unsigned long fBytesTx;
|
||||
unsigned long fBytesRx;
|
||||
unsigned long fMessagesTx;
|
||||
|
@@ -16,6 +16,8 @@
|
||||
|
||||
#include "FairMQTransportFactoryZMQ.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
FairMQTransportFactoryZMQ::FairMQTransportFactoryZMQ()
|
||||
{
|
||||
int major, minor, patch;
|
||||
|
@@ -31,8 +31,8 @@ class FairMQTransportFactoryZMQ : public FairMQTransportFactory
|
||||
virtual FairMQMessage* CreateMessage();
|
||||
virtual FairMQMessage* CreateMessage(size_t size);
|
||||
virtual FairMQMessage* CreateMessage(void* data, size_t size, fairmq_free_fn *ffn = NULL, void* hint = NULL);
|
||||
virtual FairMQSocket* CreateSocket(const string& type, int num, int numIoThreads);
|
||||
virtual FairMQPoller* CreatePoller(const vector<FairMQSocket*>& inputs);
|
||||
virtual FairMQSocket* CreateSocket(const std::string& type, int num, int numIoThreads);
|
||||
virtual FairMQPoller* CreatePoller(const std::vector<FairMQSocket*>& inputs);
|
||||
|
||||
virtual ~FairMQTransportFactoryZMQ() {};
|
||||
};
|
||||
|
Reference in New Issue
Block a user