add some doxygen, remove a couple of XXX

This commit is contained in:
Mathieu Lacage
2008-06-02 10:30:24 -07:00
parent 312b8da3a3
commit 6badc137d9
11 changed files with 44 additions and 10 deletions

View File

@@ -212,7 +212,7 @@ AttributeList::DeserializeFromString (std::string str)
std::string::size_type equal = str.find ("=", cur);
if (equal == std::string::npos)
{
// XXX: invalid attribute.
NS_FATAL_ERROR ("Error while parsing serialized attribute: \"" << str << "\"");
break;
}
else
@@ -221,7 +221,7 @@ AttributeList::DeserializeFromString (std::string str)
struct TypeId::AttributeInfo info;
if (!TypeId::LookupAttributeByFullName (name, &info))
{
// XXX invalid name.
NS_FATAL_ERROR ("Error while parsing serialized attribute: name does not exist: \"" << name << "\"");
break;
}
else
@@ -242,7 +242,7 @@ AttributeList::DeserializeFromString (std::string str)
bool ok = val->DeserializeFromString (value, info.checker);
if (!ok)
{
// XXX invalid value
NS_FATAL_ERROR ("Error while parsing serialized attribute: value invalid: \"" << value << "\"");
break;
}
else

View File

@@ -87,7 +87,6 @@ public:
*/
static AttributeList *GetGlobal (void);
// XXX: untested.
std::string SerializeToString (void) const;
bool DeserializeFromString (std::string value);
private:

View File

@@ -167,7 +167,7 @@ public:
MakeTraceSourceAccessor (&AttributeObjectTest::m_cb))
.AddTraceSource ("ValueSource", "help text",
MakeTraceSourceAccessor (&AttributeObjectTest::m_valueSrc))
.AddAttribute ("Pointer", "XXX",
.AddAttribute ("Pointer", "help text",
PointerValue (),
MakePointerAccessor (&AttributeObjectTest::m_ptr),
MakePointerChecker<Derived> ())

View File

@@ -144,7 +144,7 @@ public:
* to detect the type of the associated attribute.
*
* Most subclasses of this base class are implemented by the
* ATTRIBUTE_HELPER_* macros.
* \ref ATTRIBUTE_HELPER_HEADER and \ref ATTRIBUTE_HELPER_CPP macros.
*/
class AttributeChecker : public RefCountBase
{

View File

@@ -28,6 +28,7 @@ namespace ns3 {
/**
* \brief parse command-line arguments
* \ingroup core
*
* Instances of this class can be used to parse command-line
* arguments: users can register new arguments with

View File

@@ -29,6 +29,10 @@ class AttributeValue;
class Object;
class CallbackBase;
/**
* \brief Configuration of simulation parameters and tracing
* \ingroup core
*/
namespace Config {
/**

View File

@@ -34,8 +34,16 @@ ObjectVectorValue::Copy (void) const
std::string
ObjectVectorValue::SerializeToString (Ptr<const AttributeChecker> checker) const
{
// XXX
return "";
std::ostringstream oss;
for (uint32_t i = 0; i < m_objects.size (); ++i)
{
oss << m_objects[i];
if (i != m_objects.size () - 1)
{
oss << " ";
}
}
return oss.str ();
}
bool
ObjectVectorValue::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker)

View File

@@ -46,6 +46,14 @@ class TraceSourceAccessor;
* \ingroup object
* \brief a base class which provides memory management and object aggregation
*
* The memory management scheme is based on reference-counting with dispose-like
* functionality to break the reference cycles. The reference count is increamented
* and decremented with the methods Object::Ref and Object::Unref. If a reference cycle is
* present, the user is responsible for breaking it by calling Object::Dispose in
* a single location. This will eventually trigger the invocation of Object::DoDispose
* on itself and all its aggregates. The Object::DoDispose method is always automatically
* invoked from the Object::Unref method before destroying the object, even if the user
* did not call Object::Dispose directly.
*/
class Object : public ObjectBase
{

View File

@@ -22,6 +22,17 @@
namespace ns3 {
/**
* \brief a template singleton
*
* This template class can be used to implement the singleton pattern.
* The underlying object will be destroyed automatically when the process
* exits. Note that, if you call Singleton::Get again after the object has
* been destroyed, the object will be re-created which will result in a
* memory leak as reported by most memory leak checkers. It is up to the
* user to ensure that Singleton::Get is never called from a static variable
* finalizer.
*/
template <typename T>
class Singleton
{

View File

@@ -74,7 +74,10 @@ private:
* \param a the trace source
*
* Create a TraceSourceAccessor which will control access to the underlying
* trace source.
* trace source. This helper template method assumes that the underlying
* type implements a statically-polymorphic set of Connect and Disconnect
* methods and creates a dynamic-polymorphic class to wrap the underlying
* static-polymorphic class.
*/
template <typename T>
Ptr<const TraceSourceAccessor> MakeTraceSourceAccessor (T a);

View File

@@ -47,7 +47,7 @@ namespace ns3 {
* this template: this instance will behave just like
* the original class (if it did not export any special method),
* and will define Connect/DisconnectWithoutContext methods to work
* with an ns3::TraceSourceAccessor.
* with ns3::MakeTraceSourceAccessor.
*/
template <typename T>
class TracedValue