utils/print-introspected-doxygen.cc
author fmoatamr
Wed, 24 Jun 2009 09:45:31 +0200
changeset 4580 8092e3e83487
parent 4513 544c9d637ff1
child 4641 7b5db4e35985
permissions -rw-r--r--
Bug 456: doxygen introspection for trace source config paths is wrong
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
     1
#include <iostream>
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
     2
#include "ns3/object.h"
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
     3
#include "ns3/pointer.h"
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
     4
#include "ns3/object-vector.h"
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
     5
#include "ns3/config.h"
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
     6
#include "ns3/log.h"
4513
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
     7
#include "ns3/global-value.h"
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
     8
#include "ns3/string.h"
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
     9
#include "ns3/helper-module.h"
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
using namespace ns3;
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    13
NS_LOG_COMPONENT_DEFINE ("Main");
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    14
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    15
void
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    16
PrintAttributes (TypeId tid, std::ostream &os)
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    17
{
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    18
  os << "<ul>"<<std::endl;
2693
56e28e34e109 TypeId::GetAttributeListN -> TypeId::GetAttributeN
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    19
  for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    20
    {
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    21
      os << "<li><b>" << tid.GetAttributeName (j) << "</b>: "
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    22
		<< tid.GetAttributeHelp (j) << std::endl;
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    23
      Ptr<const AttributeChecker> checker = tid.GetAttributeChecker (j);
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    24
      os << "  <ul>" << std::endl 
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    25
	 << "    <li>Set with class: \\ref " <<  checker->GetValueTypeName () << "</li>" << std::endl;
2969
9d05d2a95dfa improve the auto-generated doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2964
diff changeset
    26
      if (checker->HasUnderlyingTypeInformation ())
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    27
	{
2969
9d05d2a95dfa improve the auto-generated doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2964
diff changeset
    28
	  os << "    <li>Underlying type: \\ref " << checker->GetUnderlyingTypeInformation () << "</li>" << std::endl;
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    29
	}
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    30
      uint32_t flags = tid.GetAttributeFlags (j);
2951
2a3db8645225 use HasSetter/HasGetter to improve doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2945
diff changeset
    31
      Ptr<const AttributeAccessor> accessor = tid.GetAttributeAccessor (j);
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    32
      if (flags & TypeId::ATTR_CONSTRUCT && accessor->HasSetter ())
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    33
	{
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    34
	  Ptr<const AttributeValue> initial = tid.GetAttributeInitialValue (j);
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    35
	  os << "    <li>Initial value: " << initial->SerializeToString (checker) << "</li>" << std::endl;
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    36
	}
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    37
      os << "    <li>Flags: ";
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    38
      if (flags & TypeId::ATTR_CONSTRUCT && accessor->HasSetter ())
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    39
	{
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    40
	  os << "construct ";
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
    41
	}
2951
2a3db8645225 use HasSetter/HasGetter to improve doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2945
diff changeset
    42
      if (flags & TypeId::ATTR_SET && accessor->HasSetter ())
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    43
	{
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    44
	  os << "write ";
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    45
	}
2951
2a3db8645225 use HasSetter/HasGetter to improve doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2945
diff changeset
    46
      if (flags & TypeId::ATTR_GET && accessor->HasGetter ())
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    47
	{
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    48
	  os << "read ";
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    49
	}
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    50
      os << "</li>" << std::endl;
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    51
      os << "  </ul> " << std::endl;
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    52
      
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    53
    }
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    54
  os << "</ul>" << std::endl;
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
    55
}
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    56
2945
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    57
void
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    58
PrintTraceSources (TypeId tid, std::ostream &os)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    59
{
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    60
  os << "<ul>"<<std::endl;
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    61
  for (uint32_t i = 0; i < tid.GetTraceSourceN (); ++i)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    62
    {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    63
      os << "<li><b>" << tid.GetTraceSourceName (i) << "</b>: "
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    64
	 << tid.GetTraceSourceHelp (i)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    65
	 << std::endl;
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    66
      os << "</li>" << std::endl;
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    67
    }
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    68
  os << "</ul>"<<std::endl;
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    69
}
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    70
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
    71
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    72
class StaticInformation
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    73
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    74
public:
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    75
  void RecordAggregationInfo (std::string a, std::string b);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    76
  void Gather (TypeId tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    77
  void Print (void) const;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    78
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    79
  std::vector<std::string> Get (TypeId tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    80
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    81
private:
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    82
  std::string GetCurrentPath (void) const;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    83
  void DoGather (TypeId tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    84
  void RecordOutput (TypeId tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    85
  bool HasAlreadyBeenProcessed (TypeId tid) const;
4580
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
    86
  void find_and_replace (std::string &source, const std::string find, std::string replace );
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    87
  std::vector<std::pair<TypeId,std::string> > m_output;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    88
  std::vector<std::string> m_currentPath;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    89
  std::vector<TypeId> m_alreadyProcessed;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    90
  std::vector<std::pair<TypeId,TypeId> > m_aggregates;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    91
};
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    92
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    93
void 
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    94
StaticInformation::RecordAggregationInfo (std::string a, std::string b)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    95
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    96
  m_aggregates.push_back (std::make_pair (TypeId::LookupByName (a), TypeId::LookupByName (b)));
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    97
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    98
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
    99
void 
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   100
StaticInformation::Print (void) const
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   101
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   102
  for (std::vector<std::pair<TypeId,std::string> >::const_iterator i = m_output.begin (); i != m_output.end (); ++i)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   103
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   104
      std::pair<TypeId,std::string> item = *i;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   105
      std::cout << item.first.GetName () << " -> " << item.second << std::endl;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   106
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   107
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   108
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   109
std::string
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   110
StaticInformation::GetCurrentPath (void) const
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   111
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   112
  std::ostringstream oss;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   113
  for (std::vector<std::string>::const_iterator i = m_currentPath.begin (); i != m_currentPath.end (); ++i)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   114
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   115
      std::string item = *i;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   116
      oss << "/" << item;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   117
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   118
  return oss.str ();
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   119
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   120
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   121
void
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   122
StaticInformation::RecordOutput (TypeId tid)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   123
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   124
  m_output.push_back (std::make_pair (tid, GetCurrentPath ()));
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   125
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   126
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   127
bool
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   128
StaticInformation::HasAlreadyBeenProcessed (TypeId tid) const
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   129
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   130
  for (uint32_t i = 0; i < m_alreadyProcessed.size (); ++i)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   131
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   132
      if (m_alreadyProcessed[i] == tid)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   133
	{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   134
	  return true;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   135
	}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   136
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   137
  return false;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   138
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   139
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   140
std::vector<std::string> 
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   141
StaticInformation::Get (TypeId tid)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   142
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   143
  std::vector<std::string> paths;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   144
  for (uint32_t i = 0; i < m_output.size (); ++i)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   145
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   146
      std::pair<TypeId,std::string> tmp = m_output[i];
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   147
      if (tmp.first == tid)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   148
	{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   149
	  paths.push_back (tmp.second);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   150
	}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   151
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   152
  return paths;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   153
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   154
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   155
void
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   156
StaticInformation::Gather (TypeId tid)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   157
{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   158
  DoGather (tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   159
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   160
  std::sort (m_output.begin (), m_output.end ());
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   161
  m_output.erase (std::unique (m_output.begin (), m_output.end ()), m_output.end ());
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   162
}
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   163
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   164
void 
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   165
StaticInformation::DoGather (TypeId tid)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   166
{
2989
b7eb3929096c merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2971
diff changeset
   167
  NS_LOG_FUNCTION (this);
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   168
  if (HasAlreadyBeenProcessed (tid))
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   169
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   170
      return;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   171
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   172
  RecordOutput (tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   173
  for (uint32_t i = 0; i < tid.GetAttributeN (); ++i)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   174
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   175
      Ptr<const AttributeChecker> checker = tid.GetAttributeChecker (i);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   176
      const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (checker));
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   177
      if (ptrChecker != 0)
4580
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   178
        {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   179
          TypeId pointee = ptrChecker->GetPointeeTypeId ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   180
          m_currentPath.push_back (tid.GetAttributeName (i));
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   181
          m_alreadyProcessed.push_back (tid);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   182
          DoGather (pointee);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   183
          m_alreadyProcessed.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   184
          m_currentPath.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   185
          continue;
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   186
        }
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   187
      // attempt to cast to an object vector.
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   188
      const ObjectVectorChecker *vectorChecker = dynamic_cast<const ObjectVectorChecker *> (PeekPointer (checker));
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   189
      if (vectorChecker != 0)
4580
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   190
        {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   191
          TypeId item = vectorChecker->GetItemTypeId ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   192
          m_currentPath.push_back (tid.GetAttributeName (i) + "/[i]");
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   193
          m_alreadyProcessed.push_back (tid);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   194
          DoGather (item);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   195
          m_alreadyProcessed.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   196
          m_currentPath.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   197
          continue;
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   198
        }
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   199
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   200
  for (uint32_t j = 0; j < TypeId::GetRegisteredN (); j++)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   201
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   202
      TypeId child = TypeId::GetRegistered (j);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   203
      if (child.IsChildOf (tid))
4580
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   204
        {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   205
          //please take a look at the following note for an explanation 
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   206
          std::string childName = "$%" + child.GetName ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   207
          find_and_replace(childName,"::","::%");
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   208
          m_currentPath.push_back (childName);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   209
          m_alreadyProcessed.push_back (tid);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   210
          DoGather (child);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   211
          m_alreadyProcessed.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   212
          m_currentPath.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   213
        }
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   214
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   215
  for (uint32_t k = 0; k < m_aggregates.size (); ++k)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   216
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   217
      std::pair<TypeId,TypeId> tmp = m_aggregates[k];
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   218
      if (tmp.first == tid || tmp.second == tid)
4580
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   219
        {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   220
          TypeId other;
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   221
          if (tmp.first == tid)
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   222
            {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   223
              other = tmp.second;
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   224
            }
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   225
          if (tmp.second == tid)
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   226
            {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   227
              other = tmp.first;
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   228
            }
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   229
          /**
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   230
           * Note: we insert a % in the path below to ensure that doxygen does not
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   231
           * attempt to resolve the typeid names included in the string.
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   232
           * if the name contains ::, using the % sign will remove that sign
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   233
           * resulting for instance in $ns3MobilityModel instead of $ns3::MobilityModel
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   234
           * hence the output must be in the form $%ns3::%MobilityModel in order to
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   235
           * show correctly $ns3::MobilityModel
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   236
           * We add at the beginning of the name $% and we replace all the :: in the
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   237
           * string by ::%.
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   238
           */  
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   239
          std::string name = "$%" + other.GetName ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   240
          //finding and replacing :: by ::%
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   241
          find_and_replace(name,"::","::%");
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   242
          m_currentPath.push_back (name);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   243
          m_alreadyProcessed.push_back (tid);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   244
          DoGather (other);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   245
          m_alreadyProcessed.pop_back ();
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   246
          m_currentPath.pop_back ();	  
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   247
        }
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   248
    }
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   249
}
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   250
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   251
void 
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   252
StaticInformation::find_and_replace( std::string &source, const std::string find, std::string replace )
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   253
{
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   254
  size_t j; 
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   255
  j = source.find (find);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   256
  while (j != std::string::npos ) 
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   257
    {
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   258
      source.replace (j, find.length (),replace);
8092e3e83487 Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents: 4513
diff changeset
   259
      j = source.find (find,j+1);
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   260
    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   261
}
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
   262
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   263
int main (int argc, char *argv[])
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   264
{
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   265
  NodeContainer c; c.Create (1);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   266
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   267
  StaticInformation info;
3132
b0b0abb911cd move Tcp to TcpSocketFactory
Tom Henderson <tomh@tomh.org>
parents: 3125
diff changeset
   268
  info.RecordAggregationInfo ("ns3::Node", "ns3::TcpSocketFactory");
3125
d2d8a36cfd23 s/ns3::Udp/ns3::UdpSocketFactory
Tom Henderson <tomh@tomh.org>
parents: 2989
diff changeset
   269
  info.RecordAggregationInfo ("ns3::Node", "ns3::UdpSocketFactory");
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   270
  info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory");
4364
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3588
diff changeset
   271
  info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::RoutingProtocol");
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   272
  info.RecordAggregationInfo ("ns3::Node", "ns3::MobilityModel");
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   273
  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L3Protocol");
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   274
  info.RecordAggregationInfo ("ns3::Node", "ns3::ArpL3Protocol");
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   275
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   276
  for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   277
    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   278
      Ptr<Object> object = Config::GetRootNamespaceObject (i);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   279
      info.Gather (object->GetInstanceTypeId ());
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   280
    }
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   281
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   282
  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++)
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   283
    {
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   284
      std::cout << "/*!" << std::endl;
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   285
      TypeId tid = TypeId::GetRegistered (i);
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   286
      if (tid.MustHideFromDocumentation ())
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   287
	{
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   288
	  continue;
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   289
	}
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   290
      std::cout << "\\fn static TypeId " << tid.GetName () << "::GetTypeId (void)" << std::endl;
2944
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   291
      std::cout << "\\brief This method returns the TypeId associated to \\ref " << tid.GetName () 
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   292
		<< std::endl << std::endl;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   293
      std::vector<std::string> paths = info.Get (tid);
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   294
      if (!paths.empty ())
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   295
	{
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   296
	  std::cout << "This object is accessible through the following paths with Config::Set and Config::Connect:" 
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   297
		    << std::endl;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   298
	  std::cout << "<ul>" << std::endl;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   299
	  for (uint32_t k = 0; k < paths.size (); ++k)
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   300
	    {
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   301
	      std::string path = paths[k];
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   302
	      std::cout << "<li>" << path << "</li>" << std::endl;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   303
	    }
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   304
	  std::cout << "</ul>" << std::endl;
d8806baadedb generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2931
diff changeset
   305
	}
2693
56e28e34e109 TypeId::GetAttributeListN -> TypeId::GetAttributeN
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
   306
      if (tid.GetAttributeN () == 0)
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   307
	{
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
   308
	  std::cout << "No Attributes defined for this type.<br>" << std::endl;
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   309
	}
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   310
      else
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   311
	{
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
   312
	  std::cout << "Attributes defined for this type:<br>" << std::endl;
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   313
	  PrintAttributes (tid, std::cout);
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   314
	}
2945
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   315
      {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   316
	TypeId tmp = tid.GetParent ();
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   317
	while (tmp.GetParent () != tmp)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   318
	  {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   319
	    if (tmp.GetAttributeN () != 0)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   320
	      {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   321
		std::cout << "Attributes defined in parent class " << tmp.GetName () << ":<br>" << std::endl;
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   322
		PrintAttributes (tmp, std::cout);
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   323
	      }
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   324
	    tmp = tmp.GetParent ();
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   325
	  }
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   326
      }
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   327
      if (tid.GetTraceSourceN () == 0)
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   328
	{
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
   329
	  std::cout << "No TraceSources defined for this type.<br>" << std::endl;
2945
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   330
	}
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   331
      else
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   332
	{
2971
75780f899be3 output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2969
diff changeset
   333
	  std::cout << "TraceSources defined for this type:<br>" << std::endl;
2945
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   334
	  PrintTraceSources (tid, std::cout);
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   335
	}
2945
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   336
      {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   337
	TypeId tmp = tid.GetParent ();
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   338
	while (tmp.GetParent () != tmp)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   339
	  {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   340
	    if (tmp.GetTraceSourceN () != 0)
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   341
	      {
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   342
		std::cout << "TraceSources defined in parent class " << tmp.GetName () << ":<br>" << std::endl;
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   343
		PrintTraceSources (tmp, std::cout);
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   344
	      }
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   345
	    tmp = tmp.GetParent ();
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   346
	  }
8e9f4dc59d8b print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2944
diff changeset
   347
      }
2602
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   348
      std::cout << "*/" << std::endl;
d9262bff6df2 add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2600
diff changeset
   349
    }
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   350
1853
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
   351
2964
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   352
  std::cout << "/*!" << std::endl
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   353
	    << "\\ingroup core" << std::endl
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   354
	    << "\\defgroup TraceSourceList The list of all trace sources." << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   355
  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   356
    {
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   357
      TypeId tid = TypeId::GetRegistered (i);
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   358
      if (tid.GetTraceSourceN () == 0 ||
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   359
	  tid.MustHideFromDocumentation ())
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   360
	{
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   361
	  continue;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   362
	}
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   363
      std::cout << "<b>" << tid.GetName () << "</b><br>" << std::endl
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   364
		<< "<ul>" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   365
      for (uint32_t j = 0; j < tid.GetTraceSourceN (); ++j)
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   366
	{
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   367
	  std::cout << "<li>" << tid.GetTraceSourceName (j) << ": " << tid.GetTraceSourceHelp (j) << "</li>" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   368
	}
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   369
      std::cout << "</ul>" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   370
    }
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   371
  std::cout << "*/" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   372
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   373
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   374
  std::cout << "/*!" << std::endl
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   375
	    << "\\ingroup core" << std::endl
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   376
	    << "\\defgroup AttributeList The list of all attributes." << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   377
  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   378
    {
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   379
      TypeId tid = TypeId::GetRegistered (i);
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   380
      if (tid.GetAttributeN () == 0 ||
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   381
	  tid.MustHideFromDocumentation ())
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   382
	{
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   383
	  continue;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   384
	}
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   385
      std::cout << "<b>" << tid.GetName () << "</b><br>" << std::endl
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   386
		<< "<ul>" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   387
      for (uint32_t j = 0; j < tid.GetAttributeN (); ++j)
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   388
	{
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   389
	  std::cout << "<li>" << tid.GetAttributeName (j) << ": " << tid.GetAttributeHelp (j) << "</li>" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   390
	}
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   391
      std::cout << "</ul>" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   392
    }
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   393
  std::cout << "*/" << std::endl;
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   394
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   395
4e8cb1577144 generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2951
diff changeset
   396
4513
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   397
  std::cout << "/*!" << std::endl
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   398
	    << "\\ingroup core" << std::endl
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   399
	    << "\\defgroup GlobalValueList The list of all global values." << std::endl
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   400
	    << "<ul>" << std::endl;
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   401
  for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i)
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   402
    {
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   403
      StringValue val;
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   404
      (*i)->GetValue (val);
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   405
      std::cout << "  <li><b>" << (*i)->GetName () << "</b>: " << (*i)->GetHelp () << "(" << val.Get () << ")</li>" << std::endl;
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   406
    }
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   407
  std::cout << "</ul>" << std::endl
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   408
	    << "*/" << std::endl;
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   409
544c9d637ff1 bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4364
diff changeset
   410
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   411
  return 0;
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   412
}