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