--- a/src/core/model/boolean.cc Sat Nov 10 18:45:37 2012 +0100
+++ b/src/core/model/boolean.cc Sat Nov 10 19:16:38 2012 +0100
@@ -19,34 +19,44 @@
*/
#include "boolean.h"
#include "fatal-error.h"
+#include "log.h"
+
+NS_LOG_COMPONENT_DEFINE ("Boolean");
namespace ns3 {
BooleanValue::BooleanValue ()
: m_value (false)
{
+ NS_LOG_FUNCTION (this);
}
BooleanValue::BooleanValue (bool value)
: m_value (value)
{
+ NS_LOG_FUNCTION (this << value);
}
void
BooleanValue::Set (bool value)
{
+ NS_LOG_FUNCTION (this << value);
m_value = value;
}
bool
BooleanValue::Get (void) const
{
+ NS_LOG_FUNCTION (this);
return m_value;
}
BooleanValue::operator bool () const
{
+ NS_LOG_FUNCTION (this);
return m_value;
}
std::ostream & operator << (std::ostream &os, const BooleanValue &value)
{
+ NS_LOG_FUNCTION (&os << &value);
+
if (value.Get ())
{
os << "true";
@@ -61,11 +71,15 @@
Ptr<AttributeValue>
BooleanValue::Copy (void) const
{
+ NS_LOG_FUNCTION (this);
+
return Create<BooleanValue> (*this);
}
std::string
BooleanValue::SerializeToString (Ptr<const AttributeChecker> checker) const
{
+ NS_LOG_FUNCTION (this << checker);
+
if (m_value)
{
return "true";
@@ -78,6 +92,8 @@
bool
BooleanValue::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker)
{
+ NS_LOG_FUNCTION (this << value << checker);
+
if (value == "true" ||
value == "1" ||
value == "t")