A Discrete-Event Network Simulator
API
print-introspected-doxygen.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
27 #include <iostream>
28 #include <algorithm>
29 #include <map>
30 #include <climits> // CHAR_BIT
31 
32 #include "ns3/command-line.h"
33 #include "ns3/config.h"
34 #include "ns3/global-value.h"
35 #include "ns3/log.h"
36 #include "ns3/object-vector.h"
37 #include "ns3/object.h"
38 #include "ns3/pointer.h"
39 #include "ns3/string.h"
40 #include "ns3/node-container.h"
41 #include "ns3/simple-channel.h"
42 #include "ns3/system-path.h"
43 
44 using namespace ns3;
45 
46 NS_LOG_COMPONENT_DEFINE ("PrintIntrospectedDoxygen");
47 
48 namespace
49 {
50  std::string anchor;
51  std::string argument;
52  std::string boldStart;
53  std::string boldStop;
54  std::string breakBoth;
55  std::string breakHtmlOnly;
56  std::string breakTextOnly;
57  std::string brief;
58  std::string classStart;
59  std::string classStop;
60  std::string codeWord;
61  std::string commentStart;
62  std::string commentStop;
63  std::string copyDoc;
64  std::string file;
65  std::string flagSpanStart;
66  std::string flagSpanStop;
67  std::string functionStart;
68  std::string functionStop;
69  std::string headingStart;
70  std::string headingStop;
71  std::string indentHtmlOnly;
72  std::string listLineStart;
73  std::string listLineStop;
74  std::string listStart;
75  std::string listStop;
76  std::string note;
77  std::string page;
78  std::string reference;
79  std::string returns;
80  std::string sectionStart;
81  std::string seeAlso;
82  std::string subSectionStart;
83  std::string templArgDeduced;
84  std::string templArgExplicit;
85  std::string templateArgument;
86  std::string variable;
87 
88 } // unnamed namespace
89 
90 
96 void
97 SetMarkup (bool outputText)
98 {
99  NS_LOG_FUNCTION (outputText);
100  if (outputText)
101  {
102  anchor = "";
103  argument = " Arg: ";
104  boldStart = "";
105  boldStop = "";
106  breakBoth = "\n";
107  breakHtmlOnly = "";
108  breakTextOnly = "\n";
109  brief = "";
110  classStart = "";
111  classStop = "\n\n";
112  codeWord = " ";
113  commentStart = "===============================================================\n";
114  commentStop = "";
115  copyDoc = " See: ";
116  file = "File: ";
117  flagSpanStart = "";
118  flagSpanStop = "";
119  functionStart = "";
120  functionStop = "\n\n";
121  headingStart = "";
122  headingStop = "";
123  indentHtmlOnly = "";
124  listLineStart = " * ";
125  listLineStop = "";
126  listStart = "";
127  listStop = "";
128  note = "Note: ";
129  page = "Page ";
130  reference = " ";
131  returns = " Returns: ";
132  sectionStart = "Section ";
133  seeAlso = " See: ";
134  subSectionStart = "Subsection ";
135  templArgDeduced = "[deduced] ";
136  templArgExplicit = "[explicit] ";
137  templateArgument = "Template Arg: ";
138  variable = "Variable: ";
139  }
140  else
141  {
142  anchor = "\\anchor ";
143  argument = "\\param ";
144  boldStart = "<b>";
145  boldStop = "</b>";
146  breakBoth = "<br>";
147  breakHtmlOnly = "<br>";
148  breakTextOnly = "";
149  brief = "\\brief ";
150  classStart = "\\class ";
151  classStop = "";
152  codeWord = "\\p ";
153  commentStart = "/*!\n";
154  commentStop = "*/\n";
155  copyDoc = "\\copydoc ";
156  file = "\\file ";
157  flagSpanStart = "<span class=\"mlabel\">";
158  flagSpanStop = "</span>";
159  functionStart = "\\fn ";
160  functionStop = "";
161  headingStart = "<h3>";
162  headingStop = "</h3>";
163  indentHtmlOnly = " ";
164  listLineStart = "<li>";
165  listLineStop = "</li>";
166  listStart = "<ul>";
167  listStop = "</ul>";
168  note = "\\note ";
169  page = "\\page ";
170  reference = " \\ref ";
171  returns = "\\returns ";
172  sectionStart = "\\ingroup ";
173  seeAlso = "\\see ";
174  subSectionStart = "\\addtogroup ";
175  templArgDeduced = "\\deduced ";
176  templArgExplicit = "\\explicit ";
177  templateArgument = "\\tparam ";
178  variable = "\\var ";
179  }
180 } // SetMarkup ()
181 
182 
183 /***************************************************************
184  * Docs for a single TypeId
185  ***************************************************************/
186 
195 void
196 PrintAttributesTid (std::ostream &os, const TypeId tid)
197 {
198  NS_LOG_FUNCTION (tid);
199  os << listStart << std::endl;
200  for (uint32_t j = 0; j < tid.GetAttributeN (); j++)
201  {
202  struct TypeId::AttributeInformation info = tid.GetAttribute(j);
203  os << listLineStart
204  << boldStart << info.name << boldStop << ": "
205  << info.help
206  << std::endl;
207  os << " "
208  << listStart << std::endl;
209  os << " "
210  << listLineStart
211  << "Set with class: " << reference
212  << info.checker->GetValueTypeName ()
213  << listLineStop
214  << std::endl;
215  if (info.checker->HasUnderlyingTypeInformation ())
216  {
217  os << " "
218  << listLineStart
219  << "Underlying type: ";
220 
221  std::string valType = info.checker->GetValueTypeName ();
222  std::string underType = info.checker->GetUnderlyingTypeInformation ();
223  if ((valType != "ns3::EnumValue") && (underType != "std::string"))
224  {
225  // Indirect cases to handle
226  bool handled = false;
227 
228  if (valType == "ns3::PointerValue")
229  {
230  const PointerChecker *ptrChecker =
231  dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
232  if (ptrChecker != 0)
233  {
234  os << reference << "ns3::Ptr" << "< "
235  << reference << ptrChecker->GetPointeeTypeId ().GetName ()
236  << ">";
237  handled = true;
238  }
239  }
240  else if (valType == "ns3::ObjectPtrContainerValue")
241  {
242  const ObjectPtrContainerChecker * ptrChecker =
243  dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
244  if (ptrChecker != 0)
245  {
246  os << reference << "ns3::Ptr" << "< "
247  << reference << ptrChecker->GetItemTypeId ().GetName ()
248  << ">";
249  handled = true;
250  }
251  }
252  // Helper to match first part of string
253  class StringBeginMatcher
254  {
255  public:
256  StringBeginMatcher (const std::string s)
257  : m_string (s) { };
258  bool operator () (const std::string t)
259  {
260  std::size_t pos = m_string.find (t);
261  return pos == 0;
262  };
263  private:
264  std::string m_string;
265  };
266  StringBeginMatcher match (underType);
267 
268  if ( match ("bool") || match ("double") ||
269  match ("int8_t") || match ("uint8_t") ||
270  match ("int16_t") || match ("uint16_t") ||
271  match ("int32_t") || match ("uint32_t") ||
272  match ("int64_t") || match ("uint64_t")
273  )
274  {
275  os << underType;
276  handled = true;
277  }
278  if (! handled)
279  {
280  os << reference << underType;
281  }
282  }
283  os << listLineStop << std::endl;
284  }
285  if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ())
286  {
287  os << " "
288  << listLineStart
289  << "Initial value: "
290  << info.initialValue->SerializeToString (info.checker)
291  << listLineStop
292  << std::endl;
293  }
294  os << " " << listLineStart << "Flags: ";
295  if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ())
296  {
297  os << flagSpanStart << "construct " << flagSpanStop;
298  }
299  if (info.flags & TypeId::ATTR_SET && info.accessor->HasSetter ())
300  {
301  os << flagSpanStart << "write " << flagSpanStop;
302  }
303  if (info.flags & TypeId::ATTR_GET && info.accessor->HasGetter ())
304  {
305  os << flagSpanStart << "read " << flagSpanStop;
306  }
307  os << listLineStop << std::endl;
308  os << " "
309  << listStop
310  << " " << std::endl;
311 
312  }
313  os << listStop << std::endl;
314 } // PrintAttributesTid ()
315 
316 
327 void
328 PrintAttributes (std::ostream & os, const TypeId tid)
329 {
330  NS_LOG_FUNCTION (tid);
331  if (tid.GetAttributeN () == 0)
332  {
333  os << "No Attributes are defined for this type."
334  << breakBoth
335  << std::endl;
336  }
337  else
338  {
339  os << headingStart
340  << "Attributes"
341  << headingStop
342  << std::endl;
343  PrintAttributesTid (os, tid);
344  }
345 
346  // Attributes from base classes
347  TypeId tmp = tid.GetParent ();
348  while (tmp.GetParent () != tmp)
349  {
350  if (tmp.GetAttributeN () != 0)
351  {
352  os << headingStart
353  << "Attributes defined in parent class "
354  << tmp.GetName ()
355  << headingStop
356  << std::endl;
357  PrintAttributesTid (os, tmp);
358  }
359  tmp = tmp.GetParent ();
360 
361  } // Attributes
362 } // PrintAttributes ()
363 
364 
373 void
374 PrintTraceSourcesTid (std::ostream & os, const TypeId tid)
375 {
376  NS_LOG_FUNCTION (tid);
377  os << listStart << std::endl;
378  for (uint32_t i = 0; i < tid.GetTraceSourceN (); ++i)
379  {
380  struct TypeId::TraceSourceInformation info = tid.GetTraceSource (i);
381  os << listLineStart
382  << boldStart << info.name << boldStop << ": "
383  << info.help << breakBoth
384  // '%' prevents doxygen from linking to the Callback class...
385  << "%Callback signature: "
386  << info.callback
387  << std::endl;
388  os << listLineStop << std::endl;
389  }
390  os << listStop << std::endl;
391 } // PrintTraceSourcesTid ()
392 
393 
404 void
405 PrintTraceSources (std::ostream & os, const TypeId tid)
406 {
407  NS_LOG_FUNCTION (tid);
408  if (tid.GetTraceSourceN () == 0)
409  {
410  os << "No TraceSources are defined for this type."
411  << breakBoth
412  << std::endl;
413  }
414  else
415  {
416  os << headingStart
417  << "TraceSources"
418  << headingStop << std::endl;
419  PrintTraceSourcesTid (os, tid);
420  }
421 
422  // Trace sources from base classes
423  TypeId tmp = tid.GetParent ();
424  while (tmp.GetParent () != tmp)
425  {
426  if (tmp.GetTraceSourceN () != 0)
427  {
428  os << headingStart
429  << "TraceSources defined in parent class "
430  << tmp.GetName ()
431  << headingStop << std::endl;
432  PrintTraceSourcesTid (os, tmp);
433  }
434  tmp = tmp.GetParent ();
435  }
436 
437 } // PrintTraceSources ()
438 
445 void PrintSize (std::ostream & os, const TypeId tid)
446 {
447  NS_LOG_FUNCTION (tid);
448  NS_ASSERT_MSG (CHAR_BIT != 0, "CHAR_BIT is zero");
449 
450  std::size_t arch = (sizeof (void *) * CHAR_BIT);
451 
452  os << boldStart << "Size" << boldStop
453  << " of this type is " << tid.GetSize ()
454  << " bytes (on a " << arch << "-bit architecture)."
455  << std::endl;
456 } // PrintSize ()
457 
458 
459 /***************************************************************
460  * Lists of All things
461  ***************************************************************/
462 
468 void
469 PrintAllAttributes (std::ostream & os)
470 {
472  os << commentStart << page << "AttributeList All Attributes\n"
473  << std::endl;
474  os << "This is a list of all" << reference << "attribute by class. "
475  << "For more information see the" << reference << "attribute "
476  << "section of this API documentation and the Attributes sections "
477  << "in the Tutorial and Manual.\n"
478  << std::endl;
479 
480  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
481  {
482  TypeId tid = TypeId::GetRegistered (i);
483  if (tid.GetAttributeN () == 0 ||
485  {
486  continue;
487  }
488  os << boldStart << tid.GetName () << boldStop << breakHtmlOnly
489  << std::endl;
490 
491  os << listStart << std::endl;
492  for (uint32_t j = 0; j < tid.GetAttributeN (); ++j)
493  {
494  struct TypeId::AttributeInformation info = tid.GetAttribute(j);
495  os << listLineStart
496  << boldStart << info.name << boldStop
497  << ": " << info.help
498  << listLineStop
499  << std::endl;
500  }
501  os << listStop << std::endl;
502  }
503  os << commentStop << std::endl;
504 
505 } // PrintAllAttributes ()
506 
507 
513 void
514 PrintAllGlobals (std::ostream & os)
515 {
517  os << commentStart << page << "GlobalValueList All GlobalValues\n"
518  << std::endl;
519  os << "This is a list of all" << reference << "ns3::GlobalValue instances.\n"
520  << std::endl;
521 
522  os << listStart << std::endl;
524  i != GlobalValue::End ();
525  ++i)
526  {
527  StringValue val;
528  (*i)->GetValue (val);
529  os << indentHtmlOnly
530  << listLineStart
531  << boldStart
532  << anchor
533  << "GlobalValue" << (*i)->GetName () << " " << (*i)->GetName ()
534  << boldStop
535  << ": " << (*i)->GetHelp ()
536  << ". Default value: " << val.Get () << "."
537  << listLineStop
538  << std::endl;
539  }
540  os << listStop << std::endl;
541  os << commentStop << std::endl;
542 
543 } // PrintAllGlobals ()
544 
545 
551 void
552 PrintAllLogComponents (std::ostream & os)
553 {
555  os << commentStart << page << "LogComponentList All LogComponents\n"
556  << std::endl;
557  os << "This is a list of all" << reference << "ns3::LogComponent instances.\n"
558  << std::endl;
559 
564  os << listStart << std::endl;
566  LogComponent::ComponentList::const_iterator it;
567  for (it = logs->begin (); it != logs->end (); ++it)
568  {
569  std::string file = it->second->File ();
570  // Strip leading "../" related to depth in build directory
571  // since doxygen only sees the path starting with "src/", etc.
572  while (file.find ("../") == 0)
573  {
574  file = file.substr (3);
575  }
576 
577  os << listLineStart
578  << boldStart << it->first << boldStop << ": " << file
579  << listLineStop
580  << std::endl;
581  }
582  os << listStop << std::endl;
583  os << commentStop << std::endl;
584 } // PrintAllLogComponents ()
585 
586 
592 void
593 PrintAllTraceSources (std::ostream & os)
594 {
596  os << commentStart << page << "TraceSourceList All TraceSources\n"
597  << std::endl;
598  os << "This is a list of all" << reference << "tracing sources. "
599  << "For more information see the " << reference << "tracing "
600  << "section of this API documentation and the Tracing sections "
601  << "in the Tutorial and Manual.\n"
602  << std::endl;
603 
604  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
605  {
606  TypeId tid = TypeId::GetRegistered (i);
607  if (tid.GetTraceSourceN () == 0 ||
609  {
610  continue;
611  }
612  os << boldStart << tid.GetName () << boldStop << breakHtmlOnly
613  << std::endl;
614 
615  os << listStart << std::endl;
616  for (uint32_t j = 0; j < tid.GetTraceSourceN (); ++j)
617  {
618  struct TypeId::TraceSourceInformation info = tid.GetTraceSource(j);
619  os << listLineStart
620  << boldStart << info.name << boldStop
621  << ": " << info.help
622  << listLineStop
623  << std::endl;
624  }
625  os << listStop << std::endl;
626  }
627  os << commentStop << std::endl;
628 
629 } // PrintAllTraceSources ()
630 
631 
632 /***************************************************************
633  * Docs for Attribute classes
634  ***************************************************************/
635 
636 
650 void
651 PrintAttributeValueSection (std::ostream & os,
652  const std::string & name,
653  const bool seeBase = true)
654 {
655  NS_LOG_FUNCTION (name);
656  std::string section = "attribute_" + name;
657 
658  // \ingroup attribute
659  // \defgroup attribute_<name>Value <name> Attribute
660  os << commentStart << sectionStart << "attribute\n"
661  << subSectionStart << "attribute_" << name << " "
662  << name << " Attribute\n"
663  << "Attribute implementation for " << name << "\n";
664  if (seeBase)
665  {
666  // Some classes don't live in ns3::. Yuck
667  if (name != "IeMeshId")
668  {
669  os << seeAlso << "ns3::" << name << "\n";
670  }
671  else
672  {
673  os << seeAlso << "ns3::dot11s::" << name << "\n";
674  }
675  }
676  os << commentStop;
677 
678 } // PrintAttributeValueSection ()
679 
680 
691 void
692 PrintAttributeValueWithName (std::ostream & os,
693  const std::string & name,
694  const std::string & type,
695  const std::string & header)
696 {
697  NS_LOG_FUNCTION (name << type << header);
698  std::string sectAttr = sectionStart + "attribute_" + name;
699 
700  // \ingroup attribute_<name>Value
701  // \class ns3::<name>Value "header"
702  std::string valClass = name + "Value";
703  std::string qualClass = " ns3::" + valClass;
704 
705  os << commentStart << sectAttr << std::endl;
706  os << classStart << qualClass << " \"" << header << "\"" << std::endl;
707  os << "AttributeValue implementation for " << name << "." << std::endl;
708  os << seeAlso << "AttributeValue" << std::endl;
709  os << commentStop;
710 
711  // Copy ctor: <name>Value::<name>Value
712  os << commentStart
713  << functionStart << name
714  << qualClass << "::" << valClass;
715  if ( (name == "EmptyAttribute") ||
716  (name == "ObjectPtrContainer") )
717  {
718  // Just default constructors.
719  os << "(void)\n";
720  }
721  else
722  {
723  // Copy constructors
724  os << "(const " << type << " & value)\n"
725  << "Copy constructor.\n"
726  << argument << "[in] value The " << name << " value to copy.\n";
727  }
728  os << commentStop;
729 
730  // <name>Value::Get (void) const
731  os << commentStart
732  << functionStart << type
733  << qualClass << "::Get (void) const\n"
734  << returns << "The " << name << " value.\n"
735  << commentStop;
736 
737  // <name>Value::GetAccessor (T & value) const
738  os << commentStart
739  << functionStart << "bool"
740  << qualClass << "::GetAccessor (T & value) const\n"
741  << "Access the " << name << " value as type " << codeWord << "T.\n"
742  << templateArgument << "T " << templArgExplicit << "The type to cast to.\n"
743  << argument << "[out] value The " << name << " value, as type "
744  << codeWord << "T.\n"
745  << returns << "true.\n"
746  << commentStop;
747 
748  // <name>Value::Set (const name & value)
749  if (type != "Callback") // Yuck
750  {
751  os << commentStart
752  << functionStart << "void"
753  << qualClass << "::Set (const " << type << " & value)\n"
754  << "Set the value.\n"
755  << argument << "[in] value The value to adopt.\n"
756  << commentStop;
757  }
758 
759  // <name>Value::m_value
760  os << commentStart
761  << variable << type
762  << qualClass << "::m_value\n"
763  << "The stored " << name << " instance.\n"
764  << commentStop
765  << std::endl;
766 
767 } // PrintAttributeValueWithName ()
768 
769 
778 void
779 PrintMakeAccessors (std::ostream & os, const std::string & name)
780 {
781  NS_LOG_FUNCTION (name);
782  std::string sectAttr = sectionStart + "attribute_" + name + "\n";
783  std::string make = "ns3::Make" + name + "Accessor ";
784 
785  // \ingroup attribute_<name>Value
786  // Make<name>Accessor (T1 a1)
787  os << commentStart << sectAttr
788  << functionStart << "ns3::Ptr<const ns3::AttributeAccessor> "
789  << make << "(T1 a1)\n"
790  << copyDoc << "ns3::MakeAccessorHelper(T1)\n"
791  << seeAlso << "AttributeAccessor\n"
792  << commentStop;
793 
794  // \ingroup attribute_<name>Value
795  // Make<name>Accessor (T1 a1)
796  os << commentStart << sectAttr
797  << functionStart << "ns3::Ptr<const ns3::AttributeAccessor> "
798  << make << "(T1 a1, T2 a2)\n"
799  << copyDoc << "ns3::MakeAccessorHelper(T1,T2)\n"
800  << seeAlso << "AttributeAccessor\n"
801  << commentStop;
802 } // PrintMakeAccessors ()
803 
804 
814 void
815 PrintMakeChecker (std::ostream & os,
816  const std::string & name,
817  const std::string & header)
818 {
819  NS_LOG_FUNCTION (name << header);
820  std::string sectAttr = sectionStart + "attribute_" + name + "\n";
821  std::string make = "ns3::Make" + name + "Checker ";
822 
823  // \ingroup attribute_<name>Value
824  // class <name>Checker
825  os << commentStart << sectAttr << std::endl;
826  os << classStart << " ns3::" << name << "Checker"
827  << " \"" << header << "\"" << std::endl;
828  os << "AttributeChecker implementation for " << name << "Value." << std::endl;
829  os << seeAlso << "AttributeChecker" << std::endl;
830  os << commentStop;
831 
832  // \ingroup attribute_<name>Value
833  // Make<name>Checker (void)
834  os << commentStart << sectAttr
835  << functionStart << "ns3::Ptr<const ns3::AttributeChecker> "
836  << make << "(void)\n"
837  << returns << "The AttributeChecker.\n"
838  << seeAlso << "AttributeChecker\n"
839  << commentStop;
840 } // PrintMakeChecker ()
841 
842 
844 typedef struct {
845  const std::string m_name;
846  const std::string m_type;
847  const bool m_seeBase;
848  const std::string m_header;
850 
851 
860 void
861 PrintAttributeHelper (std::ostream & os,
862  const AttributeDescriptor & attr)
863 {
864  NS_LOG_FUNCTION (attr.m_name << attr.m_type << attr.m_seeBase <<
865  attr.m_header);
867  PrintAttributeValueWithName (os, attr.m_name, attr.m_type, attr.m_header);
868  PrintMakeAccessors (os, attr.m_name);
869  PrintMakeChecker (os, attr.m_name, attr.m_header);
870 } // PrintAttributeHelper ()
871 
872 
876 void
877 PrintAttributeImplementations (std::ostream & os)
878 {
880 
881  const AttributeDescriptor attributes [] =
882  {
883  // Name Type see Base header-file
884  // Users of ATTRIBUTE_HELPER_HEADER
885  //
886  { "Address", "Address", true, "address.h" },
887  { "Box", "Box", true, "box.h" },
888  { "DataRate", "DataRate", true, "data-rate.h" },
889  { "DsssParameterSet",
890  "DsssParameterSet",
891  true, "dsss-parameter-set.h"},
892  { "EdcaParameterSet",
893  "EdcaParameterSet",
894  true, "edca-parameter-set.h"},
895  { "ErpInformation", "ErpInformation", true, "erp-information.h" },
896  { "ExtendedCapabilities", "ExtendedCapabilities", true, "extended-capabilities.h" },
897  { "HeCapabilities", "HeCapabilities", true, "he-capabilities.h" },
898  { "VhtCapabilities","VhtCapabilities",true, "vht-capabilities.h" },
899  { "HtCapabilities", "HtCapabilities", true, "ht-capabilities.h" },
900  { "IeMeshId", "IeMeshId", true, "ie-dot11s-id.h" },
901  { "Ipv4Address", "Ipv4Address", true, "ipv4-address.h" },
902  { "Ipv4Mask", "Ipv4Mask", true, "ipv4-address.h" },
903  { "Ipv6Address", "Ipv6Address", true, "ipv6-address.h" },
904  { "Ipv6Prefix", "Ipv6Prefix", true, "ipv6-address.h" },
905  { "Mac16Address", "Mac16Address", true, "mac16-address.h" },
906  { "Mac48Address", "Mac48Address", true, "mac48-address.h" },
907  { "Mac64Address", "Mac64Address", true, "mac64-address.h" },
908  { "ObjectFactory", "ObjectFactory", true, "object-factory.h" },
909  { "OrganizationIdentifier",
910  "OrganizationIdentifier",
911  true, "vendor-specific-action.h" },
912  { "Rectangle", "Rectangle", true, "rectangle.h" },
913  { "Ssid", "Ssid", true, "ssid.h" },
914  { "TypeId", "TypeId", true, "type-id.h" },
915  { "UanModesList", "UanModesList", true, "uan-tx-mode.h" },
916  // { "ValueClassTest", "ValueClassTest", false, "" /* outside ns3 */ },
917  { "Vector2D", "Vector2D", true, "vector.h" },
918  { "Vector3D", "Vector3D", true, "vector.h" },
919  { "HeOperation", "HeOperation", true, "he-operation.h" },
920  { "VhtOperation", "VhtOperation", true, "vht-operation.h" },
921  { "HtOperation", "HtOperation", true, "ht-operation.h" },
922  { "Waypoint", "Waypoint", true, "waypoint.h" },
923  { "WifiMode", "WifiMode", true, "wifi-mode.h" },
924 
925  // All three (Value, Access and Checkers) defined, but custom
926  { "Boolean", "Boolean", false, "boolean.h" },
927  { "Callback", "Callback", true, "callback.h" },
928  { "Double", "double", false, "double.h" },
929  { "Enum", "int", false, "enum.h" },
930  { "Integer", "int64_t", false, "integer.h" },
931  { "Pointer", "Pointer", false, "pointer.h" },
932  { "RandomVariable", "RandomVariable", true, "random-variable-stream.h" },
933  { "String", "std::string", false, "string.h" },
934  { "Time", "Time", true, "nstime.h" },
935  { "Uinteger", "uint64_t", false, "uinteger.h" },
936  { "", "", false, "last placeholder" }
937  };
938 
939  int i = 0;
940  while (attributes[i].m_name != "")
941  {
942  PrintAttributeHelper (os, attributes[i]);
943  ++i;
944  }
945 
946  // Special cases
947  PrintAttributeValueSection (os, "EmptyAttribute", false);
948  PrintAttributeValueWithName (os, "EmptyAttribute", "EmptyAttribute",
949  "attribute.h");
950 
951  PrintAttributeValueSection (os, "ObjectPtrContainer", false);
952  PrintAttributeValueWithName (os, "ObjectPtrContainer", "ObjectPtrContainer", "object-ptr-container.h");
953  PrintMakeChecker (os, "ObjectPtrContainer", "object-ptr-container.h");
954 
955  PrintAttributeValueSection (os, "ObjectVector", false);
956  PrintMakeAccessors (os, "ObjectVector");
957  PrintMakeChecker (os, "ObjectVector", "object-vector.h");
958 
959  PrintAttributeValueSection (os, "ObjectMap", false);
960  PrintMakeAccessors (os, "ObjectMap");
961  PrintMakeChecker (os, "ObjectMap", "object-map.h");
962 
963 } // PrintAttributeImplementations ()
964 
965 
966 /***************************************************************
967  * Aggregation and configuration paths
968  ***************************************************************/
969 
974 {
975 public:
982  void RecordAggregationInfo (std::string a, std::string b);
988  void Gather (TypeId tid);
992  void Print (void) const;
993 
999  std::vector<std::string> Get (TypeId tid) const;
1000 
1004  std::vector<std::string> GetNoTypeIds (void) const;
1005 
1006 private:
1010  std::string GetCurrentPath (void) const;
1016  void DoGather (TypeId tid);
1022  void RecordOutput (TypeId tid);
1028  bool HasAlreadyBeenProcessed (TypeId tid) const;
1032  std::vector<std::pair<TypeId,std::string> > m_output;
1036  std::vector<std::string> m_currentPath;
1040  std::vector<TypeId> m_alreadyProcessed;
1044  std::vector<std::pair<TypeId,TypeId> > m_aggregates;
1051  mutable std::vector<std::string> m_noTids;
1052 
1053 }; // class StaticInformation
1054 
1055 
1056 void
1057 StaticInformation::RecordAggregationInfo (std::string a, std::string b)
1058 {
1059  NS_LOG_FUNCTION (this << a << b);
1060  TypeId aTid;
1061  bool found = TypeId::LookupByNameFailSafe (a, &aTid);
1062  if (!found)
1063  {
1064  m_noTids.push_back (a);
1065  return;
1066  }
1067  TypeId bTid;
1068  found = TypeId::LookupByNameFailSafe (b, &bTid);
1069  if (!found)
1070  {
1071  m_noTids.push_back (b);
1072  return;
1073  }
1074 
1075  m_aggregates.push_back (std::make_pair (aTid, bTid));
1076 }
1077 
1078 
1079 void
1081 {
1082  NS_LOG_FUNCTION (this);
1083  for (std::vector<std::pair<TypeId,std::string> >::const_iterator i = m_output.begin (); i != m_output.end (); ++i)
1084  {
1085  std::pair<TypeId,std::string> item = *i;
1086  std::cout << item.first.GetName () << " -> " << item.second << std::endl;
1087  }
1088 }
1089 
1090 
1091 std::string
1093 {
1094  NS_LOG_FUNCTION (this);
1095  std::ostringstream oss;
1096  for (std::vector<std::string>::const_iterator i = m_currentPath.begin (); i != m_currentPath.end (); ++i)
1097  {
1098  std::string item = *i;
1099  oss << "/" << item;
1100  }
1101  return oss.str ();
1102 }
1103 
1104 
1105 void
1107 {
1108  NS_LOG_FUNCTION (this << tid);
1109  m_output.push_back (std::make_pair (tid, GetCurrentPath ()));
1110 }
1111 
1112 
1113 bool
1115 {
1116  NS_LOG_FUNCTION (this << tid);
1117  for (uint32_t i = 0; i < m_alreadyProcessed.size (); ++i)
1118  {
1119  if (m_alreadyProcessed[i] == tid)
1120  {
1121  return true;
1122  }
1123  }
1124  return false;
1125 }
1126 
1127 
1128 std::vector<std::string>
1130 {
1131  NS_LOG_FUNCTION (this << tid);
1132  std::vector<std::string> paths;
1133  for (uint32_t i = 0; i < m_output.size (); ++i)
1134  {
1135  std::pair<TypeId,std::string> tmp = m_output[i];
1136  if (tmp.first == tid)
1137  {
1138  paths.push_back (tmp.second);
1139  }
1140  }
1141  return paths;
1142 }
1143 
1159 template <typename T>
1160 void
1162 {
1163  std::sort (t.begin (), t.end ());
1164  t.erase (std::unique (t.begin (), t.end ()), t.end ());
1165 }
1166 
1167 std::vector<std::string>
1169 {
1170  NS_LOG_FUNCTION (this);
1171  Uniquefy (m_noTids);
1172  return m_noTids;
1173 }
1174 
1175 
1176 void
1178 {
1179  NS_LOG_FUNCTION (this << tid);
1180  DoGather (tid);
1181  Uniquefy (m_output);
1182 }
1183 
1184 
1185 void
1187 {
1188  NS_LOG_FUNCTION (this << tid);
1189  if (HasAlreadyBeenProcessed (tid))
1190  {
1191  return;
1192  }
1193  RecordOutput (tid);
1194  for (uint32_t i = 0; i < tid.GetAttributeN (); ++i)
1195  {
1196  struct TypeId::AttributeInformation info = tid.GetAttribute(i);
1197  const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
1198  if (ptrChecker != 0)
1199  {
1200  TypeId pointee = ptrChecker->GetPointeeTypeId ();
1201 
1202  // See if this is a pointer to an Object.
1203  Ptr<Object> object = CreateObject<Object> ();
1204  TypeId objectTypeId = object->GetTypeId ();
1205  if (objectTypeId == pointee)
1206  {
1207  // Stop the recursion at this attribute if it is a
1208  // pointer to an Object, which create too many spurious
1209  // paths in the list of attribute paths because any
1210  // Object can be in that part of the path.
1211  continue;
1212  }
1213 
1214  m_currentPath.push_back (info.name);
1215  m_alreadyProcessed.push_back (tid);
1216  DoGather (pointee);
1217  m_alreadyProcessed.pop_back ();
1218  m_currentPath.pop_back ();
1219  continue;
1220  }
1221  // attempt to cast to an object vector.
1222  const ObjectPtrContainerChecker *vectorChecker = dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
1223  if (vectorChecker != 0)
1224  {
1225  TypeId item = vectorChecker->GetItemTypeId ();
1226  m_currentPath.push_back (info.name + "/[i]");
1227  m_alreadyProcessed.push_back (tid);
1228  DoGather (item);
1229  m_alreadyProcessed.pop_back ();
1230  m_currentPath.pop_back ();
1231  continue;
1232  }
1233  }
1234  for (uint32_t j = 0; j < TypeId::GetRegisteredN (); j++)
1235  {
1236  TypeId child = TypeId::GetRegistered (j);
1237  if (child.IsChildOf (tid))
1238  {
1239  std::string childName = "$" + child.GetName ();
1240  m_currentPath.push_back (childName);
1241  m_alreadyProcessed.push_back (tid);
1242  DoGather (child);
1243  m_alreadyProcessed.pop_back ();
1244  m_currentPath.pop_back ();
1245  }
1246  }
1247  for (uint32_t k = 0; k < m_aggregates.size (); ++k)
1248  {
1249  std::pair<TypeId,TypeId> tmp = m_aggregates[k];
1250  if (tmp.first == tid || tmp.second == tid)
1251  {
1252  TypeId other;
1253  if (tmp.first == tid)
1254  {
1255  other = tmp.second;
1256  }
1257  if (tmp.second == tid)
1258  {
1259  other = tmp.first;
1260  }
1261  std::string name = "$" + other.GetName ();
1262  m_currentPath.push_back (name);
1263  m_alreadyProcessed.push_back (tid);
1264  DoGather (other);
1265  m_alreadyProcessed.pop_back ();
1266  m_currentPath.pop_back ();
1267  }
1268  }
1269 } // StaticInformation::DoGather ()
1270 
1271 
1277 {
1279  // The below statements register typical aggregation relationships
1280  // in ns-3 programs, that otherwise aren't picked up automatically
1281  // by the creation of the above node. To manually list other common
1282  // aggregation relationships that you would like to see show up in
1283  // the list of configuration paths in the doxygen, add additional
1284  // statements below.
1285  StaticInformation info;
1286  info.RecordAggregationInfo ("ns3::Node", "ns3::TcpSocketFactory");
1287  info.RecordAggregationInfo ("ns3::Node", "ns3::UdpSocketFactory");
1288  info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory");
1289  info.RecordAggregationInfo ("ns3::Node", "ns3::MobilityModel");
1290  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L3Protocol");
1291  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4NixVectorRouting");
1292  info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv4L4Protocol");
1293  info.RecordAggregationInfo ("ns3::Node", "ns3::ArpL3Protocol");
1294  info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv4L4Protocol");
1295  info.RecordAggregationInfo ("ns3::Node", "ns3::UdpL4Protocol");
1296  info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv6L3Protocol");
1297  info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv6L4Protocol");
1298  info.RecordAggregationInfo ("ns3::Node", "ns3::TcpL4Protocol");
1299  info.RecordAggregationInfo ("ns3::Node", "ns3::RipNg");
1300  info.RecordAggregationInfo ("ns3::Node", "ns3::GlobalRouter");
1301  info.RecordAggregationInfo ("ns3::Node", "ns3::aodv::RoutingProtocol");
1302  info.RecordAggregationInfo ("ns3::Node", "ns3::dsdv::RoutingProtocol");
1303  info.RecordAggregationInfo ("ns3::Node", "ns3::dsr::DsrRouting");
1304  info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::RoutingProtocol");
1305  info.RecordAggregationInfo ("ns3::Node", "ns3::EnergyHarvesterContainer");
1306  info.RecordAggregationInfo ("ns3::Node", "ns3::EnergySourceContainer");
1307 
1308  // Create a channel object so that channels appear in the namespace
1309  // paths that will be generated here.
1310  Ptr<SimpleChannel> simpleChannel;
1311  simpleChannel = CreateObject<SimpleChannel> ();
1312 
1313  for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i)
1314  {
1316  info.Gather (object->GetInstanceTypeId ());
1317  }
1318 
1319  return info;
1320 
1321 } // GetTypicalAggregations ()
1322 
1323 
1325 typedef std::map< std::string, int32_t> NameMap;
1326 typedef NameMap::const_iterator NameMapIterator;
1327 
1328 
1336 NameMap
1338 {
1340  NameMap nameMap;
1341 
1342  // Registered types
1343  for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++)
1344  {
1345  TypeId tid = TypeId::GetRegistered (i);
1346  if (tid.MustHideFromDocumentation ())
1347  {
1348  continue;
1349  }
1350 
1351  // Capitalize all of letters in the name so that it sorts
1352  // correctly in the map.
1353  std::string name = tid.GetName ();
1354  for (uint32_t j = 0; j < name.length (); j++)
1355  {
1356  name[j] = toupper (name[j]);
1357  }
1358 
1359  // Save this name's index.
1360  nameMap[name] = i;
1361  }
1362 
1363  // Type names without TypeIds
1364  std::vector<std::string> noTids = info.GetNoTypeIds ();
1365  for (std::vector<std::string>::const_iterator i = noTids.begin ();
1366  i != noTids.end ();
1367  ++i)
1368  {
1369  nameMap[*i] = -1;
1370  }
1371 
1372  return nameMap;
1373 } // GetNameMap ()
1374 
1375 
1382 void
1383 PrintConfigPaths (std::ostream & os, const StaticInformation & info,
1384  const TypeId tid)
1385 {
1386  NS_LOG_FUNCTION (tid);
1387  std::vector<std::string> paths = info.Get (tid);
1388 
1389  // Config --------------
1390  if (paths.empty ())
1391  {
1392  os << "Introspection did not find any typical Config paths."
1393  << breakBoth
1394  << std::endl;
1395  }
1396  else
1397  {
1398  os << headingStart
1399  << "Config Paths"
1400  << headingStop
1401  << std::endl;
1402  os << std::endl;
1403  os << tid.GetName ()
1404  << " is accessible through the following paths"
1405  << " with Config::Set and Config::Connect:"
1406  << std::endl;
1407  os << listStart << std::endl;
1408  for (uint32_t k = 0; k < paths.size (); ++k)
1409  {
1410  std::string path = paths[k];
1411  os << listLineStart
1412  << "\"" << path << "\""
1413  << listLineStop
1414  << breakTextOnly
1415  << std::endl;
1416  }
1417  os << listStop << std::endl;
1418  }
1419 } // PrintConfigPaths ()
1420 
1421 
1422 /***************************************************************
1423  * Main
1424  ***************************************************************/
1425 
1426 int main (int argc, char *argv[])
1427 {
1429  bool outputText = false;
1430 
1431  CommandLine cmd;
1432  cmd.Usage ("Generate documentation for all ns-3 registered types, "
1433  "trace sources, attributes and global variables.");
1434  cmd.AddValue ("output-text", "format output as plain text", outputText);
1435  cmd.Parse (argc, argv);
1436 
1437  SetMarkup (outputText);
1438 
1439 
1440  // Create a Node, to force linking and instantiation of our TypeIds
1441  NodeContainer c;
1442  c.Create (1);
1443 
1444  // mode-line: helpful when debugging introspected-doxygen.h
1445  if (!outputText)
1446  {
1447  std::cout << "/* -*- Mode:C++; c-file-style:\"gnu\"; "
1448  "indent-tabs-mode:nil; -*- */\n"
1449  << std::endl;
1450  std::cout << "#include \"ns3/log.h\""
1451  << std::endl;
1452  }
1453 
1454  // Doxygen file header
1455  std::cout << std::endl;
1456  std::cout << commentStart
1457  << file << "\n"
1458  << sectionStart << "utils\n"
1459  << "Doxygen docs generated from the TypeId database.\n"
1460  << note << "This file is automatically generated by "
1461  << codeWord << "print-introspected-doxygen.cc. Do not edit this file! "
1462  << "Edit that file instead.\n"
1463  << commentStop
1464  << std::endl;
1465 
1466  // Get typical aggregation relationships.
1468 
1469  NameMap nameMap = GetNameMap (info);
1470 
1471  // Iterate over the map, which will print the class names in
1472  // alphabetical order.
1473  for (NameMapIterator nameMapIterator = nameMap.begin ();
1474  nameMapIterator != nameMap.end ();
1475  nameMapIterator++)
1476  {
1477  // Get the class's index out of the map;
1478  std::string name = nameMapIterator->first;
1479  int32_t i = nameMapIterator->second;
1480  TypeId tid;
1481 
1482  if (i >= 0)
1483  {
1484  tid = TypeId::GetRegistered (i);
1485  if (tid.MustHideFromDocumentation ())
1486  {
1487  continue;
1488  }
1489  name = tid.GetName ();
1490  }
1491 
1492  std::cout << commentStart << std::endl;
1493 
1494  std::cout << classStart << name << std::endl;
1495  std::cout << std::endl;
1496 
1497  if (i >= 0)
1498  {
1499  PrintConfigPaths (std::cout, info, tid);
1500  PrintAttributes (std::cout, tid);
1501  PrintTraceSources (std::cout, tid);
1502  PrintSize (std::cout, tid);
1503  }
1504  else
1505  {
1506  std::cout << "Introspection could not find Config paths for " << name
1507  << " in this build because the parent module"
1508  << " was not included in the waf configuration."
1509  << breakBoth
1510  << std::endl;
1511  }
1512 
1513  std::cout << commentStop << std::endl;
1514  } // class documentation
1515 
1516 
1517  PrintAllAttributes (std::cout);
1518  PrintAllGlobals (std::cout);
1519  PrintAllLogComponents (std::cout);
1520  PrintAllTraceSources (std::cout);
1521  PrintAttributeImplementations (std::cout);
1522 
1523  return 0;
1524 }
bool IsChildOf(TypeId other) const
Check if this TypeId is a child of another.
Definition: type-id.cc:950
std::string GetName(void) const
Get the name.
Definition: type-id.cc:969
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
std::string help
Trace help string.
Definition: type-id.h:101
bool HasAlreadyBeenProcessed(TypeId tid) const
const std::string m_header
The header file name.
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.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
Hold variables of type string.
Definition: string.h:41
std::string templArgDeduced
template argument deduced from function
TraceSource implementation.
Definition: type-id.h:97
std::string headingStart
start of section heading (h3)
U * PeekPointer(const Ptr< U > &p)
Definition: ptr.h:564
const std::string m_type
The name of the underlying type.
virtual TypeId GetPointeeTypeId(void) const =0
Get the TypeId of the base type.
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:202
Vector::const_iterator Iterator
Iterator type for the list of all global values.
Definition: global-value.h:80
void Print(void) const
Print output in "a -> b" form on std::cout.
static TypeId GetRegistered(uint16_t i)
Get a TypeId by index.
Definition: type-id.cc:870
std::string templArgExplicit
template argument required
cmd
Definition: second.py:35
static bool LookupByNameFailSafe(std::string name, TypeId *tid)
Get a TypeId by name.
Definition: type-id.cc:832
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
The attribute can be written at construction-time.
Definition: type-id.h:65
virtual TypeId GetItemTypeId(void) const =0
Get the TypeId of the container class type.
std::size_t GetTraceSourceN(void) const
Get the number of Trace sources.
Definition: type-id.cc:1090
TypeId GetParent(void) const
Get the parent of this TypeId.
Definition: type-id.cc:936
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:63
Ptr< const AttributeAccessor > accessor
Accessor object.
Definition: type-id.h:88
std::string Get(void) const
Definition: string.cc:31
std::vector< std::string > Get(TypeId tid) const
const std::string m_name
The base name of the resulting AttributeValue type.
static Iterator Begin(void)
The Begin iterator.
Ptr< const AttributeValue > initialValue
Configured initial value.
Definition: type-id.h:86
std::string sectionStart
start of a section or group
Ptr< Object > GetRootNamespaceObject(uint32_t i)
Definition: config.cc:878
AttributeChecker implementation for ObjectPtrContainerValue.
bool MustHideFromDocumentation(void) const
Check if this TypeId should not be listed in documentation.
Definition: type-id.cc:1061
struct TypeId::TraceSourceInformation GetTraceSource(std::size_t i) const
Get the trace source by index.
Definition: type-id.cc:1096
Attribute implementation.
Definition: type-id.h:76
Parse command-line arguments.
Definition: command-line.h:213
uint32_t flags
AttributeFlags value.
Definition: type-id.h:82
std::string breakHtmlOnly
linebreak for html output only
std::map< std::string, LogComponent * > ComponentList
LogComponent name map.
Definition: log.h:417
Ptr< const AttributeChecker > checker
Checker object.
Definition: type-id.h:90
std::string codeWord
format next word as source code
std::vector< std::string > m_noTids
List of type names without TypeIds, because those modules aren&#39;t enabled.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
std::string name
Attribute name.
Definition: type-id.h:78
std::size_t GetSize(void) const
Get the size of this object.
Definition: type-id.cc:983
std::size_t GetRootNamespaceObjectN(void)
Definition: config.cc:872
The attribute can be written.
Definition: type-id.h:64
std::string name
Trace name.
Definition: type-id.h:99
static ComponentList * GetComponentList(void)
Get the list of LogComponnents.
Definition: log.cc:80
const bool m_seeBase
Print a "see also" pointing to the base class.
std::vector< TypeId > m_alreadyProcessed
List of TypeIds we&#39;ve already processed.
AttributeChecker implementation for PointerValue.
Definition: pointer.h:97
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: object.cc:79
Descriptor for an AttributeValue.
std::size_t GetAttributeN(void) const
Get the number of attributes.
Definition: type-id.cc:1069
static Iterator End(void)
The End iterator.
Gather aggregation and configuration path information from registered types.
void Print(ComponentCarrier cc)
struct TypeId::AttributeInformation GetAttribute(std::size_t i) const
Get Attribute information by index.
Definition: type-id.cc:1076
std::string copyDoc
copy (or refer) to docs elsewhere
std::string GetCurrentPath(void) const
std::vector< std::string > m_currentPath
Current configuration path.
std::string callback
Callback function signature type.
Definition: type-id.h:103
void Gather(TypeId tid)
Gather aggregation and configuration path information for tid.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
std::vector< std::pair< TypeId, TypeId > > m_aggregates
List of aggregation relationships.
static uint16_t GetRegisteredN(void)
Get the number of registered TypeIds.
Definition: type-id.cc:864
std::string flagSpanStop
end of Attribute flag value
a unique identifier for an interface.
Definition: type-id.h:58
std::vector< std::string > GetNoTypeIds(void) const
std::string help
Attribute help string.
Definition: type-id.h:80
void RecordAggregationInfo(std::string a, std::string b)
Record the a -> b aggregation relation.