mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 18:11:49 +00:00
refactor to more idiomatic RAII
* FairMQTransportFactoryZMQ: move the config invariant initialization to ctor * FairMQChannel: add new ctor that creates usable channel * FairMQSocket*: close sockets in dtor * FairMQTransportFactory*: terminate context in dtor * FairMQChannel: add Bind/Connect facades (for explicit control, e.g. timing)
This commit is contained in:
committed by
Mohammad Al-Turany
parent
87252edbe0
commit
3205e0c378
@@ -80,3 +80,8 @@ FairMQ::Transport FairMQTransportFactoryNN::GetType() const
|
||||
{
|
||||
return fTransportType;
|
||||
}
|
||||
|
||||
FairMQTransportFactoryNN::~FairMQTransportFactoryNN()
|
||||
{
|
||||
Terminate();
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ class FairMQTransportFactoryNN : public FairMQTransportFactory
|
||||
{
|
||||
public:
|
||||
FairMQTransportFactoryNN();
|
||||
~FairMQTransportFactoryNN() override;
|
||||
|
||||
void Initialize(const FairMQProgOptions* config) override;
|
||||
|
||||
@@ -45,8 +46,6 @@ class FairMQTransportFactoryNN : public FairMQTransportFactory
|
||||
void Shutdown() override;
|
||||
void Terminate() override;
|
||||
|
||||
~FairMQTransportFactoryNN() override {};
|
||||
|
||||
private:
|
||||
static FairMQ::Transport fTransportType;
|
||||
};
|
||||
|
Reference in New Issue
Block a user