mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 10:01:47 +00:00
Refactor TransportFactory to RAII
* Remove explicit Initialize and Terminate states, map them onto ctor/dtor * Remove no longer needed Shutdown state * Remove deprecated SetTransport()
This commit is contained in:
committed by
Mohammad Al-Turany
parent
733794657c
commit
8bc21675af
@@ -13,6 +13,7 @@
|
||||
#include "FairMQMessageNN.h"
|
||||
#include "FairMQSocketNN.h"
|
||||
#include "FairMQPollerNN.h"
|
||||
#include <options/FairMQProgOptions.h>
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@@ -20,11 +21,9 @@
|
||||
class FairMQTransportFactoryNN : public FairMQTransportFactory
|
||||
{
|
||||
public:
|
||||
FairMQTransportFactoryNN(const std::string& id = "");
|
||||
FairMQTransportFactoryNN(const std::string& id = "", const FairMQProgOptions* config = nullptr);
|
||||
~FairMQTransportFactoryNN() override;
|
||||
|
||||
void Initialize(const FairMQProgOptions* config) override;
|
||||
|
||||
FairMQMessagePtr CreateMessage() const override;
|
||||
FairMQMessagePtr CreateMessage(const size_t size) const override;
|
||||
FairMQMessagePtr CreateMessage(void* data, const size_t size, fairmq_free_fn* ffn, void* hint = nullptr) const override;
|
||||
@@ -38,9 +37,6 @@ class FairMQTransportFactoryNN : public FairMQTransportFactory
|
||||
|
||||
FairMQ::Transport GetType() const override;
|
||||
|
||||
void Shutdown() override;
|
||||
void Terminate() override;
|
||||
|
||||
private:
|
||||
static FairMQ::Transport fTransportType;
|
||||
};
|
||||
|
Reference in New Issue
Block a user