Port DDS plugin to the new plugin system.

This commit is contained in:
Alexey Rybalchenko
2017-09-15 13:51:42 +02:00
committed by Mohammad Al-Turany
parent 2db114bc5c
commit 01327426c3
21 changed files with 564 additions and 130 deletions

View File

@@ -162,7 +162,16 @@ string FairMQChannel::GetChannelName() const
string FairMQChannel::GetChannelPrefix() const
{
string prefix = fName;
return prefix.erase(fName.rfind("["));
prefix = prefix.erase(fName.rfind("["));
return prefix;
}
string FairMQChannel::GetChannelIndex() const
{
string indexStr = fName;
indexStr.erase(indexStr.rfind("]"));
indexStr.erase(0, indexStr.rfind("[") + 1);
return indexStr;
}
string FairMQChannel::GetType() const
@@ -516,11 +525,9 @@ bool FairMQChannel::ValidateChannel()
}
else
{
//TODO: maybe cache fEndpoints as a class member? not really needed as tokenizing is
//fast, and only happens during (re-)configure
vector<string> fEndpoints;
Tokenize(fEndpoints, fAddress);
for (const auto endpoint : fEndpoints)
vector<string> endpoints;
boost::algorithm::split(endpoints, fAddress, boost::algorithm::is_any_of(","));
for (const auto endpoint : endpoints)
{
string address;
if (endpoint[0] == '@' || endpoint[0] == '+' || endpoint[0] == '>')
@@ -841,11 +848,6 @@ FairMQChannel::~FairMQChannel()
{
}
void FairMQChannel::Tokenize(vector<string>& output, const string& input, const string delimiters)
{
boost::algorithm::split(output, input, boost::algorithm::is_any_of(delimiters));
}
unsigned long FairMQChannel::GetBytesTx() const
{
return fSocket->GetBytesTx();