FairMQ/fairmq/examples/req-rep/FairMQExampleClient.h
Alexey Rybalchenko 26a1033e9d 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.
2015-05-28 09:32:30 +02:00

47 lines
1.5 KiB
C++

/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
/**
* FairMQExampleClient.h
*
* @since 2014-10-10
* @author A. Rybalchenko
*/
#ifndef FAIRMQEXAMPLECLIENT_H_
#define FAIRMQEXAMPLECLIENT_H_
#include <string>
#include "FairMQDevice.h"
class FairMQExampleClient : public FairMQDevice
{
public:
enum
{
Text = FairMQDevice::Last,
Last
};
FairMQExampleClient();
virtual ~FairMQExampleClient();
static void CustomCleanup(void *data, void* hint);
virtual void SetProperty(const int key, const std::string& value, const int slot = 0);
virtual std::string GetProperty(const int key, const std::string& default_ = "", const int slot = 0);
virtual void SetProperty(const int key, const int value, const int slot = 0);
virtual int GetProperty(const int key, const int default_ = 0, const int slot = 0);
protected:
std::string fText;
virtual void Run();
};
#endif /* FAIRMQEXAMPLECLIENT_H_ */