A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
print-introspected-doxygen.cc
Go to the documentation of this file.
1 #include <iostream>
2 #include <algorithm>
3 #include <map>
4 
5 #include "ns3/object.h"
6 #include "ns3/pointer.h"
7 #include "ns3/object-vector.h"
8 #include "ns3/config.h"
9 #include "ns3/log.h"
10 #include "ns3/global-value.h"
11 #include "ns3/string.h"
12 #include "ns3/node-container.h"
13 #include "ns3/csma-channel.h"
14 
15 using namespace ns3;
16 
17 NS_LOG_COMPONENT_DEFINE ("PrintIntrospectedDoxygen");
18 
19 namespace
20 {
21  std::string anchor;
22  std::string boldStart;
23  std::string boldStop;
24  std::string breakBoth;
25  std::string breakHtmlOnly;
26  std::string breakTextOnly;
27  std::string brief;
28  std::string commentStart;
29  std::string commentStop;
30  std::string flagSpanStart;
31  std::string flagSpanStop;
32  std::string functionStart;
33  std::string functionStop;
34  std::string headingStart;
35  std::string headingStop;
36  std::string indentHtmlOnly;
37  std::string pageAttributeList;
38  std::string pageGlobalValueList;
39  std::string pageTraceSourceList;
40  std::string listStart;
41  std::string listStop;
42  std::string listLineStart;
43  std::string listLineStop;
44  std::string reference;
45  std::string temporaryCharacter;
46 
47 } // anonymous namespace
48 
49 void
50 PrintAttributes (TypeId tid, std::ostream &os)
51 {
52  os << listStart << std::endl;
53  for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
54  {
55  struct TypeId::AttributeInformation info = tid.GetAttribute(j);
56  os << listLineStart << boldStart << info.name << boldStop << ": "
57  << info.help << std::endl;
58  os << " " << listStart << std::endl
59  << " " << listLineStart << "Set with class: " << reference << info.checker->GetValueTypeName () << listLineStop << std::endl;
60  if (info.checker->HasUnderlyingTypeInformation ())
61  {
62  os << " " << listLineStart << "Underlying type: ";
63  if ( (info.checker->GetValueTypeName () != "ns3::EnumValue")
64  && (info.checker->GetUnderlyingTypeInformation () != "std::string")
65  )
66  {
67  // Two indirect cases to handle
68  bool handled = false;
69 
70  if (info.checker->GetValueTypeName () == "ns3::PointerValue")
71  {
72  const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
73  if (ptrChecker != 0)
74  {
75  os << reference << "ns3::Ptr" << "< "
76  << reference << ptrChecker->GetPointeeTypeId ().GetName ()
77  << ">";
78  handled = true;
79  }
80  }
81  else if (info.checker->GetValueTypeName () == "ns3::ObjectPtrContainerValue")
82  {
83  const ObjectPtrContainerChecker * ptrChecker = dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
84  if (ptrChecker != 0)
85  {
86  os << reference << "ns3::Ptr" << "< "
87  << reference << ptrChecker->GetItemTypeId ().GetName ()
88  << ">";
89  handled = true;
90  }
91  }
92  if (! handled)
93  {
94  os << reference << info.checker->GetUnderlyingTypeInformation ();
95  }
96  }
97  os << listLineStop << std::endl;
98  }
99  if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ())
100  {
101  os << " " << listLineStart << "Initial value: " << info.initialValue->SerializeToString (info.checker) << listLineStop << std::endl;
102  }
103  os << " " << listLineStart << "Flags: ";
104  if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ())
105  {
106  os << flagSpanStart << "construct " << flagSpanStop;
107  }
108  if (info.flags & TypeId::ATTR_SET && info.accessor->HasSetter ())
109  {
110  os << flagSpanStart << "write " << flagSpanStop;
111  }
112  if (info.flags & TypeId::ATTR_GET && info.accessor->HasGetter ())
113  {
114  os << flagSpanStart << "read " << flagSpanStop;
115  }
116  os << listLineStop << std::endl;
117  os << " " << listStop << " " << std::endl;
118 
119  }
120  os << listStop << std::endl;
121 }
122 
123 void
124 PrintTraceSources (TypeId tid, std::ostream &os)
125 {
126  os << listStart << std::endl;
127  for (uint32_t i = 0; i < tid.GetTraceSourceN (); ++i)
128  {
129  struct TypeId::TraceSourceInformation info = tid.GetTraceSource (i);
130  os << listLineStart << boldStart << info.name << boldStop << ": "
131  << info.help
132  << std::endl;
133  os << listLineStop << std::endl;
134  }
135  os << listStop << std::endl;
136 }
137 
138 
143 {
144 public:
151  void RecordAggregationInfo (std::string a, std::string b);
157  void Gather (TypeId tid);
161  void Print (void) const;
162 
168  std::vector<std::string> Get (TypeId tid);
169 
170 private:
174  std::string GetCurrentPath (void) const;
180  void DoGather (TypeId tid);
186  void RecordOutput (TypeId tid);
192  bool HasAlreadyBeenProcessed (TypeId tid) const;
200  void find_and_replace (std::string &source, const std::string find, std::string replace );
204  std::vector<std::pair<TypeId,std::string> > m_output;
208  std::vector<std::string> m_currentPath;
212  std::vector<TypeId> m_alreadyProcessed;
216  std::vector<std::pair<TypeId,TypeId> > m_aggregates;
217 };
218 
219 void
220 StaticInformation::RecordAggregationInfo (std::string a, std::string b)
221 {
222  m_aggregates.push_back (std::make_pair (TypeId::LookupByName (a), TypeId::LookupByName (b)));
223 }
224 
225 void
227 {
228  for (std::vector<std::pair<TypeId,std::string> >::const_iterator i = m_output.begin (); i != m_output.end (); ++i)
229  {
230  std::pair<TypeId,std::string> item = *i;
231  std::cout << item.first.GetName () << " -> " << item.second << std::endl;
232  }
233 }
234 
235 std::string
237 {
238  std::ostringstream oss;
239  for (std::vector<std::string>::const_iterator i = m_currentPath.begin (); i != m_currentPath.end (); ++i)
240  {
241  std::string item = *i;
242  oss << "/" << item;
243  }
244  return oss.str ();
245 }
246 
247 void
249 {
250  m_output.push_back (std::make_pair (tid, GetCurrentPath ()));
251 }
252 
253 bool
255 {
256  for (uint32_t i = 0; i < m_alreadyProcessed.size (); ++i)
257  {
258  if (m_alreadyProcessed[i] == tid)
259  {
260  return true;
261  }
262  }
263  return false;
264 }
265 
266 std::vector<std::string>
268 {
269  std::vector<std::string> paths;
270  for (uint32_t i = 0; i < m_output.size (); ++i)
271  {
272  std::pair<TypeId,std::string> tmp = m_output[i];
273  if (tmp.first == tid)
274  {
275  paths.push_back (tmp.second);
276  }
277  }
278  return paths;
279 }
280 
281 void
283 {
284  DoGather (tid);
285 
286  std::sort (m_output.begin (), m_output.end ());
287  m_output.erase (std::unique (m_output.begin (), m_output.end ()), m_output.end ());
288 }
289 
290 void
292 {
293  NS_LOG_FUNCTION (this);
294  if (HasAlreadyBeenProcessed (tid))
295  {
296  return;
297  }
298  RecordOutput (tid);
299  for (uint32_t i = 0; i < tid.GetAttributeN (); ++i)
300  {
301  struct TypeId::AttributeInformation info = tid.GetAttribute(i);
302  const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
303  if (ptrChecker != 0)
304  {
305  TypeId pointee = ptrChecker->GetPointeeTypeId ();
306 
307  // See if this is a pointer to an Object.
308  Ptr<Object> object = CreateObject<Object> ();
309  TypeId objectTypeId = object->GetTypeId ();
310  if (objectTypeId == pointee)
311  {
312  // Stop the recursion at this attribute if it is a
313  // pointer to an Object, which create too many spurious
314  // paths in the list of attribute paths because any
315  // Object can be in that part of the path.
316  continue;
317  }
318 
319  m_currentPath.push_back (info.name);
320  m_alreadyProcessed.push_back (tid);
321  DoGather (pointee);
322  m_alreadyProcessed.pop_back ();
323  m_currentPath.pop_back ();
324  continue;
325  }
326  // attempt to cast to an object vector.
327  const ObjectPtrContainerChecker *vectorChecker = dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
328  if (vectorChecker != 0)
329  {
330  TypeId item = vectorChecker->GetItemTypeId ();
331  m_currentPath.push_back (info.name + "/[i]");
332  m_alreadyProcessed.push_back (tid);
333  DoGather (item);
334  m_alreadyProcessed.pop_back ();
335  m_currentPath.pop_back ();
336  continue;
337  }
338  }
339  for (uint32_t j = 0; j < TypeId::GetRegisteredN (); j++)
340  {
341  TypeId child = TypeId::GetRegistered (j);
342  if (child.IsChildOf (tid))
343  {
344  //please take a look at the following note for an explanation
345  std::string childName = "$" + temporaryCharacter + child.GetName ();
346  std::string replaceWith = "::" + temporaryCharacter;
347  find_and_replace(childName,"::",replaceWith);
348  m_currentPath.push_back (childName);
349  m_alreadyProcessed.push_back (tid);
350  DoGather (child);
351  m_alreadyProcessed.pop_back ();
352  m_currentPath.pop_back ();
353  }
354  }
355  for (uint32_t k = 0; k < m_aggregates.size (); ++k)
356  {
357  std::pair<TypeId,TypeId> tmp = m_aggregates[k];
358  if (tmp.first == tid || tmp.second == tid)
359  {
360  TypeId other;
361  if (tmp.first == tid)
362  {
363  other = tmp.second;
364  }
365  if (tmp.second == tid)
366  {
367  other = tmp.first;
368  }
380  std::string name = "$" + temporaryCharacter + other.GetName ();
381  //finding and replacing :: by ::% (for Doxygen version only).
382  std::string replaceWith = "::" + temporaryCharacter;
383  find_and_replace(name,"::",replaceWith);
384  m_currentPath.push_back (name);
385  m_alreadyProcessed.push_back (tid);
386  DoGather (other);
387  m_alreadyProcessed.pop_back ();
388  m_currentPath.pop_back ();
389  }
390  }
391 }
392 
393 void
394 StaticInformation::find_and_replace( std::string &source, const std::string find, std::string replace )
395 {
396  size_t j;
397  j = source.find (find);
398  while (j != std::string::npos )
399  {
400  source.replace (j, find.length (),replace);
401  j = source.find (find,j+1);
402  }
403 }
404 
405 void
406 PrintHelp (const char *program_name)
407 {
408  std::cout << "Usage: " << program_name << " [options]" << std::endl
409  << std::endl
410  << "Options:" << std::endl
411  << " --help : print these options" << std::endl
412  << " --output-text : format output as plain text" << std::endl;
413 }
414 
415 int main (int argc, char *argv[])
416 {
417  bool outputText = false;
418  char *programName = argv[0];
419 
420  argv++;
421 
422  while (*argv != 0)
423  {
424  char *arg = *argv;
425 
426  if (strcmp (arg, "--help") == 0)
427  {
428  PrintHelp (programName);
429  return 0;
430  }
431  else if (strcmp(arg, "--output-text") == 0)
432  {
433  outputText = true;
434  }
435  else
436  {
437  // un-recognized command-line argument
438  PrintHelp (programName);
439  return 0;
440  }
441  argv++;
442  }
443 
444  if (outputText)
445  {
446  anchor = "";
447  boldStart = "";
448  boldStop = "";
449  breakBoth = "\n";
450  breakHtmlOnly = "";
451  breakTextOnly = "\n";
452  brief = "";
453  commentStart = "===============================================================\n";
454  commentStop = "";
455  flagSpanStart = "";
456  flagSpanStop = "";
457  functionStart = "";
458  functionStop = "\n\n";
459  headingStart = "";
460  headingStop = "";
461  indentHtmlOnly = "";
462  pageAttributeList = "";
463  pageGlobalValueList = "";
464  pageTraceSourceList = "";
465  listStart = "";
466  listStop = "";
467  listLineStart = " * ";
468  listLineStop = "";
469  reference = "";
470  temporaryCharacter = "";
471  }
472  else
473  {
474  anchor = "\\anchor ";
475  boldStart = "<b>";
476  boldStop = "</b>";
477  breakBoth = "<br>";
478  breakHtmlOnly = "<br>";
479  breakTextOnly = "";
480  brief = "\\brief ";
481  commentStart = "/*!\n";
482  commentStop = "*/\n";
483  flagSpanStart = "<span class=\"mlabel\">";
484  flagSpanStop = "</span>";
485  functionStart = "\\class ";
486  functionStop = "";
487  headingStart = "<h3>";
488  headingStop = "</h3>";
489  indentHtmlOnly = " ";
490  pageAttributeList = "\\page AttributesList ";
491  pageGlobalValueList = "\\page GlobalValueList ";
492  pageTraceSourceList = "\\page TraceSourceList ";
493  listStart = "<ul>";
494  listStop = "</ul>";
495  listLineStart = "<li>";
496  listLineStop = "</li>";
497  reference = "\\ref ";
498  temporaryCharacter = "%";
499  }
500 
501  NodeContainer c; c.Create (1);
502 
503  // The below statements register typical aggregation relationships
504  // in ns-3 programs, that otherwise aren't picked up automatically
505  // by the creation of the above node. To manually list other common
506  // aggregation relationships that you would like to see show up in
507  // the list of configuration paths in the doxygen, add additional
508  // statements below.
509  StaticInformation info;
510  info.RecordAggregationInfo ("ns3::Node", "ns3::TcpSocketFactory");
511  info.RecordAggregationInfo ("ns3::Node", "ns3::UdpSocketFactory");
512  info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory");
513  info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::RoutingProtocol");
514  info.RecordAggregationInfo ("ns3::Node", "ns3::MobilityModel");
515  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L3Protocol");
516  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4NixVectorRouting");
517  info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv4L4Protocol");
518  info.RecordAggregationInfo ("ns3::Node", "ns3::ArpL3Protocol");
519  info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv4L4Protocol");
520  info.RecordAggregationInfo ("ns3::Node", "ns3::UdpL4Protocol");
521  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv6L3Protocol");
522  info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv6L4Protocol");
523  info.RecordAggregationInfo ("ns3::Node", "ns3::TcpL4Protocol");
524  info.RecordAggregationInfo ("ns3::Node", "ns3::RipNg");
525  info.RecordAggregationInfo ("ns3::Node", "ns3::GlobalRouter");
526  info.RecordAggregationInfo ("ns3::Node", "ns3::aodv::RoutingProtocol");
527  info.RecordAggregationInfo ("ns3::Node", "ns3::dsdv::RoutingProtocol");
528  info.RecordAggregationInfo ("ns3::Node", "ns3::dsr::DsrRouting");
529  info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::RoutingProtocol");
530 
531  // Create a channel object so that channels appear in the namespace
532  // paths that will be generated here.
533  Ptr<CsmaChannel> csma;
534  csma = CreateObject<CsmaChannel> ();
535 
536  for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i)
537  {
539  info.Gather (object->GetInstanceTypeId ());
540  }
541 
542  std::map< std::string, uint32_t> nameMap;
543  std::map< std::string, uint32_t>::const_iterator nameMapIterator;
544 
545  // Create a map from the class names to their index in the vector of
546  // TypeId's so that the names will end up in alphabetical order.
547  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++)
548  {
549  TypeId tid = TypeId::GetRegistered (i);
550  if (tid.MustHideFromDocumentation ())
551  {
552  continue;
553  }
554 
555  // Capitalize all of letters in the name so that it sorts
556  // correctly in the map.
557  std::string name = tid.GetName ();
558  for (uint32_t j = 0; j < name.length (); j++)
559  {
560  name[j] = toupper (name[j]);
561  }
562 
563  // Save this name's index.
564  nameMap[name] = i;
565  }
566 
567  // Iterate over the map, which will print the class names in
568  // alphabetical order.
569  for (nameMapIterator = nameMap.begin ();
570  nameMapIterator != nameMap.end ();
571  nameMapIterator++)
572  {
573  // Get the class's index out of the map;
574  uint32_t i = nameMapIterator->second;
575 
576  std::cout << commentStart << std::endl;
577  TypeId tid = TypeId::GetRegistered (i);
578  if (tid.MustHideFromDocumentation ())
579  {
580  continue;
581  }
582  std::cout << functionStart << tid.GetName () << std::endl;
583  std::cout << std::endl;
584  std::vector<std::string> paths = info.Get (tid);
585 
586  // Config --------------
587  if (paths.empty ())
588  {
589  std::cout << "Doxygen introspection did not find any typical Config paths."
590  << breakBoth << std::endl;
591  }
592  else
593  {
594  std::cout << headingStart
595  << "Config Paths"
596  << headingStop << std::endl;
597  std::cout << std::endl;
598  std::cout << tid.GetName ()
599  << " is accessible through the following paths"
600  << " with Config::Set and Config::Connect:"
601  << std::endl;
602  std::cout << listStart << std::endl;
603  for (uint32_t k = 0; k < paths.size (); ++k)
604  {
605  std::string path = paths[k];
606  std::cout << listLineStart << path
607  << listLineStop << breakTextOnly << std::endl;
608  }
609  std::cout << listStop << std::endl;
610  } // Config
611 
612  // Attributes ----------
613  if (tid.GetAttributeN () == 0)
614  {
615  std::cout << "No Attributes are defined for this type."
616  << breakBoth << std::endl;
617  }
618  else
619  {
620  std::cout << headingStart << "Attributes"
621  << headingStop << std::endl;
622  PrintAttributes (tid, std::cout);
623 
624  TypeId tmp = tid.GetParent ();
625  while (tmp.GetParent () != tmp)
626  {
627  if (tmp.GetAttributeN () != 0)
628  {
629  std::cout << headingStart
630  << "Attributes defined in parent class "
631  << tmp.GetName ()
632  << headingStop << std::endl;
633  PrintAttributes (tmp, std::cout);
634  }
635  tmp = tmp.GetParent ();
636  }
637  } // Attributes
638 
639  // Tracing -------------
640  if (tid.GetTraceSourceN () == 0)
641  {
642  std::cout << "No TraceSources are defined for this type."
643  << breakBoth << std::endl;
644  }
645  else
646  {
647  std::cout << headingStart << "TraceSources"
648  << headingStop << std::endl;
649  PrintTraceSources (tid, std::cout);
650  }
651  {
652  TypeId tmp = tid.GetParent ();
653  while (tmp.GetParent () != tmp)
654  {
655  if (tmp.GetTraceSourceN () != 0)
656  {
657  std::cout << headingStart
658  << "TraceSources defined in parent class "
659  << tmp.GetName ()
660  << headingStop << std::endl;
661  PrintTraceSources (tmp, std::cout);
662  }
663  tmp = tmp.GetParent ();
664  }
665  }
666  std::cout << commentStop << std::endl;
667  } // class documentation
668 
669 
670  std::cout << commentStart
671  << pageTraceSourceList << "All TraceSources\n"
672  << std::endl;
673 
674  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
675  {
676  TypeId tid = TypeId::GetRegistered (i);
677  if (tid.GetTraceSourceN () == 0 ||
679  {
680  continue;
681  }
682  std::cout << boldStart << tid.GetName ()
683  << boldStop << breakHtmlOnly << std::endl
684  << listStart << std::endl;
685  for (uint32_t j = 0; j < tid.GetTraceSourceN (); ++j)
686  {
687  struct TypeId::TraceSourceInformation info = tid.GetTraceSource(j);
688  std::cout << listLineStart
689  << boldStart << info.name << boldStop
690  << ": " << info.help
691  << listLineStop << std::endl;
692  }
693  std::cout << listStop << std::endl;
694  }
695  std::cout << commentStop << std::endl;
696 
697  std::cout << commentStart
698  << pageAttributeList << "All Attributes\n"
699  << std::endl;
700 
701  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
702  {
703  TypeId tid = TypeId::GetRegistered (i);
704  if (tid.GetAttributeN () == 0 ||
706  {
707  continue;
708  }
709  std::cout << boldStart << tid.GetName ()
710  << boldStop << breakHtmlOnly << std::endl
711  << listStart << std::endl;
712  for (uint32_t j = 0; j < tid.GetAttributeN (); ++j)
713  {
714  struct TypeId::AttributeInformation info = tid.GetAttribute(j);
715  std::cout << listLineStart
716  << boldStart << info.name << boldStop
717  << ": " << info.help
718  << listLineStop << std::endl;
719  }
720  std::cout << listStop << std::endl;
721  }
722  std::cout << commentStop << std::endl;
723 
724 
725 
726  std::cout << commentStart
727  << pageGlobalValueList << "All GlobalValues\n"
728  << std::endl
729  << listStart << std::endl;
730 
732  i != GlobalValue::End ();
733  ++i)
734  {
735  StringValue val;
736  (*i)->GetValue (val);
737  std::cout << indentHtmlOnly
738  << listLineStart
739  << boldStart
740  << anchor
741  << "GlobalValue" << (*i)->GetName () << " " << (*i)->GetName ()
742  << boldStop
743  << ": " << (*i)->GetHelp () << ". Default value: " << val.Get () << "."
744  << listLineStop << std::endl;
745  }
746  std::cout << listStop << std::endl
747  << commentStop << std::endl;
748 
749 
750  return 0;
751 }
uint32_t GetAttributeN(void) const
Definition: type-id.cc:738
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
std::string Get(void) const
virtual TypeId GetInstanceTypeId(void) const
Definition: object.cc:76
void RecordOutput(TypeId tid)
Record the current config path for tid.
std::vector< std::pair< TypeId, std::string > > m_output
Configuration path for each TypeId.
void find_and_replace(std::string &source, const std::string find, std::string replace)
(Inplace) find and replace all instances of string
hold variables of type string
Definition: string.h:18
std::string headingStart
start of section heading (h3)
virtual TypeId GetPointeeTypeId(void) const =0
std::string flagSpanStart
start of Attribute flag value
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
TypeId GetParent(void) const
Definition: type-id.cc:624
Vector::const_iterator Iterator
Definition: global-value.h:52
std::vector< std::string > Get(TypeId tid)
The attribute can be written at construction-time.
Definition: type-id.h:58
virtual TypeId GetItemTypeId(void) const =0
Ptr< Object > GetRootNamespaceObject(uint32_t i)
Definition: config.cc:773
std::string breakTextOnly
linebreak for text output only
void DoGather(TypeId tid)
Gather attribute, configuration path information for tid.
The attribute can be read.
Definition: type-id.h:56
bool MustHideFromDocumentation(void) const
Definition: type-id.cc:730
Ptr< const AttributeAccessor > accessor
Definition: type-id.h:67
static uint32_t GetRegisteredN(void)
Definition: type-id.cc:575
bool HasAlreadyBeenProcessed(TypeId tid) const
static Iterator Begin(void)
Ptr< const AttributeValue > initialValue
Definition: type-id.h:66
T * PeekPointer(const Ptr< T > &p)
Definition: ptr.h:280
uint32_t GetTraceSourceN(void) const
Definition: type-id.cc:759
static TypeId GetRegistered(uint32_t i)
Definition: type-id.cc:581
std::string breakHtmlOnly
linebreak for html output only
Ptr< const AttributeChecker > checker
Definition: type-id.h:68
void Print(void) const
Print output in "a -> b" form on std::cout.
keep track of a set of node pointers.
The attribute can be written.
Definition: type-id.h:57
std::string GetName(void) const
Definition: type-id.cc:657
std::vector< TypeId > m_alreadyProcessed
List of TypeIds we've already processed.
static Iterator End(void)
Gather aggregation and configuration path information from registered types.
std::vector< std::string > m_currentPath
Current configuration path.
void Gather(TypeId tid)
Gather aggregation and configuration path information for tid.
uint32_t GetRootNamespaceObjectN(void)
Definition: config.cc:767
bool IsChildOf(TypeId other) const
Definition: type-id.cc:638
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
struct TypeId::TraceSourceInformation GetTraceSource(uint32_t i) const
Definition: type-id.cc:765
struct TypeId::AttributeInformation GetAttribute(uint32_t i) const
Definition: type-id.cc:745
std::vector< std::pair< TypeId, TypeId > > m_aggregates
List of aggregation relationships.
std::string flagSpanStop
end of Attribute flag value
a unique identifier for an interface.
Definition: type-id.h:49
static TypeId LookupByName(std::string name)
Definition: type-id.cc:535
std::string GetCurrentPath(void) const
void RecordAggregationInfo(std::string a, std::string b)
Record the a -> b aggregation relation.