--- a/src/common/data-rate.h Mon May 26 11:48:18 2008 -0700
+++ b/src/common/data-rate.h Mon May 26 21:41:23 2008 -0700
@@ -80,7 +80,6 @@
*/
uint64_t GetBitRate() const;
- ATTRIBUTE_HELPER_HEADER_1 (DataRate);
private:
uint64_t m_bps;
static uint64_t Parse(const std::string);
@@ -94,7 +93,7 @@
* \brief hold objects of type ns3::DataRate
*/
-ATTRIBUTE_HELPER_HEADER_2 (DataRate);
+ATTRIBUTE_HELPER_HEADER (DataRate);
/**
* \param lhs
--- a/src/contrib/gtk-config-store.cc Mon May 26 11:48:18 2008 -0700
+++ b/src/contrib/gtk-config-store.cc Mon May 26 21:41:23 2008 -0700
@@ -304,7 +304,7 @@
}
break;
case ModelNode::NODE_ATTRIBUTE: {
- uint32_t attrIndex;
+ uint32_t attrIndex = 0;
TypeId tid;
for (tid = node->object->GetInstanceTypeId (); tid.HasParent (); tid = tid.GetParent ())
{
--- a/src/core/attribute-helper.h Mon May 26 11:48:18 2008 -0700
+++ b/src/core/attribute-helper.h Mon May 26 21:41:23 2008 -0700
@@ -83,8 +83,7 @@
*
* The simple macros are implemented in terms of the complex
* macros and should generally be prefered over the complex macros:
- * - \ref ATTRIBUTE_HELPER_HEADER_1,
- * - \ref ATTRIBUTE_HELPER_HEADER_2, and,
+ * - \ref ATTRIBUTE_HELPER_HEADER, and,
* - \ref ATTRIBUTE_HELPER_CPP,
*/
@@ -236,19 +235,10 @@
* \ingroup AttributeHelper
* \param type the name of the class
*
- * This macro should be invoked from a public section of the class
- * declaration.
- */
-#define ATTRIBUTE_HELPER_HEADER_1(type)
-
-/**
- * \ingroup AttributeHelper
- * \param type the name of the class
- *
* This macro should be invoked outside of the class
* declaration in its public header.
*/
-#define ATTRIBUTE_HELPER_HEADER_2(type) \
+#define ATTRIBUTE_HELPER_HEADER(type) \
ATTRIBUTE_VALUE_DEFINE (type); \
ATTRIBUTE_ACCESSOR_DEFINE (type); \
ATTRIBUTE_CHECKER_DEFINE (type);
--- a/src/core/attribute-test.cc Mon May 26 11:48:18 2008 -0700
+++ b/src/core/attribute-test.cc Mon May 26 21:41:23 2008 -0700
@@ -53,7 +53,7 @@
{
return is;
}
-ATTRIBUTE_HELPER_HEADER_2 (ValueClassTest);
+ATTRIBUTE_HELPER_HEADER (ValueClassTest);
ATTRIBUTE_HELPER_CPP (ValueClassTest);
class AttributeTest : public Test
--- a/src/core/log.h Mon May 26 11:48:18 2008 -0700
+++ b/src/core/log.h Mon May 26 21:41:23 2008 -0700
@@ -69,7 +69,7 @@
#define NS_LOG_COMPONENT_DEFINE(name) \
static ns3::LogComponent g_log = ns3::LogComponent (name)
-#define APPEND_TIME_PREFIX \
+#define NS_LOG_APPEND_TIME_PREFIX \
if (g_log.IsEnabled (ns3::LOG_PREFIX_TIME)) \
{ \
LogTimePrinter printer = LogGetTimePrinter (); \
@@ -80,13 +80,17 @@
} \
}
-#define APPEND_FUNC_PREFIX \
+#define NS_LOG_APPEND_FUNC_PREFIX \
if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC)) \
{ \
std::clog << g_log.Name () << ":" << \
__FUNCTION__ << "(): "; \
} \
+#ifndef NS_LOG_APPEND_CONTEXT
+#define NS_LOG_APPEND_CONTEXT
+#endif /* NS_LOG_APPEND_CONTEXT */
+
/**
* \ingroup logging
@@ -107,8 +111,9 @@
{ \
if (g_log.IsEnabled (level)) \
{ \
- APPEND_TIME_PREFIX; \
- APPEND_FUNC_PREFIX; \
+ NS_LOG_APPEND_TIME_PREFIX; \
+ NS_LOG_APPEND_CONTEXT; \
+ NS_LOG_APPEND_FUNC_PREFIX; \
std::clog << msg << std::endl; \
} \
} \
@@ -160,7 +165,8 @@
{ \
if (g_log.IsEnabled (ns3::LOG_FUNCTION)) \
{ \
- APPEND_TIME_PREFIX; \
+ NS_LOG_APPEND_TIME_PREFIX; \
+ NS_LOG_APPEND_CONTEXT; \
std::clog << g_log.Name () << ":" \
<< __FUNCTION__ << "()" << std::endl; \
} \
@@ -189,7 +195,8 @@
{ \
if (g_log.IsEnabled (ns3::LOG_FUNCTION)) \
{ \
- APPEND_TIME_PREFIX; \
+ NS_LOG_APPEND_TIME_PREFIX; \
+ NS_LOG_APPEND_CONTEXT; \
std::clog << g_log.Name () << ":" \
<< __FUNCTION__ << "("; \
ParameterLogger (std::clog) << parameters; \
--- a/src/core/object-factory.h Mon May 26 11:48:18 2008 -0700
+++ b/src/core/object-factory.h Mon May 26 21:41:23 2008 -0700
@@ -77,7 +77,6 @@
template <typename T>
Ptr<T> Create (void) const;
- ATTRIBUTE_HELPER_HEADER_1 (ObjectFactory);
private:
friend std::ostream & operator << (std::ostream &os, const ObjectFactory &factory);
friend std::istream & operator >> (std::istream &is, ObjectFactory &factory);
@@ -94,7 +93,7 @@
* \brief hold objects of type ns3::ObjectFactory
*/
-ATTRIBUTE_HELPER_HEADER_2 (ObjectFactory);
+ATTRIBUTE_HELPER_HEADER (ObjectFactory);
} // namespace ns3
--- a/src/core/type-id.h Mon May 26 11:48:18 2008 -0700
+++ b/src/core/type-id.h Mon May 26 21:41:23 2008 -0700
@@ -354,7 +354,6 @@
TypeId ();
~TypeId ();
- ATTRIBUTE_HELPER_HEADER_1 (TypeId);
private:
friend class AttributeList;
friend bool operator == (TypeId a, TypeId b);
@@ -388,7 +387,7 @@
*/
-ATTRIBUTE_HELPER_HEADER_2 (TypeId);
+ATTRIBUTE_HELPER_HEADER (TypeId);
} // namespace ns3
--- a/src/devices/wifi/ssid.h Mon May 26 11:48:18 2008 -0700
+++ b/src/devices/wifi/ssid.h Mon May 26 21:41:23 2008 -0700
@@ -49,7 +49,6 @@
Buffer::Iterator Serialize (Buffer::Iterator i) const;
Buffer::Iterator Deserialize (Buffer::Iterator i);
- ATTRIBUTE_HELPER_HEADER_1 (Ssid);
private:
uint8_t m_ssid[33];
uint8_t m_length;
@@ -63,7 +62,7 @@
* \brief hold objects of type ns3::Ssid
*/
-ATTRIBUTE_HELPER_HEADER_2 (Ssid);
+ATTRIBUTE_HELPER_HEADER (Ssid);
} // namespace ns3
--- a/src/devices/wifi/wifi-mode.h Mon May 26 11:48:18 2008 -0700
+++ b/src/devices/wifi/wifi-mode.h Mon May 26 21:41:23 2008 -0700
@@ -107,7 +107,6 @@
*/
WifiMode ();
- ATTRIBUTE_HELPER_HEADER_1 (WifiMode);
private:
friend class WifiModeFactory;
WifiMode (uint32_t uid);
@@ -123,7 +122,7 @@
* \brief hold objects of type ns3::WifiMode
*/
-ATTRIBUTE_HELPER_HEADER_2 (WifiMode);
+ATTRIBUTE_HELPER_HEADER (WifiMode);
/**
* \brief create WifiMode class instances and keep track of them.
--- a/src/mobility/rectangle.h Mon May 26 11:48:18 2008 -0700
+++ b/src/mobility/rectangle.h Mon May 26 21:41:23 2008 -0700
@@ -61,8 +61,6 @@
double xMax;
double yMin;
double yMax;
-
- ATTRIBUTE_HELPER_HEADER_1 (Rectangle);
};
std::ostream &operator << (std::ostream &os, const Rectangle &rectangle);
@@ -73,7 +71,7 @@
* \brief hold objects of type ns3::Rectangle
*/
-ATTRIBUTE_HELPER_HEADER_2 (Rectangle);
+ATTRIBUTE_HELPER_HEADER (Rectangle);
} // namespace ns3
--- a/src/mobility/vector.h Mon May 26 11:48:18 2008 -0700
+++ b/src/mobility/vector.h Mon May 26 21:41:23 2008 -0700
@@ -57,8 +57,6 @@
* z coordinate of vector vector
*/
double z;
-
- ATTRIBUTE_HELPER_HEADER_1 (Vector);
};
double CalculateDistance (const Vector &a, const Vector &b);
@@ -68,7 +66,7 @@
* \brief hold objects of type ns3::Vector
*/
-ATTRIBUTE_HELPER_HEADER_2 (Vector);
+ATTRIBUTE_HELPER_HEADER (Vector);
std::ostream &operator << (std::ostream &os, const Vector &vector);
std::istream &operator >> (std::istream &is, Vector &vector);
--- a/src/node/address.h Mon May 26 11:48:18 2008 -0700
+++ b/src/node/address.h Mon May 26 21:41:23 2008 -0700
@@ -175,7 +175,6 @@
*/
static Address Deserialize (const uint8_t* buf);
- ATTRIBUTE_HELPER_HEADER_1 (Address);
private:
friend bool operator == (const Address &a, const Address &b);
friend bool operator < (const Address &a, const Address &b);
@@ -192,7 +191,7 @@
* \brief hold objects of type ns3::Address
*/
-ATTRIBUTE_HELPER_HEADER_2 (Address);
+ATTRIBUTE_HELPER_HEADER (Address);
bool operator == (const Address &a, const Address &b);
bool operator != (const Address &a, const Address &b);
--- a/src/node/ipv4-address.h Mon May 26 11:48:18 2008 -0700
+++ b/src/node/ipv4-address.h Mon May 26 21:41:23 2008 -0700
@@ -142,7 +142,6 @@
static Ipv4Address GetBroadcast (void);
static Ipv4Address GetLoopback (void);
- ATTRIBUTE_HELPER_HEADER_1 (Ipv4Address);
private:
Address ConvertTo (void) const;
static uint8_t GetType (void);
@@ -180,7 +179,6 @@
static Ipv4Mask GetLoopback (void);
static Ipv4Mask GetZero (void);
- ATTRIBUTE_HELPER_HEADER_1 (Ipv4Mask);
private:
uint32_t m_mask;
};
@@ -194,8 +192,8 @@
* \brief hold objects of type ns3::Ipv4Mask
*/
-ATTRIBUTE_HELPER_HEADER_2 (Ipv4Address);
-ATTRIBUTE_HELPER_HEADER_2 (Ipv4Mask);
+ATTRIBUTE_HELPER_HEADER (Ipv4Address);
+ATTRIBUTE_HELPER_HEADER (Ipv4Mask);
std::ostream& operator<< (std::ostream& os, Ipv4Address const& address);
std::ostream& operator<< (std::ostream& os, Ipv4Mask const& mask);
--- a/src/node/mac48-address.h Mon May 26 11:48:18 2008 -0700
+++ b/src/node/mac48-address.h Mon May 26 21:41:23 2008 -0700
@@ -96,7 +96,6 @@
*/
static Mac48Address GetBroadcast (void);
- ATTRIBUTE_HELPER_HEADER_1 (Mac48Address);
private:
/**
* \returns a new Address instance
@@ -117,7 +116,7 @@
* \brief hold objects of type ns3::Mac48Address
*/
-ATTRIBUTE_HELPER_HEADER_2 (Mac48Address);
+ATTRIBUTE_HELPER_HEADER (Mac48Address);
bool operator == (const Mac48Address &a, const Mac48Address &b);
bool operator != (const Mac48Address &a, const Mac48Address &b);