A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
print-introspected-doxygen.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19
26#include "ns3/command-line.h"
27#include "ns3/config.h"
28#include "ns3/global-value.h"
29#include "ns3/log.h"
30#include "ns3/node-container.h"
31#include "ns3/object-vector.h"
32#include "ns3/object.h"
33#include "ns3/pointer.h"
34#include "ns3/simple-channel.h"
35#include "ns3/string.h"
36#include "ns3/system-path.h"
37
38#include <algorithm>
39#include <climits> // CHAR_BIT
40#include <iomanip>
41#include <iostream>
42#include <map>
43#include <utility> // as_const
44
45using namespace ns3;
46
47NS_LOG_COMPONENT_DEFINE("PrintIntrospectedDoxygen");
48
49namespace
50{
52bool outputText = false;
53
58std::string anchor;
59std::string argument;
60std::string boldStart;
61std::string boldStop;
62std::string breakBoth;
63std::string breakHtmlOnly;
64std::string breakTextOnly;
65std::string brief;
66std::string classStart;
67std::string classStop;
68std::string codeWord;
69std::string commentStart;
70std::string commentStop;
71std::string copyDoc;
72std::string file;
73std::string flagSpanStart;
74std::string flagSpanStop;
75std::string functionStart;
76std::string functionStop;
77std::string headingStart;
78std::string headingStop;
79// Linking: [The link text displayed](\ref TheTarget)
80std::string hrefStart;
81std::string hrefMid;
82std::string hrefStop;
83std::string indentHtmlOnly;
84std::string listLineStart;
85std::string listLineStop;
86std::string listStart;
87std::string listStop;
88std::string note;
89std::string page;
90std::string reference;
91std::string referenceNo;
92std::string returns;
93std::string sectionStart;
94std::string seeAlso;
95std::string subSectionStart;
96std::string templArgDeduced;
97std::string templArgExplicit;
98std::string templateArgument;
99std::string variable;
100
108std::map<std::string, ns3::TypeId::AttributeInformation>
110{
111 std::map<std::string, ns3::TypeId::AttributeInformation> index;
112 for (uint32_t j = 0; j < tid.GetAttributeN(); j++)
113 {
114 struct TypeId::AttributeInformation info = tid.GetAttribute(j);
115 index[info.name] = info;
116 }
117 return index;
118}
119
126std::map<std::string, ns3::TypeId::TraceSourceInformation>
128{
129 std::map<std::string, ns3::TypeId::TraceSourceInformation> index;
130 for (uint32_t j = 0; j < tid.GetTraceSourceN(); j++)
131 {
133 index[info.name] = info;
134 }
135 return index;
136}
137
138} // unnamed namespace
139
143void
145{
147 if (outputText)
148 {
149 anchor = "";
150 argument = " Arg: ";
151 boldStart = "";
152 boldStop = "";
153 breakBoth = "\n";
154 breakHtmlOnly = "";
155 breakTextOnly = "\n";
156 brief = "";
157 classStart = "";
158 classStop = "\n\n";
159 codeWord = " ";
160 commentStart = "===============================================================\n";
161 commentStop = "";
162 copyDoc = " See: ";
163 file = "File: introspected-doxygen.txt";
164 flagSpanStart = "";
165 flagSpanStop = "";
166 functionStart = "";
167 functionStop = "\n\n";
168 headingStart = "";
169 headingStop = "";
170 // Linking: The link text displayed (see TheTarget)
171 hrefStart = "";
172 hrefMid = "(see ";
173 hrefStop = ")";
174 indentHtmlOnly = "";
175 listLineStart = " * ";
176 listLineStop = "";
177 listStart = "";
178 listStop = "";
179 note = "Note: ";
180 page = "Page ";
181 reference = " ";
182 referenceNo = " ";
183 returns = " Returns: ";
184 sectionStart = "Section: ";
185 seeAlso = " See: ";
186 subSectionStart = "Subsection ";
187 templArgDeduced = "[deduced] ";
188 templArgExplicit = "[explicit] ";
189 templateArgument = "Template Arg: ";
190 variable = "Variable: ";
191 }
192 else
193 {
194 anchor = "\\anchor ";
195 argument = "\\param ";
196 boldStart = "<b>";
197 boldStop = "</b>";
198 breakBoth = "<br>";
199 breakHtmlOnly = "<br>";
200 breakTextOnly = "";
201 brief = "\\brief ";
202 classStart = "\\class ";
203 classStop = "";
204 codeWord = "\\p ";
205 commentStart = "/*!\n";
206 commentStop = "*/\n";
207 copyDoc = "\\copydoc ";
208 file = "\\file";
209 flagSpanStart = "<span class=\"mlabel\">";
210 flagSpanStop = "</span>";
211 functionStart = "\\fn ";
212 functionStop = "";
213 headingStart = "<h3>";
214 headingStop = "</h3>";
215 // Linking: [The link text displayed](\ref TheTarget)
216 hrefStart = "[";
217 hrefMid = "](\\ref ";
218 hrefStop = ")";
219 indentHtmlOnly = " ";
220 listLineStart = "<li>";
221 listLineStop = "</li>";
222 listStart = "<ul>";
223 listStop = "</ul>";
224 note = "\\note ";
225 page = "\\page ";
226 reference = " \\ref ";
227 referenceNo = " %";
228 returns = "\\returns ";
229 sectionStart = "\\ingroup ";
230 seeAlso = "\\see ";
231 subSectionStart = "\\addtogroup ";
232 templArgDeduced = "\\deduced ";
233 templArgExplicit = "\\explicit ";
234 templateArgument = "\\tparam ";
235 variable = "\\var ";
236 }
237} // SetMarkup ()
238
239/***************************************************************
240 * Aggregation and configuration paths
241 ***************************************************************/
242
247{
248 public:
255 void RecordAggregationInfo(std::string a, std::string b);
261 void Gather(TypeId tid);
265 void Print() const;
266
272 std::vector<std::string> Get(TypeId tid) const;
273
277 std::vector<std::string> GetNoTypeIds() const;
278
279 private:
283 std::string GetCurrentPath() const;
289 void DoGather(TypeId tid);
295 void RecordOutput(TypeId tid);
301 bool HasAlreadyBeenProcessed(TypeId tid) const;
305 std::vector<std::pair<TypeId, std::string>> m_output;
309 std::vector<std::string> m_currentPath;
313 std::vector<TypeId> m_alreadyProcessed;
317 std::vector<std::pair<TypeId, TypeId>> m_aggregates;
324 mutable std::vector<std::string> m_noTids;
325
326}; // class StaticInformation
327
328void
329StaticInformation::RecordAggregationInfo(std::string a, std::string b)
330{
331 NS_LOG_FUNCTION(this << a << b);
332 TypeId aTid;
333 bool found = TypeId::LookupByNameFailSafe(a, &aTid);
334 if (!found)
335 {
336 m_noTids.push_back(a);
337 return;
338 }
339 TypeId bTid;
340 found = TypeId::LookupByNameFailSafe(b, &bTid);
341 if (!found)
342 {
343 m_noTids.push_back(b);
344 return;
345 }
346
347 m_aggregates.emplace_back(aTid, bTid);
348}
349
350void
352{
353 NS_LOG_FUNCTION(this);
354 for (const auto& item : m_output)
355 {
356 std::cout << item.first.GetName() << " -> " << item.second << std::endl;
357 }
358}
359
360std::string
362{
363 NS_LOG_FUNCTION(this);
364 std::ostringstream oss;
365 for (const auto& item : m_currentPath)
366 {
367 oss << "/" << item;
368 }
369 return oss.str();
370}
371
372void
374{
375 NS_LOG_FUNCTION(this << tid);
376 m_output.emplace_back(tid, GetCurrentPath());
377}
378
379bool
381{
382 NS_LOG_FUNCTION(this << tid);
383 for (const auto& it : m_alreadyProcessed)
384 {
385 if (it == tid)
386 {
387 return true;
388 }
389 }
390 return false;
391}
392
393std::vector<std::string>
395{
396 NS_LOG_FUNCTION(this << tid);
397 std::vector<std::string> paths;
398 for (const auto& item : m_output)
399 {
400 if (item.first == tid)
401 {
402 paths.push_back(item.second);
403 }
404 }
405 return paths;
406}
407
423template <typename T>
424void
426{
427 std::sort(t.begin(), t.end());
428 t.erase(std::unique(t.begin(), t.end()), t.end());
429}
430
431std::vector<std::string>
433{
434 NS_LOG_FUNCTION(this);
436 return m_noTids;
437}
438
439void
441{
442 NS_LOG_FUNCTION(this << tid);
443 DoGather(tid);
445}
446
447void
449{
450 NS_LOG_FUNCTION(this << tid);
452 {
453 return;
454 }
455 RecordOutput(tid);
456 for (uint32_t i = 0; i < tid.GetAttributeN(); ++i)
457 {
458 struct TypeId::AttributeInformation info = tid.GetAttribute(i);
459 const auto ptrChecker = dynamic_cast<const PointerChecker*>(PeekPointer(info.checker));
460 if (ptrChecker != nullptr)
461 {
462 TypeId pointee = ptrChecker->GetPointeeTypeId();
463
464 // See if this is a pointer to an Object.
465 Ptr<Object> object = CreateObject<Object>();
466 TypeId objectTypeId = object->GetTypeId();
467 if (objectTypeId == pointee)
468 {
469 // Stop the recursion at this attribute if it is a
470 // pointer to an Object, which create too many spurious
471 // paths in the list of attribute paths because any
472 // Object can be in that part of the path.
473 continue;
474 }
475
476 m_currentPath.push_back(info.name);
477 m_alreadyProcessed.push_back(tid);
478 DoGather(pointee);
479 m_alreadyProcessed.pop_back();
480 m_currentPath.pop_back();
481 continue;
482 }
483 // attempt to cast to an object vector.
484 const auto vectorChecker =
485 dynamic_cast<const ObjectPtrContainerChecker*>(PeekPointer(info.checker));
486 if (vectorChecker != nullptr)
487 {
488 TypeId item = vectorChecker->GetItemTypeId();
489 m_currentPath.push_back(info.name + "/[i]");
490 m_alreadyProcessed.push_back(tid);
491 DoGather(item);
492 m_alreadyProcessed.pop_back();
493 m_currentPath.pop_back();
494 continue;
495 }
496 }
497 for (uint32_t j = 0; j < TypeId::GetRegisteredN(); j++)
498 {
499 TypeId child = TypeId::GetRegistered(j);
500 if (child.IsChildOf(tid))
501 {
502 std::string childName = "$" + child.GetName();
503 m_currentPath.push_back(childName);
504 m_alreadyProcessed.push_back(tid);
505 DoGather(child);
506 m_alreadyProcessed.pop_back();
507 m_currentPath.pop_back();
508 }
509 }
510 for (const auto& item : m_aggregates)
511 {
512 if (item.first == tid || item.second == tid)
513 {
514 TypeId other;
515 if (item.first == tid)
516 {
517 other = item.second;
518 }
519 if (item.second == tid)
520 {
521 other = item.first;
522 }
523 std::string name = "$" + other.GetName();
524 m_currentPath.push_back(name);
525 m_alreadyProcessed.push_back(tid);
526 DoGather(other);
527 m_alreadyProcessed.pop_back();
528 m_currentPath.pop_back();
529 }
530 }
531} // StaticInformation::DoGather ()
532
539{
541
542 static StaticInformation info;
543 static bool mapped = false;
544
545 if (mapped)
546 {
547 return info;
548 }
549
550 // Short circuit next call
551 mapped = true;
552
553 // The below statements register typical aggregation relationships
554 // in ns-3 programs, that otherwise aren't picked up automatically
555 // by the creation of the above node. To manually list other common
556 // aggregation relationships that you would like to see show up in
557 // the list of configuration paths in the doxygen, add additional
558 // statements below.
559 info.RecordAggregationInfo("ns3::Node", "ns3::TcpSocketFactory");
560 info.RecordAggregationInfo("ns3::Node", "ns3::UdpSocketFactory");
561 info.RecordAggregationInfo("ns3::Node", "ns3::PacketSocketFactory");
562 info.RecordAggregationInfo("ns3::Node", "ns3::MobilityModel");
563 info.RecordAggregationInfo("ns3::Node", "ns3::Ipv4L3Protocol");
564 info.RecordAggregationInfo("ns3::Node", "ns3::Ipv4NixVectorRouting");
565 info.RecordAggregationInfo("ns3::Node", "ns3::Icmpv4L4Protocol");
566 info.RecordAggregationInfo("ns3::Node", "ns3::ArpL3Protocol");
567 info.RecordAggregationInfo("ns3::Node", "ns3::Icmpv4L4Protocol");
568 info.RecordAggregationInfo("ns3::Node", "ns3::UdpL4Protocol");
569 info.RecordAggregationInfo("ns3::Node", "ns3::Ipv6L3Protocol");
570 info.RecordAggregationInfo("ns3::Node", "ns3::Icmpv6L4Protocol");
571 info.RecordAggregationInfo("ns3::Node", "ns3::TcpL4Protocol");
572 info.RecordAggregationInfo("ns3::Node", "ns3::RipNg");
573 info.RecordAggregationInfo("ns3::Node", "ns3::GlobalRouter");
574 info.RecordAggregationInfo("ns3::Node", "ns3::aodv::RoutingProtocol");
575 info.RecordAggregationInfo("ns3::Node", "ns3::dsdv::RoutingProtocol");
576 info.RecordAggregationInfo("ns3::Node", "ns3::dsr::DsrRouting");
577 info.RecordAggregationInfo("ns3::Node", "ns3::olsr::RoutingProtocol");
578 info.RecordAggregationInfo("ns3::Node", "ns3::EnergyHarvesterContainer");
579 info.RecordAggregationInfo("ns3::Node", "ns3::EnergySourceContainer");
580
581 // Create a channel object so that channels appear in the namespace
582 // paths that will be generated here.
583 Ptr<SimpleChannel> simpleChannel;
584 simpleChannel = CreateObject<SimpleChannel>();
585
586 for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN(); ++i)
587 {
589 info.Gather(object->GetInstanceTypeId());
590 }
591
592 return info;
593
594} // GetTypicalAggregations ()
595
597typedef std::map<std::string, int32_t> NameMap;
598typedef NameMap::const_iterator NameMapIterator;
599
608{
610
611 static NameMap nameMap;
612 static bool mapped = false;
613
614 if (mapped)
615 {
616 return nameMap;
617 }
618
619 // Short circuit next call
620 mapped = true;
621
622 // Get typical aggregation relationships.
624
625 // Registered types
626 for (uint32_t i = 0; i < TypeId::GetRegisteredN(); i++)
627 {
630 {
631 continue;
632 }
633
634 // Capitalize all of letters in the name so that it sorts
635 // correctly in the map.
636 std::string name = tid.GetName();
637 std::transform(name.begin(), name.end(), name.begin(), ::toupper);
638
639 // Save this name's index.
640 nameMap[name] = i;
641 }
642
643 // Type names without TypeIds
644 std::vector<std::string> noTids = info.GetNoTypeIds();
645 for (const auto& item : noTids)
646 {
647 nameMap[item] = -1;
648 }
649
650 return nameMap;
651} // GetNameMap ()
652
653/***************************************************************
654 * Docs for a single TypeId
655 ***************************************************************/
656
662void
663PrintConfigPaths(std::ostream& os, const TypeId tid)
664{
665 NS_LOG_FUNCTION(tid);
666 std::vector<std::string> paths = GetTypicalAggregations().Get(tid);
667
668 // Config --------------
669 if (paths.empty())
670 {
671 os << "Introspection did not find any typical Config paths." << breakBoth << std::endl;
672 }
673 else
674 {
675 os << headingStart << "Config Paths" << headingStop << std::endl;
676 os << std::endl;
677 os << tid.GetName() << " is accessible through the following paths"
678 << " with Config::Set and Config::Connect:" << std::endl;
679 os << listStart << std::endl;
680 for (const auto& path : paths)
681 {
682 os << listLineStart << "\"" << path << "\"" << listLineStop << breakTextOnly
683 << std::endl;
684 }
685 os << listStop << std::endl;
686 }
687} // PrintConfigPaths ()
688
697void
698PrintAttributesTid(std::ostream& os, const TypeId tid)
699{
700 NS_LOG_FUNCTION(tid);
701
702 auto index = SortedAttributeInfo(tid);
703
704 os << listStart << std::endl;
705 for (const auto& [name, info] : index)
706 {
707 os << listLineStart << boldStart << name << boldStop << ": " << info.help << std::endl;
708 os << indentHtmlOnly << listStart << std::endl;
709 os << " " << listLineStart << "Set with class: " << reference
710 << info.checker->GetValueTypeName() << listLineStop << std::endl;
711
712 std::string underType;
713 if (info.checker->HasUnderlyingTypeInformation())
714 {
715 os << " " << listLineStart << "Underlying type: ";
716
717 std::string valType = info.checker->GetValueTypeName();
718 underType = info.checker->GetUnderlyingTypeInformation();
719 bool handled = false;
720 if ((valType != "ns3::EnumValue") && (underType != "std::string"))
721 {
722 // Indirect cases to handle
723 if (valType == "ns3::PointerValue")
724 {
725 const auto ptrChecker =
726 dynamic_cast<const PointerChecker*>(PeekPointer(info.checker));
727 if (ptrChecker != nullptr)
728 {
729 os << reference << "ns3::Ptr"
730 << "< " << reference << ptrChecker->GetPointeeTypeId().GetName() << ">";
731 handled = true;
732 }
733 }
734 else if (valType == "ns3::ObjectPtrContainerValue")
735 {
736 const auto ptrChecker =
737 dynamic_cast<const ObjectPtrContainerChecker*>(PeekPointer(info.checker));
738 if (ptrChecker != nullptr)
739 {
740 os << reference << "ns3::Ptr"
741 << "< " << reference << ptrChecker->GetItemTypeId().GetName() << ">";
742 handled = true;
743 }
744 }
745
746 // Helper to match first part of string
747 auto match = [&uType = std::as_const(underType)](const std::string& s) {
748 return uType.rfind(s, 0) == 0; // only checks position 0
749 };
750
751 if (match("bool") || match("double") || match("int8_t") || match("uint8_t") ||
752 match("int16_t") || match("uint16_t") || match("int32_t") ||
753 match("uint32_t") || match("int64_t") || match("uint64_t"))
754 {
755 os << underType;
756 handled = true;
757 }
758 }
759 if (!handled)
760 {
761 os << codeWord << underType;
762 }
763 os << listLineStop << std::endl;
764 }
765 if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter())
766 {
767 std::string value = info.initialValue->SerializeToString(info.checker);
768 if (underType == "std::string" && value.empty())
769 {
770 value = "\"\"";
771 }
772 os << " " << listLineStart << "Initial value: " << value << listLineStop
773 << std::endl;
774 }
775 bool moreFlags{false};
776 os << " " << listLineStart << "Flags: ";
777 if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter())
778 {
779 os << flagSpanStart << "construct" << flagSpanStop;
780 moreFlags = true;
781 }
782 if (info.flags & TypeId::ATTR_SET && info.accessor->HasSetter())
783 {
784 os << (outputText && moreFlags ? ", " : "") << flagSpanStart << "write" << flagSpanStop;
785 moreFlags = true;
786 }
787 if (info.flags & TypeId::ATTR_GET && info.accessor->HasGetter())
788 {
789 os << (outputText && moreFlags ? ", " : "") << flagSpanStart << "read" << flagSpanStop;
790 moreFlags = true;
791 }
792 os << listLineStop << std::endl;
793 os << indentHtmlOnly << listStop << std::endl;
794 }
795 os << listStop << std::endl;
796} // PrintAttributesTid ()
797
808void
809PrintAttributes(std::ostream& os, const TypeId tid)
810{
811 NS_LOG_FUNCTION(tid);
812 if (tid.GetAttributeN() == 0)
813 {
814 os << "No Attributes are defined for this type." << breakBoth << std::endl;
815 }
816 else
817 {
818 os << headingStart << "Attributes" << headingStop << std::endl;
819 PrintAttributesTid(os, tid);
820 }
821
822 // Attributes from base classes
823 TypeId tmp = tid.GetParent();
824 while (tmp.GetParent() != tmp)
825 {
826 if (tmp.GetAttributeN() != 0)
827 {
828 os << headingStart << "Attributes defined in parent class " << tmp.GetName()
829 << headingStop << std::endl;
830 PrintAttributesTid(os, tmp);
831 }
832 tmp = tmp.GetParent();
833
834 } // Attributes
835} // PrintAttributes ()
836
845void
846PrintTraceSourcesTid(std::ostream& os, const TypeId tid)
847{
848 NS_LOG_FUNCTION(tid);
849
850 auto index = SortedTraceSourceInfo(tid);
851
852 os << listStart << std::endl;
853 for (const auto& [name, info] : index)
854 {
855 os << listLineStart << boldStart << name << boldStop << ": " << info.help << breakBoth;
856 if (!outputText)
857 {
858 // '%' prevents doxygen from linking to the Callback class...
859 os << "%";
860 }
861 os << "Callback signature: " << info.callback << std::endl;
862 os << listLineStop << std::endl;
863 }
864 os << listStop << std::endl;
865} // PrintTraceSourcesTid ()
866
877void
878PrintTraceSources(std::ostream& os, const TypeId tid)
879{
880 NS_LOG_FUNCTION(tid);
881 if (tid.GetTraceSourceN() == 0)
882 {
883 os << "No TraceSources are defined for this type." << breakBoth << std::endl;
884 }
885 else
886 {
887 os << headingStart << "TraceSources" << headingStop << std::endl;
888 PrintTraceSourcesTid(os, tid);
889 }
890
891 // Trace sources from base classes
892 TypeId tmp = tid.GetParent();
893 while (tmp.GetParent() != tmp)
894 {
895 if (tmp.GetTraceSourceN() != 0)
896 {
897 os << headingStart << "TraceSources defined in parent class " << tmp.GetName()
898 << headingStop << std::endl;
899 PrintTraceSourcesTid(os, tmp);
900 }
901 tmp = tmp.GetParent();
902 }
903
904} // PrintTraceSources ()
905
912void
913PrintSize(std::ostream& os, const TypeId tid)
914{
915 NS_LOG_FUNCTION(tid);
916 NS_ASSERT_MSG(CHAR_BIT != 0, "CHAR_BIT is zero");
917
918 std::size_t arch = (sizeof(void*) * CHAR_BIT);
919
920 os << boldStart << "Size" << boldStop << " of this type is " << tid.GetSize() << " bytes (on a "
921 << arch << "-bit architecture)." << std::endl;
922} // PrintSize ()
923
929void
930PrintTypeIdBlocks(std::ostream& os)
931{
933
934 NameMap nameMap = GetNameMap();
935
936 // Iterate over the map, which will print the class names in
937 // alphabetical order.
938 for (const auto& item : nameMap)
939 {
940 // Handle only real TypeIds
941 if (item.second < 0)
942 {
943 continue;
944 }
945 // Get the class's index out of the map;
946 TypeId tid = TypeId::GetRegistered(item.second);
947 std::string name = tid.GetName();
948
949 std::cout << commentStart << std::endl;
950
951 std::cout << classStart << name << std::endl;
952 std::cout << std::endl;
953
954 PrintConfigPaths(std::cout, tid);
955 PrintAttributes(std::cout, tid);
956 PrintTraceSources(std::cout, tid);
957 PrintSize(std::cout, tid);
958
959 std::cout << commentStop << std::endl;
960 } // for class documentation
961
962} // PrintTypeIdBlocks
963
964/***************************************************************
965 * Lists of All things
966 ***************************************************************/
967
973void
974PrintAllTypeIds(std::ostream& os)
975{
977 os << commentStart << page << "TypeIdList All ns3::TypeId's\n" << std::endl;
978 os << "This is a list of all" << reference << "ns3::TypeId's.\n"
979 << "For more information see the" << reference << "ns3::TypeId "
980 << "section of this API documentation and the" << referenceNo << "TypeId section "
981 << "in the Configuration and " << referenceNo << "Attributes chapter of the Manual.\n"
982 << std::endl;
983
984 os << listStart << std::endl;
985
986 NameMap nameMap = GetNameMap();
987 // Iterate over the map, which will print the class names in
988 // alphabetical order.
989 for (const auto& item : nameMap)
990 {
991 // Handle only real TypeIds
992 if (item.second < 0)
993 {
994 continue;
995 }
996 // Get the class's index out of the map;
997 TypeId tid = TypeId::GetRegistered(item.second);
998
1000 << listLineStop << std::endl;
1001 }
1002 os << listStop << std::endl;
1003 os << commentStop << std::endl;
1004
1005} // PrintAllTypeIds ()
1006
1015void
1016PrintAllAttributes(std::ostream& os)
1017{
1019 os << commentStart << page << "AttributeList All Attributes\n" << std::endl;
1020 os << "This is a list of all" << reference << "attributes classes. "
1021 << "For more information see the" << reference << "attributes "
1022 << "section of this API documentation and the Attributes sections "
1023 << "in the Tutorial and Manual.\n"
1024 << std::endl;
1025
1026 NameMap nameMap = GetNameMap();
1027 // Iterate over the map, which will print the class names in
1028 // alphabetical order.
1029 for (const auto& item : nameMap)
1030 {
1031 // Handle only real TypeIds
1032 if (item.second < 0)
1033 {
1034 continue;
1035 }
1036 // Get the class's index out of the map;
1037 TypeId tid = TypeId::GetRegistered(item.second);
1038
1039 if (tid.GetAttributeN() == 0)
1040 {
1041 continue;
1042 }
1043
1044 auto index = SortedAttributeInfo(tid);
1045
1046 os << boldStart << tid.GetName() << boldStop << breakHtmlOnly << std::endl;
1047 os << listStart << std::endl;
1048 for (const auto& [name, info] : index)
1049 {
1050 os << listLineStart << boldStart << name << boldStop << ": " << info.help
1051 << listLineStop << std::endl;
1052 }
1053 os << listStop << std::endl;
1054 }
1055 os << commentStop << std::endl;
1056
1057} // PrintAllAttributes ()
1058
1064void
1065PrintAllGlobals(std::ostream& os)
1066{
1068 os << commentStart << page << "GlobalValueList All GlobalValues\n" << std::endl;
1069 os << "This is a list of all" << reference << "ns3::GlobalValue instances.\n"
1070 << "See ns3::GlobalValue for how to set these." << std::endl;
1071
1072 os << listStart << std::endl;
1073 for (auto i = GlobalValue::Begin(); i != GlobalValue::End(); ++i)
1074 {
1075 StringValue val;
1076 (*i)->GetValue(val);
1077 os << indentHtmlOnly << listLineStart << boldStart << hrefStart << (*i)->GetName()
1078 << hrefMid << "GlobalValue" << (*i)->GetName() << hrefStop << boldStop << ": "
1079 << (*i)->GetHelp() << ". Default value: " << val.Get() << "." << listLineStop
1080 << std::endl;
1081 }
1082 os << listStop << std::endl;
1083 os << commentStop << std::endl;
1084
1085} // PrintAllGlobals ()
1086
1092void
1093PrintAllLogComponents(std::ostream& os)
1094{
1096 os << commentStart << page << "LogComponentList All LogComponents\n" << std::endl;
1097 os << "This is a list of all" << reference << "ns3::LogComponent instances.\n" << std::endl;
1098
1104 // Find longest log name
1105 std::size_t widthL = std::string("Log Component").size();
1106 std::size_t widthR = std::string("file").size();
1107 for (const auto& it : (*logs))
1108 {
1109 widthL = std::max(widthL, it.first.size());
1110 std::string file = it.second->File();
1111 // Strip leading "../" related to depth in build directory
1112 // since doxygen only sees the path starting with "src/", etc.
1113 while (file.find("../") == 0)
1114 {
1115 file = file.substr(3);
1116 }
1117 widthR = std::max(widthR, file.size());
1118 }
1119 const std::string tLeft("| ");
1120 const std::string tMid(" | ");
1121 const std::string tRight(" |");
1122
1123 // Header line has to be padded to same length as separator line
1124 os << tLeft << std::setw(widthL) << std::left << "Log Component" << tMid << std::setw(widthR)
1125 << std::left << "File" << tRight << std::endl;
1126 os << tLeft << ":" << std::string(widthL - 1, '-') << tMid << ":"
1127 << std::string(widthR - 1, '-') << tRight << std::endl;
1128
1129 for (const auto& it : (*logs))
1130 {
1131 std::string file = it.second->File();
1132 // Strip leading "../" related to depth in build directory
1133 // since doxygen only sees the path starting with "src/", etc.
1134 while (file.find("../") == 0)
1135 {
1136 file = file.substr(3);
1137 }
1138
1139 os << tLeft << std::setw(widthL) << std::left << it.first << tMid << std::setw(widthR)
1140 << file << tRight << std::endl;
1141 }
1142 os << std::right << std::endl;
1143 os << commentStop << std::endl;
1144} // PrintAllLogComponents ()
1145
1154void
1155PrintAllTraceSources(std::ostream& os)
1156{
1158 os << commentStart << page << "TraceSourceList All TraceSources\n" << std::endl;
1159 os << "This is a list of all" << reference << "tracing sources. "
1160 << "For more information see the " << reference << "tracing "
1161 << "section of this API documentation and the Tracing sections "
1162 << "in the Tutorial and Manual.\n"
1163 << std::endl;
1164
1165 NameMap nameMap = GetNameMap();
1166
1167 // Iterate over the map, which will print the class names in
1168 // alphabetical order.
1169 for (const auto& item : nameMap)
1170 {
1171 // Handle only real TypeIds
1172 if (item.second < 0)
1173 {
1174 continue;
1175 }
1176 // Get the class's index out of the map;
1177 TypeId tid = TypeId::GetRegistered(item.second);
1178
1179 if (tid.GetTraceSourceN() == 0)
1180 {
1181 continue;
1182 }
1183
1184 auto index = SortedTraceSourceInfo(tid);
1185
1186 os << boldStart << tid.GetName() << boldStop << breakHtmlOnly << std::endl;
1187
1188 os << listStart << std::endl;
1189 for (const auto& [name, info] : index)
1190 {
1191 os << listLineStart << boldStart << name << boldStop << ": " << info.help
1192 << listLineStop << std::endl;
1193 }
1194 os << listStop << std::endl;
1195 }
1196 os << commentStop << std::endl;
1197
1198} // PrintAllTraceSources ()
1199
1200/***************************************************************
1201 * Docs for Attribute classes
1202 ***************************************************************/
1203
1217void
1218PrintAttributeValueSection(std::ostream& os, const std::string& name, const bool seeBase = true)
1219{
1221 std::string section = "attribute_" + name;
1222
1223 // \ingroup attributes
1224 // \defgroup attribute_<name>Value <name> Attribute
1225 os << commentStart << sectionStart << "attributes\n"
1226 << subSectionStart << "attribute_" << name << " " << name << " Attribute\n"
1227 << "AttributeValue implementation for " << name << "\n";
1228 if (seeBase)
1229 {
1230 os << seeAlso << "ns3::" << name << "\n";
1231 }
1232 os << commentStop;
1233
1234} // PrintAttributeValueSection ()
1235
1246void
1248 const std::string& name,
1249 const std::string& type,
1250 const std::string& header)
1251{
1252 NS_LOG_FUNCTION(name << type << header);
1253 std::string sectAttr = sectionStart + "attribute_" + name;
1254
1255 // \ingroup attribute_<name>Value
1256 // \class ns3::<name>Value "header"
1257 std::string valClass = name + "Value";
1258 std::string qualClass = " ns3::" + valClass;
1259
1260 os << commentStart << sectAttr << std::endl;
1261 os << classStart << qualClass << " \"" << header << "\"" << std::endl;
1262 os << "AttributeValue implementation for " << name << "." << std::endl;
1263 os << seeAlso << "AttributeValue" << std::endl;
1264 os << commentStop;
1265
1266 // Ctor: <name>Value::<name>Value
1267 os << commentStart << functionStart << qualClass << "::" << valClass;
1268 // Constructors
1269 os << "(const " << type << " & value)\n"
1270 << "Constructor.\n"
1271 << argument << "[in] value The " << name << " value to use.\n";
1272 os << commentStop;
1273
1274 // <name>Value::Get () const
1275 os << commentStart << functionStart << type << qualClass << "::Get () const\n"
1276 << returns << "The " << name << " value.\n"
1277 << commentStop;
1278
1279 // <name>Value::GetAccessor (T & value) const
1280 os << commentStart << functionStart << "bool" << qualClass
1281 << "::GetAccessor (T & value) const\n"
1282 << "Access the " << name << " value as type " << codeWord << "T.\n"
1283 << templateArgument << "T " << templArgExplicit << "The type to cast to.\n"
1284 << argument << "[out] value The " << name << " value, as type " << codeWord << "T.\n"
1285 << returns << "true.\n"
1286 << commentStop;
1287
1288 // <name>Value::Set (const name & value)
1289 if (type != "Callback") // Yuck
1290 {
1291 os << commentStart << functionStart << "void" << qualClass << "::Set (const " << type
1292 << " & value)\n"
1293 << "Set the value.\n"
1294 << argument << "[in] value The value to adopt.\n"
1295 << commentStop;
1296 }
1297
1298 // <name>Value::m_value
1299 os << commentStart << variable << type << qualClass << "::m_value\n"
1300 << "The stored " << name << " instance.\n"
1301 << commentStop << std::endl;
1302
1303} // PrintAttributeValueWithName ()
1304
1313void
1314PrintMakeAccessors(std::ostream& os, const std::string& name)
1315{
1317 std::string sectAttr = sectionStart + "attribute_" + name + "\n";
1318 std::string make = "ns3::Make" + name + "Accessor ";
1319
1320 // \ingroup attribute_<name>Value
1321 // Make<name>Accessor (T1 a1)
1322 os << commentStart << sectAttr << functionStart << "ns3::Ptr<const ns3::AttributeAccessor> "
1323 << make << "(T1 a1)\n"
1324 << copyDoc << "ns3::MakeAccessorHelper(T1)\n"
1325 << seeAlso << "AttributeAccessor\n"
1326 << commentStop;
1327
1328 // \ingroup attribute_<name>Value
1329 // Make<name>Accessor (T1 a1)
1330 os << commentStart << sectAttr << functionStart << "ns3::Ptr<const ns3::AttributeAccessor> "
1331 << make << "(T1 a1, T2 a2)\n"
1332 << copyDoc << "ns3::MakeAccessorHelper(T1,T2)\n"
1333 << seeAlso << "AttributeAccessor\n"
1334 << commentStop;
1335} // PrintMakeAccessors ()
1336
1346void
1347PrintMakeChecker(std::ostream& os, const std::string& name, const std::string& header)
1348{
1349 NS_LOG_FUNCTION(name << header);
1350 std::string sectAttr = sectionStart + "attribute_" + name + "\n";
1351 std::string make = "ns3::Make" + name + "Checker ";
1352
1353 // \ingroup attribute_<name>Value
1354 // class <name>Checker
1355 os << commentStart << sectAttr << std::endl;
1356 os << classStart << " ns3::" << name << "Checker"
1357 << " \"" << header << "\"" << std::endl;
1358 os << "AttributeChecker implementation for " << name << "Value." << std::endl;
1359 os << seeAlso << "AttributeChecker" << std::endl;
1360 os << commentStop;
1361
1362 // \ingroup attribute_<name>Value
1363 // Make<name>Checker ()
1364 os << commentStart << sectAttr << functionStart << "ns3::Ptr<const ns3::AttributeChecker> "
1365 << make << "()\n"
1366 << returns << "The AttributeChecker.\n"
1367 << seeAlso << "AttributeChecker\n"
1368 << commentStop;
1369} // PrintMakeChecker ()
1370
1373{
1374 const std::string m_name;
1375 const std::string m_type;
1376 const bool m_seeBase;
1377 const std::string m_header;
1378};
1379
1388void
1389PrintAttributeHelper(std::ostream& os, const AttributeDescriptor& attr)
1390{
1391 NS_LOG_FUNCTION(attr.m_name << attr.m_type << attr.m_seeBase << attr.m_header);
1393 PrintAttributeValueWithName(os, attr.m_name, attr.m_type, attr.m_header);
1394 PrintMakeAccessors(os, attr.m_name);
1395 PrintMakeChecker(os, attr.m_name, attr.m_header);
1396} // PrintAttributeHelper ()
1397
1402void
1404{
1406
1407 // clang-format off
1408 const AttributeDescriptor attributes [] =
1409 {
1410 // Name Type see Base header-file
1411 // Users of ATTRIBUTE_HELPER_HEADER
1412 //
1413 { "Address", "Address", true, "address.h" },
1414 { "Box", "Box", true, "box.h" },
1415 { "DataRate", "DataRate", true, "data-rate.h" },
1416 { "Length", "Length", true, "length.h" },
1417 { "Ipv4Address", "Ipv4Address", true, "ipv4-address.h" },
1418 { "Ipv4Mask", "Ipv4Mask", true, "ipv4-address.h" },
1419 { "Ipv6Address", "Ipv6Address", true, "ipv6-address.h" },
1420 { "Ipv6Prefix", "Ipv6Prefix", true, "ipv6-address.h" },
1421 { "Mac16Address", "Mac16Address", true, "mac16-address.h" },
1422 { "Mac48Address", "Mac48Address", true, "mac48-address.h" },
1423 { "Mac64Address", "Mac64Address", true, "mac64-address.h" },
1424 { "ObjectFactory", "ObjectFactory", true, "object-factory.h" },
1425 { "Priomap", "Priomap", true, "prio-queue-disc.h" },
1426 { "QueueSize", "QueueSize", true, "queue-size.h" },
1427 { "Rectangle", "Rectangle", true, "rectangle.h" },
1428 { "Ssid", "Ssid", true, "ssid.h" },
1429 { "TypeId", "TypeId", true, "type-id.h" },
1430 { "UanModesList", "UanModesList", true, "uan-tx-mode.h" },
1431 { "ValueClassTest", "ValueClassTest", false, "attribute-test-suite.cc" /* core/test/ */ },
1432 { "Vector2D", "Vector2D", true, "vector.h" },
1433 { "Vector3D", "Vector3D", true, "vector.h" },
1434 { "Waypoint", "Waypoint", true, "waypoint.h" },
1435 { "WifiMode", "WifiMode", true, "wifi-mode.h" },
1436
1437 // All three (Value, Access and Checkers) defined, but custom
1438 { "Boolean", "bool", false, "boolean.h" },
1439 { "Callback", "CallbackBase", true, "callback.h" },
1440 { "Double", "double", false, "double.h" },
1441 { "Enum", "T", false, "enum.h" },
1442 { "Integer", "int64_t", false, "integer.h" },
1443 { "String", "std::string", false, "string.h" },
1444 { "Time", "Time", true, "nstime.h" },
1445 { "Uinteger", "uint64_t", false, "uinteger.h" },
1446 { "", "", false, "last placeholder" }
1447 };
1448 // clang-format on
1449
1450 int i = 0;
1451 while (!attributes[i].m_name.empty())
1452 {
1453 PrintAttributeHelper(os, attributes[i]);
1454 ++i;
1455 }
1456
1457 PrintAttributeValueSection(os, "ObjectVector", false);
1458 PrintMakeAccessors(os, "ObjectVector");
1459 PrintMakeChecker(os, "ObjectVector", "object-vector.h");
1460
1461 PrintAttributeValueSection(os, "ObjectMap", false);
1462 PrintMakeAccessors(os, "ObjectMap");
1463 PrintMakeChecker(os, "ObjectMap", "object-map.h");
1464
1465} // PrintAttributeImplementations ()
1466
1467/***************************************************************
1468 * Main
1469 ***************************************************************/
1470
1471int
1472main(int argc, char* argv[])
1473{
1475
1476 CommandLine cmd(__FILE__);
1477 cmd.Usage("Generate documentation for all ns-3 registered types, "
1478 "trace sources, attributes and global variables.");
1479 cmd.AddValue("output-text", "format output as plain text", outputText);
1480 cmd.Parse(argc, argv);
1481
1482 SetMarkup();
1483
1484 // Create a Node, to force linking and instantiation of our TypeIds
1485 NodeContainer c;
1486 c.Create(1);
1487
1488 std::cout << std::endl;
1489 std::cout << commentStart << file << "\n"
1490 << sectionStart << "utils\n"
1491 << "Doxygen docs generated from the TypeId database.\n"
1492 << note << "This file is automatically generated by " << codeWord
1493 << "print-introspected-doxygen.cc. Do not edit this file! "
1494 << "Edit that file instead.\n"
1495 << commentStop << std::endl;
1496
1497 PrintTypeIdBlocks(std::cout);
1498
1499 PrintAllTypeIds(std::cout);
1500 PrintAllAttributes(std::cout);
1501 PrintAllGlobals(std::cout);
1502 PrintAllLogComponents(std::cout);
1503 PrintAllTraceSources(std::cout);
1505
1506 return 0;
1507}
Gather aggregation and configuration path information from registered types.
void DoGather(TypeId tid)
Gather attribute, configuration path information for tid.
std::vector< std::pair< TypeId, std::string > > m_output
Configuration path for each TypeId.
std::vector< TypeId > m_alreadyProcessed
List of TypeIds we've already processed.
std::vector< std::string > m_noTids
List of type names without TypeIds, because those modules aren't enabled.
std::vector< std::string > m_currentPath
Current configuration path.
std::vector< std::string > GetNoTypeIds() const
bool HasAlreadyBeenProcessed(TypeId tid) const
void RecordAggregationInfo(std::string a, std::string b)
Record the a -> b aggregation relation.
std::vector< std::pair< TypeId, TypeId > > m_aggregates
List of aggregation relationships.
std::string GetCurrentPath() const
void Print() const
Print output in "a -> b" form on std::cout.
void Gather(TypeId tid)
Gather aggregation and configuration path information for tid.
std::vector< std::string > Get(TypeId tid) const
void RecordOutput(TypeId tid)
Record the current config path for tid.
Parse command-line arguments.
Definition: command-line.h:232
static Iterator Begin()
The Begin iterator.
static Iterator End()
The End iterator.
static ComponentList * GetComponentList()
Get the list of LogComponents.
Definition: log.cc:143
std::unordered_map< std::string, LogComponent * > ComponentList
LogComponent name map.
Definition: log.h:398
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
AttributeChecker implementation for ObjectPtrContainerValue.
AttributeChecker implementation for PointerValue.
Definition: pointer.h:125
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Hold variables of type string.
Definition: string.h:56
std::string Get() const
Definition: string.cc:31
a unique identifier for an interface.
Definition: type-id.h:59
bool IsChildOf(TypeId other) const
Check if this TypeId is a child of another.
Definition: type-id.cc:972
std::size_t GetTraceSourceN() const
Get the number of Trace sources.
Definition: type-id.cc:1124
bool MustHideFromDocumentation() const
Check if this TypeId should not be listed in documentation.
Definition: type-id.cc:1093
@ ATTR_GET
The attribute can be read.
Definition: type-id.h:64
@ ATTR_SET
The attribute can be written.
Definition: type-id.h:65
@ ATTR_CONSTRUCT
The attribute can be written at construction-time.
Definition: type-id.h:66
TypeId::TraceSourceInformation GetTraceSource(std::size_t i) const
Get the trace source by index.
Definition: type-id.cc:1131
static uint16_t GetRegisteredN()
Get the number of registered TypeIds.
Definition: type-id.cc:880
std::size_t GetAttributeN() const
Get the number of attributes.
Definition: type-id.cc:1101
TypeId GetParent() const
Get the parent of this TypeId.
Definition: type-id.cc:956
static TypeId GetRegistered(uint16_t i)
Get a TypeId by index.
Definition: type-id.cc:887
std::size_t GetSize() const
Get the size of this object.
Definition: type-id.cc:1007
TypeId::AttributeInformation GetAttribute(std::size_t i) const
Get Attribute information by index.
Definition: type-id.cc:1109
static bool LookupByNameFailSafe(std::string name, TypeId *tid)
Get a TypeId by name.
Definition: type-id.cc:845
std::string GetName() const
Get the name.
Definition: type-id.cc:992
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:86
Ptr< Object > GetRootNamespaceObject(uint32_t i)
Definition: config.cc:1030
std::size_t GetRootNamespaceObjectN()
Definition: config.cc:1023
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
std::string headingStart
start of section heading (h3)
std::string copyDoc
copy (or refer) to docs elsewhere
std::map< std::string, ns3::TypeId::TraceSourceInformation > SortedTraceSourceInfo(const TypeId tid)
Alphabetize the TraceSourceInformation for a TypeId by the TraceSource name.
std::string breakHtmlOnly
linebreak for html output only
std::map< std::string, ns3::TypeId::AttributeInformation > SortedAttributeInfo(const TypeId tid)
Alphabetize the AttributeInformation for a TypeId by the Attribute name.
std::string codeWord
format next word as source code
std::string breakTextOnly
linebreak for text output only
std::string flagSpanStart
start of Attribute flag value
std::string templArgDeduced
template argument deduced from function
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
Definition: ptr.h:449
ns cmd
Definition: second.py:40
StaticInformation GetTypicalAggregations()
Register aggregation relationships that are not automatically detected by this introspection program.
void PrintTraceSourcesTid(std::ostream &os, const TypeId tid)
Print direct Trace sources for this TypeId.
std::map< std::string, int32_t > NameMap
Map from TypeId name to tid.
void PrintMakeAccessors(std::ostream &os, const std::string &name)
Print the AttributeValue MakeAccessor documentation for a class.
void PrintAllTraceSources(std::ostream &os)
Print the list of all Trace sources.
void PrintAllLogComponents(std::ostream &os)
Print the list of all LogComponents.
void PrintAttributeHelper(std::ostream &os, const AttributeDescriptor &attr)
Print documentation corresponding to use of the ATTRIBUTE_HELPER_HEADER macro or ATTRIBUTE_VALUE_DEFI...
void PrintTypeIdBlocks(std::ostream &os)
Print the doxy block for each TypeId.
void PrintAllAttributes(std::ostream &os)
Print the list of all Attributes.
void PrintAttributeValueWithName(std::ostream &os, const std::string &name, const std::string &type, const std::string &header)
Print the AttributeValue documentation for a class.
void PrintSize(std::ostream &os, const TypeId tid)
Print the size of the type represented by this tid.
void Uniquefy(T t)
Helper to keep only the unique items in a container.
void PrintAttributeImplementations(std::ostream &os)
Print documentation for Attribute implementations.
NameMap GetNameMap()
Create a map from the class names to their index in the vector of TypeId's so that the names will end...
void PrintTraceSources(std::ostream &os, const TypeId tid)
Print the Trace sources block for tid, including Trace sources declared in base classes.
void SetMarkup()
Initialize the markup strings, for either doxygen or text.
NameMap::const_iterator NameMapIterator
NameMap iterator.
void PrintConfigPaths(std::ostream &os, const TypeId tid)
Print config paths.
void PrintAllTypeIds(std::ostream &os)
Print the list of all TypeIds.
void PrintAttributes(std::ostream &os, const TypeId tid)
Print the Attributes block for tid, including Attributes declared in base classes.
void PrintAllGlobals(std::ostream &os)
Print the list of all global variables.
void PrintMakeChecker(std::ostream &os, const std::string &name, const std::string &header)
Print the AttributeValue MakeChecker documentation for a class.
void PrintAttributeValueSection(std::ostream &os, const std::string &name, const bool seeBase=true)
Print the section definition for an AttributeValue.
void PrintAttributesTid(std::ostream &os, const TypeId tid)
Print direct Attributes for this TypeId.
Descriptor for an AttributeValue.
const std::string m_header
The header file name.
const std::string m_type
The name of the underlying type.
const std::string m_name
The base name of the resulting AttributeValue type.
const bool m_seeBase
Print a "see also" pointing to the base class.
Attribute implementation.
Definition: type-id.h:81
std::string name
Attribute name.
Definition: type-id.h:83
Ptr< const AttributeChecker > checker
Checker object.
Definition: type-id.h:95
TraceSource implementation.
Definition: type-id.h:104
std::string name
Trace name.
Definition: type-id.h:106