diff --git a/fairmq/FairMQChannel.h b/fairmq/FairMQChannel.h index 02263015..241846cb 100644 --- a/fairmq/FairMQChannel.h +++ b/fairmq/FairMQChannel.h @@ -81,17 +81,17 @@ class FairMQChannel /// Get channel name /// @return Returns full channel name (e.g. "data[0]") - std::string GetChannelName() const { return GetName(); } // TODO: deprecate this in favor of following - std::string GetName() const; + std::string GetChannelName() const __attribute__((deprecated("Use GetName()"))) { return GetName(); } + std::string GetName() const ; /// Get channel prefix /// @return Returns channel prefix (e.g. "data" in "data[0]") - std::string GetChannelPrefix() const { return GetPrefix(); } // TODO: deprecate this in favor of following + std::string GetChannelPrefix() const __attribute__((deprecated("Use GetPrefix()"))) { return GetPrefix(); } std::string GetPrefix() const; /// Get channel index /// @return Returns channel index (e.g. 0 in "data[0]") - std::string GetChannelIndex() const { return GetIndex(); } // TODO: deprecate this in favor of following + std::string GetChannelIndex() const __attribute__((deprecated("Use GetIndex()"))) { return GetIndex(); } std::string GetIndex() const; /// Get socket type @@ -200,7 +200,7 @@ class FairMQChannel /// Set channel name /// @param name Arbitrary channel name - void UpdateChannelName(const std::string& name) { UpdateName(name); } // TODO: deprecate this in favor of following + void UpdateChannelName(const std::string& name) __attribute__((deprecated("Use UpdateName()"))) { UpdateName(name); } void UpdateName(const std::string& name); /// Checks if the configured channel settings are valid (checks the validity parameter, without running full validation (as oposed to ValidateChannel())) @@ -209,10 +209,7 @@ class FairMQChannel /// Validates channel configuration /// @return true if channel settings are valid, false otherwise. - bool ValidateChannel() // TODO: deprecate this - { - return Validate(); - } + bool ValidateChannel() __attribute__((deprecated("Use Validate()"))) { return Validate(); } /// Validates channel configuration /// @return true if channel settings are valid, false otherwise. diff --git a/fairmq/FairMQDevice.cxx b/fairmq/FairMQDevice.cxx index ad99e4bd..804405dd 100644 --- a/fairmq/FairMQDevice.cxx +++ b/fairmq/FairMQDevice.cxx @@ -293,7 +293,7 @@ void FairMQDevice::ConnectWrapper() this_thread::sleep_for(chrono::milliseconds(sleepTimeInMS)); for (auto& chan : fUninitializedConnectingChannels) { - string key{"chans." + chan->GetChannelPrefix() + "." + chan->GetChannelIndex() + ".address"}; + string key{"chans." + chan->GetPrefix() + "." + chan->GetIndex() + ".address"}; string newAddress = fConfig->GetValue(key); if (newAddress != chan->GetAddress()) { chan->UpdateAddress(newAddress); @@ -322,7 +322,7 @@ void FairMQDevice::AttachChannels(vector& chans) auto itr = chans.begin(); while (itr != chans.end()) { - if ((*itr)->ValidateChannel()) { + if ((*itr)->Validate()) { (*itr)->Init(); if (AttachChannel(**itr)) { (*itr)->SetModified(false); diff --git a/test/channel/_channel.cxx b/test/channel/_channel.cxx index 024b5b64..dd3ecf95 100644 --- a/test/channel/_channel.cxx +++ b/test/channel/_channel.cxx @@ -85,8 +85,8 @@ TEST(Channel, Validation) ASSERT_EQ(channel2.IsValid(), true); ASSERT_EQ(channel2.Validate(), true); - channel2.UpdateChannelName("Kanal"); - ASSERT_EQ(channel2.GetChannelName(), "Kanal"); + channel2.UpdateName("Kanal"); + ASSERT_EQ(channel2.GetName(), "Kanal"); channel2.ResetChannel(); ASSERT_EQ(channel2.IsValid(), false);