mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Don't use to-be-deprecated names
This commit is contained in:
committed by
Dennis Klein
parent
f15f669853
commit
bfd08bb33f
@@ -20,7 +20,7 @@ struct Processor : fair::mq::Device
|
||||
OnData("data1", &Processor::HandleData);
|
||||
}
|
||||
|
||||
bool HandleData(FairMQMessagePtr& msg, int)
|
||||
bool HandleData(fair::mq::MessagePtr& msg, int)
|
||||
{
|
||||
LOG(info) << "Received data, processing...";
|
||||
|
||||
@@ -32,7 +32,7 @@ struct Processor : fair::mq::Device
|
||||
// its size,
|
||||
// custom deletion function (called when transfer is done),
|
||||
// and pointer to the object managing the data buffer
|
||||
FairMQMessagePtr msg2(NewMessage(const_cast<char*>(text->c_str()),
|
||||
fair::mq::MessagePtr msg2(NewMessage(const_cast<char*>(text->c_str()),
|
||||
text->length(),
|
||||
[](void* /*data*/, void* object) { delete static_cast<std::string*>(object); },
|
||||
text));
|
||||
|
@@ -24,7 +24,7 @@ struct Sampler : fair::mq::Device
|
||||
{
|
||||
// NewSimpleMessage creates a copy of the data and takes care of its destruction (after the transfer takes place).
|
||||
// Should only be used for small data because of the cost of an additional copy
|
||||
FairMQMessagePtr msg(NewSimpleMessage("Data"));
|
||||
fair::mq::MessagePtr msg(NewSimpleMessage("Data"));
|
||||
|
||||
LOG(info) << "Sending \"Data\"";
|
||||
|
||||
|
@@ -25,7 +25,7 @@ struct Sink : fair::mq::Device
|
||||
fIterations = fConfig->GetValue<uint64_t>("iterations");
|
||||
}
|
||||
|
||||
bool HandleData(FairMQMessagePtr& msg, int)
|
||||
bool HandleData(fair::mq::MessagePtr& msg, int)
|
||||
{
|
||||
LOG(info) << "Received: \"" << std::string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
|
||||
|
||||
|
Reference in New Issue
Block a user