core (fixes #452) Add TracedCallback::IsEmpty
This commit is contained in:
@@ -59,6 +59,7 @@ us a note on ns-developers mailing list.</p>
|
||||
<li>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.</li>
|
||||
<li>In class <b>Ipv4InterfaceAddress</b>, a new function IsInSameSubnet () is added to check if both the IPv4 addresses are in the same subnet. Also, it is consistent with <b>Ipv6InterfaceAddress::IsInSameSubnet ()</b>.</li>
|
||||
<li>In class <b>ConfigStore</b>, a new Attribue <b>SaveDeprecated</b> allows to not save DEPRECATED Attributes. The default value is <b>false</b> (save DEPRECATED Attributes).</li>
|
||||
<li>In class <b>TracedCallback</b>, a new function <b>IsEmpty</b> allows to know if the TracedCallback will call any callback.</li>
|
||||
</ul>
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
|
||||
@@ -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
|
||||
----------
|
||||
|
||||
@@ -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<Ts...>::operator() (Ts... args) const
|
||||
}
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
bool
|
||||
TracedCallback<Ts...>::IsEmpty () const
|
||||
{
|
||||
return m_callbackList.empty ();
|
||||
}
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* TRACED_CALLBACK_H */
|
||||
|
||||
Reference in New Issue
Block a user