diff --git a/CHANGES.html b/CHANGES.html
index 2a3c8b49e..7420262f4 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -59,6 +59,7 @@ us a note on ns-developers mailing list.
With the new support for IPv6 Nix-Vector routing, we have all the new APIs corresponding to IPv4 Nix-Vector routing. Specific to the user, there is an Ipv6NixVectorHelper class which can be set in the InternetStackHelper, and works similar to Ipv4NixVectorHelper.
In class Ipv4InterfaceAddress, a new function IsInSameSubnet () is added to check if both the IPv4 addresses are in the same subnet. Also, it is consistent with Ipv6InterfaceAddress::IsInSameSubnet ().
In class ConfigStore, a new Attribue SaveDeprecated allows to not save DEPRECATED Attributes. The default value is false (save DEPRECATED Attributes).
+In class TracedCallback, a new function IsEmpty allows to know if the TracedCallback will call any callback.
Changes to existing API:
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 8dd510880..b24fd480f 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -35,6 +35,7 @@ New user-visible features
- (nix-vector-routing) Nix-Vector routing supports topologies with multiple WiFi networks using the same WiFi channel object.
- (config-store) OBSOLETE Attributes are not anymore saved.
- (config-store) New ConfigStore::SaveDeprecated Attribute (default false) to avoid to save DEPRECATED attributes.
+- (core) Add TracedCallback::IsEmpty to know if a TracedCallback has any callback associated.
Bugs fixed
----------
diff --git a/src/core/model/traced-callback.h b/src/core/model/traced-callback.h
index b264953cc..83dc75852 100644
--- a/src/core/model/traced-callback.h
+++ b/src/core/model/traced-callback.h
@@ -89,6 +89,11 @@ public:
* \param [in] args The arguments to the functor
*/
void operator() (Ts... args) const;
+ /**
+ * \brief Checks if the Callbacks list is empty.
+ * \return true if the Callbacks list is empty.
+ */
+ bool IsEmpty () const;
/**
* TracedCallback signature for POD.
@@ -188,6 +193,13 @@ TracedCallback::operator() (Ts... args) const
}
}
+template
+bool
+TracedCallback::IsEmpty () const
+{
+ return m_callbackList.empty ();
+}
+
} // namespace ns3
#endif /* TRACED_CALLBACK_H */