utils/print-introspected-doxygen.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sun, 02 Mar 2008 21:57:28 +0100
changeset 2533 80cdc3eec057
parent 2502 50d0da37f02f
child 2540 4e9ba43f7b9e
permissions -rw-r--r--
do not use Queue::CreateDefault
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
#include "ns3/internet-node.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
#include "ns3/ptr.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
#include "ns3/trace-resolver.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
#include "ns3/node-list.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
#include "ns3/point-to-point-net-device.h"
1376
ad7e61edfb9d merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1375
diff changeset
     6
#include "ns3/csma-net-device.h"
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
#include "ns3/queue.h"
2533
80cdc3eec057 do not use Queue::CreateDefault
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2502
diff changeset
     8
#include "ns3/drop-tail-queue.h"
1375
4f45bec005b8 document also mobility model notifier
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1371
diff changeset
     9
#include "ns3/mobility-model-notifier.h"
1853
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    10
#include "ns3/default-value.h"
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
    11
#include "ns3/string.h"
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
using namespace ns3;
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    15
void
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    16
PrintSimpleText (const TraceResolver::SourceCollection *sources, std::ostream &os)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    17
{
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    18
  for (TraceResolver::SourceCollection::Iterator i = sources->Begin (); i != sources->End (); i++)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    19
    {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    20
      os << "source=" << i->path << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    21
      os << "TraceContext=[";
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    22
      i->context.PrintAvailable (os, ",");
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    23
      os << "]" << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    24
      os << "help=\"" << i->doc.GetHelp () << "\"" << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    25
      os << "void TraceSinkCallback (const TraceContext &";
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    26
      for (TraceDoc::Iterator k = i->doc.ArgsBegin (); k != i->doc.ArgsEnd (); k++)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    27
        {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    28
          os << ", " << k->first;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    29
        }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    30
      os << ")" << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    31
      os << "argument 1  --  the trace context associated to the connected trace source." << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    32
      uint32_t k = 2;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    33
      for (TraceDoc::Iterator j = i->doc.ArgsBegin (); j != i->doc.ArgsEnd (); j++)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    34
        {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    35
          os << "argument " << k << "  --  " << j->second << "." << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    36
          k++;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    37
        }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    38
      os << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    39
    }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    40
}
1853
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    41
static void
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    42
PrintDoxygenText (const TraceResolver::SourceCollection *sources, std::ostream &os)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    43
{
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    44
  uint32_t z = 0;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    45
  for (TraceResolver::SourceCollection::Iterator i = sources->Begin (); i != sources->End (); i++)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    46
    {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    47
      os << "///" << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    48
      os << "/// \\ingroup TraceSourceList" << std::endl; 
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    49
      os << "/// \\brief " << i->doc.GetHelp () << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    50
      os << "/// \\param arg1 the trace context associated to the connected trace source." << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    51
      uint32_t j = 2;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    52
      for (TraceDoc::Iterator l = i->doc.ArgsBegin (); l != i->doc.ArgsEnd (); l++)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    53
        {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    54
          os << "/// \\param arg" << j << " " << l->second << "." << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    55
          j++;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    56
        }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    57
      os << "///" << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    58
      os << "///" << std::endl;
1538
7f18d8c94d10 In trace sources list documentation, make the trace path stand out better, as it is extremely important but previously easy to miss.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1400
diff changeset
    59
      os << "/// The path to this trace source is: <b><tt>\"" << i->path << "\"</tt></b>." << std::endl;
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    60
      os << "///" << std::endl;
1400
382b2a36384c rewrite the TraceContext::SourceCollection::Iterator class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1399
diff changeset
    61
      if (i->context.Begin ().IsLast ())
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    62
        {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    63
          os << "/// No data can be extracted from \\p arg1 with ns3::TraceContext::GetElement." << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    64
        }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    65
      else
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    66
        {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    67
          os << "/// The following classes can be extracted from \\p arg1 with " << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    68
          os << "/// ns3::TraceContext::GetElement:" << std::endl;
1400
382b2a36384c rewrite the TraceContext::SourceCollection::Iterator class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1399
diff changeset
    69
          for (TraceContext::Iterator m = i->context.Begin (); !m.IsLast (); m.Next ())
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    70
            {
1400
382b2a36384c rewrite the TraceContext::SourceCollection::Iterator class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1399
diff changeset
    71
              os << "///  - " << m.Get () << std::endl;
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    72
            }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    73
        }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    74
      os << "void TraceSinkCallback" << z << " (const TraceContext & arg1" ;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    75
      j = 2;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    76
      for (TraceDoc::Iterator k = i->doc.ArgsBegin (); k != i->doc.ArgsEnd (); k++)
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    77
        {
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    78
          os << ", " << k->first << " arg" << j;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    79
          j++;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    80
        }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    81
      os << ");" << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    82
      os << std::endl;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    83
      z++;
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    84
    }
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    85
}
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    86
1853
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    87
static void
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    88
PrintOneDefaultValue (DefaultValueBase *value, std::ostream &os)
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    89
{
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    90
  os << "///  <li> \\anchor DefaultValue" << value->GetName ()
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    91
     << " " << value->GetName () << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    92
  os << "///    <ul>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    93
  os << "///         <li>Type: " << value->GetType () << "</td></tr>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    94
  os << "///         <li>Default value: " << value->GetDefaultValue () << "</td></tr>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    95
  os << "///         <li>Description: " << value->GetHelp () << "</td></tr>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    96
  os << "///    </ul>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    97
  os << "///  </li>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    98
}
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    99
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   100
static void
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   101
PrintDefaultValuesDoxygen (std::ostream &os)
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   102
{
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   103
  os << "/// \\page ListOfDefaultValues The list of default values" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   104
  os << "/// \\defgroup ListOfDefaultValuesGroup The list of default values" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   105
  os << "/// <ul>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   106
  for (DefaultValueList::Iterator i = DefaultValueList::Begin ();
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   107
       i != DefaultValueList::End (); i++)
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   108
    {
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   109
      if ((*i)->GetName () == "help")
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   110
	{
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   111
	  continue;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   112
	}
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   113
      PrintOneDefaultValue (*i, os);
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   114
    }
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   115
  os << "/// </ul>" << std::endl;
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   116
}
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   117
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
   118
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   119
int main (int argc, char *argv[])
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   120
{
2230
9f13ac3291e0 add CreateObject<> to instanciate subclasses of the Object base class. Replaces Create<>.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1855
diff changeset
   121
  Ptr<Node> node = CreateObject<InternetNode> ();
2258
666099a753e0 AddInterface -> AggregateObject
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2253
diff changeset
   122
  node->AggregateObject (CreateObject<MobilityModelNotifier> ());
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   123
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
   124
  Ptr<PointToPointNetDevice> p2p = CreateObjectWith<PointToPointNetDevice> ("Node", node, 
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
   125
									    "Address", Mac48Address::Allocate ());
2470
254581fb9e9c make NetDevice fully virtual.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2258
diff changeset
   126
  node->AddDevice (p2p);
2533
80cdc3eec057 do not use Queue::CreateDefault
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2502
diff changeset
   127
  p2p->AddQueue (CreateObject<DropTailQueue> ());
2500
1fb9430f642d convert CsmaNetDevice to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2470
diff changeset
   128
  Ptr<CsmaNetDevice> csma = CreateObjectWith<CsmaNetDevice> ("Node", node, 
1fb9430f642d convert CsmaNetDevice to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2470
diff changeset
   129
							     "Address", Mac48Address::Allocate (),
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
   130
							     "EncapsulationMode", String ("Llc"));
2470
254581fb9e9c make NetDevice fully virtual.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2258
diff changeset
   131
  node->AddDevice (csma);
2533
80cdc3eec057 do not use Queue::CreateDefault
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2502
diff changeset
   132
  csma->AddQueue (CreateObject<DropTailQueue> ());
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   133
1371
bebf690257c9 replace TraceResolver::PrintAvailable with TraceResolver::CollectSources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1368
diff changeset
   134
  TraceResolver::SourceCollection collection;
bebf690257c9 replace TraceResolver::PrintAvailable with TraceResolver::CollectSources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1368
diff changeset
   135
  NodeList::GetTraceResolver ()->CollectSources ("", TraceContext (), &collection);
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
   136
  PrintDoxygenText (&collection, std::cout);
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   137
1853
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   138
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   139
  PrintDefaultValuesDoxygen (std::cout);
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   140
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   141
  return 0;
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   142
}