--- a/src/core/array-trace-resolver.h Mon Aug 27 13:15:27 2007 +0200
+++ b/src/core/array-trace-resolver.h Mon Aug 27 13:21:59 2007 +0200
@@ -137,7 +137,7 @@
{
TraceContext tmp = context;
INDEX index = j;
- tmp.Add (index);
+ tmp.AddElement (index);
Ptr<Object> obj = m_iter->Get ();
obj->TraceConnect (subpath, cb, tmp);
j++;
--- a/src/core/callback-trace-source.h Mon Aug 27 13:15:27 2007 +0200
+++ b/src/core/callback-trace-source.h Mon Aug 27 13:21:59 2007 +0200
@@ -75,7 +75,7 @@
{
Callback<void,TraceContext const &,T1,T2,T3,T4> cb;
cb.Assign (callback);
- m_context.Add (context);
+ m_context.Union (context);
m_callbackList.push_back (cb);
}
template<typename T1, typename T2,
--- a/src/core/composite-trace-resolver.cc Mon Aug 27 13:15:27 2007 +0200
+++ b/src/core/composite-trace-resolver.cc Mon Aug 27 13:21:59 2007 +0200
@@ -231,7 +231,7 @@
case CONNECT: {
NS_DEBUG ("connect to path="<<subpath<<" name="<<(*i)->name);
TraceContext ctx = context;
- ctx.Add ((*i)->context);
+ ctx.Union ((*i)->context);
(*i)->Connect (subpath, cb, ctx);
} break;
case DISCONNECT:
--- a/src/core/composite-trace-resolver.h Mon Aug 27 13:15:27 2007 +0200
+++ b/src/core/composite-trace-resolver.h Mon Aug 27 13:21:59 2007 +0200
@@ -145,7 +145,7 @@
T const &context)
{
TraceContext ctx;
- ctx.Add (context);
+ ctx.AddElement (context);
DoAddSource (name, trace, ctx);
}
@@ -176,7 +176,7 @@
CompositeTraceResolver::AddChild (std::string name, Ptr<Object> child, const T &contextElement)
{
TraceContext context;
- context.Add (contextElement);
+ context.AddElement (contextElement);
DoAddChild (name, child, context);
}
--- a/src/core/trace-context.cc Mon Aug 27 13:15:27 2007 +0200
+++ b/src/core/trace-context.cc Mon Aug 27 13:21:59 2007 +0200
@@ -68,7 +68,7 @@
}
void
-TraceContext::Add (TraceContext const &o)
+TraceContext::Union (TraceContext const &o)
{
if (o.m_data == 0)
{
@@ -284,14 +284,14 @@
{
ok = false;
}
- ctx.Add (v0);
- ctx.Add (v0);
+ ctx.AddElement (v0);
+ ctx.AddElement (v0);
if (ctx.SafeAdd (v01))
{
ok = false;
}
ctx.Get (v0);
- ctx.Add (v1);
+ ctx.AddElement (v1);
ctx.Get (v1);
ctx.Get (v0);
ctx.Get (v1);
@@ -301,11 +301,11 @@
ctx.Get (v1);
copy.Get (v0);
copy.Get (v1);
- copy.Add (v2);
+ copy.AddElement (v2);
copy.Get (v0);
copy.Get (v1);
copy.Get (v2);
- ctx.Add (v3);
+ ctx.AddElement (v3);
ctx.Get (v0);
ctx.Get (v1);
ctx.Get (v3);
@@ -318,13 +318,13 @@
{
ok = false;
}
- ctx.Add (copy);
+ ctx.Union (copy);
ctx.Get (v2);
if (copy.SafeGet (v3))
{
ok = false;
}
- copy.Add (ctx);
+ copy.Union (ctx);
copy.Get (v3);
return ok;
--- a/src/core/trace-context.h Mon Aug 27 13:15:27 2007 +0200
+++ b/src/core/trace-context.h Mon Aug 27 13:21:59 2007 +0200
@@ -41,8 +41,8 @@
* using Copy On Write which means that copying unmodified
* versions of this class is very cheap. However, modifying
* the content of this class through a call
- * to ns3::TraceContext::Add will trigger a costly memory
- * reallocation if needed.
+ * to ns3::TraceContext::AddElement or ns3::TraceContext::Union
+ * will trigger a costly memory reallocation if needed.
*/
class TraceContext
{
@@ -56,7 +56,7 @@
* \param context add context to list of trace contexts.
*/
template <typename T>
- void Add (T const &context);
+ void AddElement (T const &context);
/**
* \param o the other context
@@ -68,7 +68,7 @@
* to store a single TraceContext instance per connected sink.
* Instead, all sinks share the same TraceContext.
*/
- void Add (TraceContext const &o);
+ void Union (TraceContext const &o);
/**
* \param context context to get from this list of trace contexts.
@@ -107,7 +107,7 @@
template <typename T>
void
-TraceContext::Add (T const &context)
+TraceContext::AddElement (T const &context)
{
const TraceContextElement *parent;
// if the following assignment fails, it is because the input