1.1 --- a/src/core/attribute-list.cc Sat May 31 16:14:49 2008 +0100
1.2 +++ b/src/core/attribute-list.cc Mon Jun 02 10:30:24 2008 -0700
1.3 @@ -212,7 +212,7 @@
1.4 std::string::size_type equal = str.find ("=", cur);
1.5 if (equal == std::string::npos)
1.6 {
1.7 - // XXX: invalid attribute.
1.8 + NS_FATAL_ERROR ("Error while parsing serialized attribute: \"" << str << "\"");
1.9 break;
1.10 }
1.11 else
1.12 @@ -221,7 +221,7 @@
1.13 struct TypeId::AttributeInfo info;
1.14 if (!TypeId::LookupAttributeByFullName (name, &info))
1.15 {
1.16 - // XXX invalid name.
1.17 + NS_FATAL_ERROR ("Error while parsing serialized attribute: name does not exist: \"" << name << "\"");
1.18 break;
1.19 }
1.20 else
1.21 @@ -242,7 +242,7 @@
1.22 bool ok = val->DeserializeFromString (value, info.checker);
1.23 if (!ok)
1.24 {
1.25 - // XXX invalid value
1.26 + NS_FATAL_ERROR ("Error while parsing serialized attribute: value invalid: \"" << value << "\"");
1.27 break;
1.28 }
1.29 else
2.1 --- a/src/core/attribute-list.h Sat May 31 16:14:49 2008 +0100
2.2 +++ b/src/core/attribute-list.h Mon Jun 02 10:30:24 2008 -0700
2.3 @@ -87,7 +87,6 @@
2.4 */
2.5 static AttributeList *GetGlobal (void);
2.6
2.7 - // XXX: untested.
2.8 std::string SerializeToString (void) const;
2.9 bool DeserializeFromString (std::string value);
2.10 private:
3.1 --- a/src/core/attribute-test.cc Sat May 31 16:14:49 2008 +0100
3.2 +++ b/src/core/attribute-test.cc Mon Jun 02 10:30:24 2008 -0700
3.3 @@ -167,7 +167,7 @@
3.4 MakeTraceSourceAccessor (&AttributeObjectTest::m_cb))
3.5 .AddTraceSource ("ValueSource", "help text",
3.6 MakeTraceSourceAccessor (&AttributeObjectTest::m_valueSrc))
3.7 - .AddAttribute ("Pointer", "XXX",
3.8 + .AddAttribute ("Pointer", "help text",
3.9 PointerValue (),
3.10 MakePointerAccessor (&AttributeObjectTest::m_ptr),
3.11 MakePointerChecker<Derived> ())
4.1 --- a/src/core/attribute.h Sat May 31 16:14:49 2008 +0100
4.2 +++ b/src/core/attribute.h Mon Jun 02 10:30:24 2008 -0700
4.3 @@ -144,7 +144,7 @@
4.4 * to detect the type of the associated attribute.
4.5 *
4.6 * Most subclasses of this base class are implemented by the
4.7 - * ATTRIBUTE_HELPER_* macros.
4.8 + * \ref ATTRIBUTE_HELPER_HEADER and \ref ATTRIBUTE_HELPER_CPP macros.
4.9 */
4.10 class AttributeChecker : public RefCountBase
4.11 {
5.1 --- a/src/core/command-line.h Sat May 31 16:14:49 2008 +0100
5.2 +++ b/src/core/command-line.h Mon Jun 02 10:30:24 2008 -0700
5.3 @@ -28,6 +28,7 @@
5.4
5.5 /**
5.6 * \brief parse command-line arguments
5.7 + * \ingroup core
5.8 *
5.9 * Instances of this class can be used to parse command-line
5.10 * arguments: users can register new arguments with
6.1 --- a/src/core/config.h Sat May 31 16:14:49 2008 +0100
6.2 +++ b/src/core/config.h Mon Jun 02 10:30:24 2008 -0700
6.3 @@ -29,6 +29,10 @@
6.4 class Object;
6.5 class CallbackBase;
6.6
6.7 +/**
6.8 + * \brief Configuration of simulation parameters and tracing
6.9 + * \ingroup core
6.10 + */
6.11 namespace Config {
6.12
6.13 /**
7.1 --- a/src/core/object-vector.cc Sat May 31 16:14:49 2008 +0100
7.2 +++ b/src/core/object-vector.cc Mon Jun 02 10:30:24 2008 -0700
7.3 @@ -34,8 +34,16 @@
7.4 std::string
7.5 ObjectVectorValue::SerializeToString (Ptr<const AttributeChecker> checker) const
7.6 {
7.7 - // XXX
7.8 - return "";
7.9 + std::ostringstream oss;
7.10 + for (uint32_t i = 0; i < m_objects.size (); ++i)
7.11 + {
7.12 + oss << m_objects[i];
7.13 + if (i != m_objects.size () - 1)
7.14 + {
7.15 + oss << " ";
7.16 + }
7.17 + }
7.18 + return oss.str ();
7.19 }
7.20 bool
7.21 ObjectVectorValue::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker)
8.1 --- a/src/core/object.h Sat May 31 16:14:49 2008 +0100
8.2 +++ b/src/core/object.h Mon Jun 02 10:30:24 2008 -0700
8.3 @@ -46,6 +46,14 @@
8.4 * \ingroup object
8.5 * \brief a base class which provides memory management and object aggregation
8.6 *
8.7 + * The memory management scheme is based on reference-counting with dispose-like
8.8 + * functionality to break the reference cycles. The reference count is increamented
8.9 + * and decremented with the methods Object::Ref and Object::Unref. If a reference cycle is
8.10 + * present, the user is responsible for breaking it by calling Object::Dispose in
8.11 + * a single location. This will eventually trigger the invocation of Object::DoDispose
8.12 + * on itself and all its aggregates. The Object::DoDispose method is always automatically
8.13 + * invoked from the Object::Unref method before destroying the object, even if the user
8.14 + * did not call Object::Dispose directly.
8.15 */
8.16 class Object : public ObjectBase
8.17 {
9.1 --- a/src/core/singleton.h Sat May 31 16:14:49 2008 +0100
9.2 +++ b/src/core/singleton.h Mon Jun 02 10:30:24 2008 -0700
9.3 @@ -22,6 +22,17 @@
9.4
9.5 namespace ns3 {
9.6
9.7 +/**
9.8 + * \brief a template singleton
9.9 + *
9.10 + * This template class can be used to implement the singleton pattern.
9.11 + * The underlying object will be destroyed automatically when the process
9.12 + * exits. Note that, if you call Singleton::Get again after the object has
9.13 + * been destroyed, the object will be re-created which will result in a
9.14 + * memory leak as reported by most memory leak checkers. It is up to the
9.15 + * user to ensure that Singleton::Get is never called from a static variable
9.16 + * finalizer.
9.17 + */
9.18 template <typename T>
9.19 class Singleton
9.20 {
10.1 --- a/src/core/trace-source-accessor.h Sat May 31 16:14:49 2008 +0100
10.2 +++ b/src/core/trace-source-accessor.h Mon Jun 02 10:30:24 2008 -0700
10.3 @@ -74,7 +74,10 @@
10.4 * \param a the trace source
10.5 *
10.6 * Create a TraceSourceAccessor which will control access to the underlying
10.7 - * trace source.
10.8 + * trace source. This helper template method assumes that the underlying
10.9 + * type implements a statically-polymorphic set of Connect and Disconnect
10.10 + * methods and creates a dynamic-polymorphic class to wrap the underlying
10.11 + * static-polymorphic class.
10.12 */
10.13 template <typename T>
10.14 Ptr<const TraceSourceAccessor> MakeTraceSourceAccessor (T a);
11.1 --- a/src/core/traced-value.h Sat May 31 16:14:49 2008 +0100
11.2 +++ b/src/core/traced-value.h Mon Jun 02 10:30:24 2008 -0700
11.3 @@ -47,7 +47,7 @@
11.4 * this template: this instance will behave just like
11.5 * the original class (if it did not export any special method),
11.6 * and will define Connect/DisconnectWithoutContext methods to work
11.7 - * with an ns3::TraceSourceAccessor.
11.8 + * with ns3::MakeTraceSourceAccessor.
11.9 */
11.10 template <typename T>
11.11 class TracedValue