--- a/RELEASE_NOTES Fri Feb 21 09:12:38 2014 +0100
+++ b/RELEASE_NOTES Fri Feb 21 16:25:43 2014 -0800
@@ -36,6 +36,7 @@
- Bug 1739 - The endpoint is not deallocated for UDP sockets
- Bug 1786 - os << int64x64_t prints un-normalized fractional values
- Bug 1787 - Runtime error when using AnimationInterface::EnablePacketMetadata() to fetch metadata of CSMA packet
+- Bug 1792 - Parameter logger constructor
- Bug 1808 - FlowMon relies on IPv4's Identification field to trace packets
- Bug 1821 - Setting an interface to Down state will cause various asserts in IPv6
- Bug 1837 - AODV crashes when using multiple interfaces
@@ -43,6 +44,7 @@
- Bug 1841 - FlowMonitor fails to install if IPv4 is not installed in the node
- Bug 1846 - IPv6 should send Destination Unreachable if no route is available
- Bug 1852 - cairo-wideint-private.h error cannot find definitions for fixed-width integral types
+- Bug 1853 - NS_LOG_FUNCTION broken on OSX 10.9
- Bug 1855 - SixLowPanNetDevice is not correctly indexed
Release 3.19
--- a/src/core/model/log.cc Fri Feb 21 09:12:38 2014 +0100
+++ b/src/core/model/log.cc Fri Feb 21 16:25:43 2014 -0800
@@ -254,7 +254,7 @@
return m_levels == 0;
}
-void
+void
LogComponent::Enable (enum LogLevel level)
{
m_levels |= level;
@@ -580,8 +580,7 @@
ParameterLogger::ParameterLogger (std::ostream &os)
- : std::basic_ostream<char> (os.rdbuf ()), //!< \bugid{1792}
- m_itemNumber (0),
+ : m_first (true),
m_os (os)
{
}
--- a/src/core/model/log.h Fri Feb 21 09:12:38 2014 +0100
+++ b/src/core/model/log.h Fri Feb 21 16:25:43 2014 -0800
@@ -430,27 +430,44 @@
int32_t m_levels;
std::string m_name;
};
+
+class ParameterLogger : public std::ostream
-class ParameterLogger : public std::ostream
+/**
+ * \ingroup logging
+ *
+ * Insert `, ' when streaming function arguments.
+ */
+class ParameterLogger
{
- int m_itemNumber;
- std::ostream &m_os;
+ bool m_first; //!< First argument flag, doesn't get `, '.
+ std::ostream &m_os; //!< Underlying output stream.
public:
+ /**
+ * Constructor.
+ *
+ * \param [in] os Underlying output stream.
+ */
ParameterLogger (std::ostream &os);
+ /**
+ * Write a function parameter on the output stream,
+ * separating paramters after the first by `, ' strings.
+ *
+ * \param [in] param the function parameter
+ */
template<typename T>
ParameterLogger& operator<< (T param)
{
- switch (m_itemNumber)
+ if (m_first)
{
- case 0: // first parameter
m_os << param;
- break;
- default: // parameter following a previous parameter
+ m_first = false;
+ }
+ else
+ {
m_os << ", " << param;
- break;
}
- m_itemNumber++;
return *this;
}
};