author | Peter D. Barnes, Jr. <barnes26@llnl.gov> |
Wed, 15 May 2013 11:16:59 -0400 | |
changeset 9780 | 19c20d900cc6 |
parent 9222 | b72fd6e6a4b5 |
child 9873 | 2020713bbfa4 |
permissions | -rw-r--r-- |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
1 |
#include <iostream> |
6848
1f453ad50ef3
Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
Lalith Suresh <suresh.lalith@gmail.com>
parents:
4641
diff
changeset
|
2 |
#include <algorithm> |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
3 |
#include <map> |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
4 |
#include "ns3/object.h" |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
5 |
#include "ns3/pointer.h" |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
6 |
#include "ns3/object-vector.h" |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
7 |
#include "ns3/config.h" |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
8 |
#include "ns3/log.h" |
4513
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
9 |
#include "ns3/global-value.h" |
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
10 |
#include "ns3/string.h" |
6994
4ab8b23631fd
repair print-introspected-doxygen
Tom Henderson <tomh@tomh.org>
parents:
6865
diff
changeset
|
11 |
#include "ns3/node-container.h" |
9166
1d2a0119e60c
Bug 152 (Partially)- config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9140
diff
changeset
|
12 |
#include "ns3/csma-channel.h" |
1368
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
|
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
using namespace ns3; |
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
|
6994
4ab8b23631fd
repair print-introspected-doxygen
Tom Henderson <tomh@tomh.org>
parents:
6865
diff
changeset
|
16 |
NS_LOG_COMPONENT_DEFINE ("PrintIntrospectedDoxygen"); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
17 |
|
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
18 |
namespace |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
19 |
{ |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
20 |
std::string anchor; ///< hyperlink anchor |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
21 |
std::string boldStart; ///< start of bold span |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
22 |
std::string boldStop; ///< end of bold span |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
23 |
std::string breakBoth; ///< linebreak |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
24 |
std::string breakHtmlOnly; ///< linebreak for html output only |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
25 |
std::string breakTextOnly; ///< linebreak for text output only |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
26 |
std::string brief; ///< brief tag |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
27 |
std::string commentStart; ///< start of code comment |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
28 |
std::string commentStop; ///< end of code comment |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
29 |
std::string defgroupAttributeListStart; ///< start of AttributeList group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
30 |
std::string defgroupAttributeListStop; ///< end of AttributeList group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
31 |
std::string defgroupGlobalValueListStart; ///< start of GlobalValueList group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
32 |
std::string defgroupGlobalValueListStop; ///< end of GlobalValueList group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
33 |
std::string defgroupTraceSourceListStart; ///< start of TraceSourceList group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
34 |
std::string defgroupTraceSourceListStop; ///< end of TraceSourceList group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
35 |
std::string flagSpanStart; ///< start of Attribute flag value |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
36 |
std::string flagSpanStop; ///< end of Attribute flag value |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
37 |
std::string functionStart; ///< start of a class/function |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
38 |
std::string functionStop; ///< end of a class/function |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
39 |
std::string headingStart; ///< start of section heading (h3) |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
40 |
std::string headingStop; ///< end of section heading (h3) |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
41 |
std::string indentHtmlOnly; ///< small indent |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
42 |
std::string ingroupConstructs; ///< add to constructs group |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
43 |
std::string listStart; ///< start unordered list |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
44 |
std::string listStop; ///< end unordered list |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
45 |
std::string listLineStart; ///< start unordered list item |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
46 |
std::string listLineStop; ///< end unordered list item |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
47 |
std::string reference; ///< reference tag |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
48 |
std::string temporaryCharacter; ///< "%" placeholder |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
49 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
50 |
} // anonymous namespace |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
51 |
|
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
52 |
void |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
53 |
PrintAttributes (TypeId tid, std::ostream &os) |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
54 |
{ |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
55 |
os << listStart << std::endl; |
2693
56e28e34e109
TypeId::GetAttributeListN -> TypeId::GetAttributeN
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2602
diff
changeset
|
56 |
for (uint32_t j = 0; j < tid.GetAttributeN (); j++) |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
57 |
{ |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
58 |
struct TypeId::AttributeInformation info = tid.GetAttribute(j); |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
59 |
os << listLineStart << boldStart << info.name << boldStop << ": " |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
60 |
<< info.help << std::endl; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
61 |
os << " " << listStart << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
62 |
<< " " << listLineStart << "Set with class: " << reference << info.checker->GetValueTypeName () << listLineStop << std::endl; |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
63 |
if (info.checker->HasUnderlyingTypeInformation ()) |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
64 |
{ |
9140
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
65 |
os << " " << listLineStart << "Underlying type: "; |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
66 |
if ( (info.checker->GetValueTypeName () != "ns3::EnumValue") |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
67 |
&& (info.checker->GetUnderlyingTypeInformation () != "std::string") |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
68 |
) |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
69 |
{ |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
70 |
os << reference; |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
71 |
} |
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
72 |
os << info.checker->GetUnderlyingTypeInformation () << listLineStop << std::endl; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
73 |
} |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
74 |
if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ()) |
2971
75780f899be3
output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2969
diff
changeset
|
75 |
{ |
9140
e4e4a089b802
Fix oxygen errors in doc/introspected-doxygen.h
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9127
diff
changeset
|
76 |
os << " " << listLineStart << "Initial value: " << info.initialValue->SerializeToString (info.checker) << listLineStop << std::endl; |
2971
75780f899be3
output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2969
diff
changeset
|
77 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
78 |
os << " " << listLineStart << "Flags: "; |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
79 |
if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ()) |
2971
75780f899be3
output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2969
diff
changeset
|
80 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
81 |
os << flagSpanStart << "construct " << flagSpanStop; |
2971
75780f899be3
output the initial value of the attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2969
diff
changeset
|
82 |
} |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
83 |
if (info.flags & TypeId::ATTR_SET && info.accessor->HasSetter ()) |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
84 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
85 |
os << flagSpanStart << "write " << flagSpanStop; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
86 |
} |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
87 |
if (info.flags & TypeId::ATTR_GET && info.accessor->HasGetter ()) |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
88 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
89 |
os << flagSpanStart << "read " << flagSpanStop; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
90 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
91 |
os << listLineStop << std::endl; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
92 |
os << " " << listStop << " " << std::endl; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
93 |
|
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
94 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
95 |
os << listStop << std::endl; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
96 |
} |
1399
5945e92014e2
move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1376
diff
changeset
|
97 |
|
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
98 |
void |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
99 |
PrintTraceSources (TypeId tid, std::ostream &os) |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
100 |
{ |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
101 |
os << listStart << std::endl; |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
102 |
for (uint32_t i = 0; i < tid.GetTraceSourceN (); ++i) |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
103 |
{ |
7395
a1bb24a8ae25
use new API, kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7394
diff
changeset
|
104 |
struct TypeId::TraceSourceInformation info = tid.GetTraceSource (i); |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
105 |
os << listLineStart << boldStart << info.name << boldStop << ": " |
7395
a1bb24a8ae25
use new API, kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7394
diff
changeset
|
106 |
<< info.help |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
107 |
<< std::endl; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
108 |
os << listLineStop << std::endl; |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
109 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
110 |
os << listStop << std::endl; |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
111 |
} |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
112 |
|
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
113 |
|
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
114 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
115 |
* Gather aggregation and configuration path information from registered types. |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
116 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
117 |
class StaticInformation |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
118 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
119 |
public: |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
120 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
121 |
* Record the a -> b aggregation relation. |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
122 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
123 |
* \param a [in] the source(?) TypeId name |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
124 |
* \param b [in] the destination(?) TypeId name |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
125 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
126 |
void RecordAggregationInfo (std::string a, std::string b); |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
127 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
128 |
* Gather aggregation and configuration path information for tid |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
129 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
130 |
* \param tid [in] the TypeId to gather information from |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
131 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
132 |
void Gather (TypeId tid); |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
133 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
134 |
* Print output in "a -> b" form on std::cout |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
135 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
136 |
void Print (void) const; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
137 |
|
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
138 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
139 |
* \return the configuration paths for tid |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
140 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
141 |
* \param tid [in] the TypeId to return information for |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
142 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
143 |
std::vector<std::string> Get (TypeId tid); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
144 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
145 |
private: |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
146 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
147 |
* \return the current configuration path |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
148 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
149 |
std::string GetCurrentPath (void) const; |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
150 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
151 |
* Gather attribute, configuration path information for tid |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
152 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
153 |
* \param tid [in] the TypeId to gather information from |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
154 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
155 |
void DoGather (TypeId tid); |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
156 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
157 |
* Record the current config path for tid. |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
158 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
159 |
* \param tid [in] the TypeId to record. |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
160 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
161 |
void RecordOutput (TypeId tid); |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
162 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
163 |
* \return whether the tid has already been processed |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
164 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
165 |
* \param tid [in] the TypeId to check. |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
166 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
167 |
bool HasAlreadyBeenProcessed (TypeId tid) const; |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
168 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
169 |
* (Inplace) find and replace all instances of string |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
170 |
* |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
171 |
* \param source [inout] string to search and replace in |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
172 |
* \param find [in] string to search for |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
173 |
* \param replace [in] string to insert in place of find |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
174 |
*/ |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
175 |
void find_and_replace (std::string &source, const std::string find, std::string replace ); |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
176 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
177 |
* Configuration path for each TypeId |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
178 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
179 |
std::vector<std::pair<TypeId,std::string> > m_output; |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
180 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
181 |
* Current configuration path |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
182 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
183 |
std::vector<std::string> m_currentPath; |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
184 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
185 |
* List of TypeIds we've already processed |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
186 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
187 |
std::vector<TypeId> m_alreadyProcessed; |
9127
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
188 |
/** |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
189 |
* List of aggregation relationships. |
a35540de51a0
Doxygenate print-introspected-doxygen.cc
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9124
diff
changeset
|
190 |
*/ |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
191 |
std::vector<std::pair<TypeId,TypeId> > m_aggregates; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
192 |
}; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
193 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
194 |
void |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
195 |
StaticInformation::RecordAggregationInfo (std::string a, std::string b) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
196 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
197 |
m_aggregates.push_back (std::make_pair (TypeId::LookupByName (a), TypeId::LookupByName (b))); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
198 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
199 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
200 |
void |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
201 |
StaticInformation::Print (void) const |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
202 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
203 |
for (std::vector<std::pair<TypeId,std::string> >::const_iterator i = m_output.begin (); i != m_output.end (); ++i) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
204 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
205 |
std::pair<TypeId,std::string> item = *i; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
206 |
std::cout << item.first.GetName () << " -> " << item.second << std::endl; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
207 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
208 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
209 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
210 |
std::string |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
211 |
StaticInformation::GetCurrentPath (void) const |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
212 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
213 |
std::ostringstream oss; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
214 |
for (std::vector<std::string>::const_iterator i = m_currentPath.begin (); i != m_currentPath.end (); ++i) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
215 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
216 |
std::string item = *i; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
217 |
oss << "/" << item; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
218 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
219 |
return oss.str (); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
220 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
221 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
222 |
void |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
223 |
StaticInformation::RecordOutput (TypeId tid) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
224 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
225 |
m_output.push_back (std::make_pair (tid, GetCurrentPath ())); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
226 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
227 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
228 |
bool |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
229 |
StaticInformation::HasAlreadyBeenProcessed (TypeId tid) const |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
230 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
231 |
for (uint32_t i = 0; i < m_alreadyProcessed.size (); ++i) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
232 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
233 |
if (m_alreadyProcessed[i] == tid) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
234 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
235 |
return true; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
236 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
237 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
238 |
return false; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
239 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
240 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
241 |
std::vector<std::string> |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
242 |
StaticInformation::Get (TypeId tid) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
243 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
244 |
std::vector<std::string> paths; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
245 |
for (uint32_t i = 0; i < m_output.size (); ++i) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
246 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
247 |
std::pair<TypeId,std::string> tmp = m_output[i]; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
248 |
if (tmp.first == tid) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
249 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
250 |
paths.push_back (tmp.second); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
251 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
252 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
253 |
return paths; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
254 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
255 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
256 |
void |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
257 |
StaticInformation::Gather (TypeId tid) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
258 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
259 |
DoGather (tid); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
260 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
261 |
std::sort (m_output.begin (), m_output.end ()); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
262 |
m_output.erase (std::unique (m_output.begin (), m_output.end ()), m_output.end ()); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
263 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
264 |
|
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
265 |
void |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
266 |
StaticInformation::DoGather (TypeId tid) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
267 |
{ |
2989
b7eb3929096c
merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2971
diff
changeset
|
268 |
NS_LOG_FUNCTION (this); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
269 |
if (HasAlreadyBeenProcessed (tid)) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
270 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
271 |
return; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
272 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
273 |
RecordOutput (tid); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
274 |
for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
275 |
{ |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
276 |
struct TypeId::AttributeInformation info = tid.GetAttribute(i); |
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
277 |
const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker)); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
278 |
if (ptrChecker != 0) |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
279 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
280 |
TypeId pointee = ptrChecker->GetPointeeTypeId (); |
7870
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
281 |
|
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
282 |
// See if this is a pointer to an Object. |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
283 |
Ptr<Object> object = CreateObject<Object> (); |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
284 |
TypeId objectTypeId = object->GetTypeId (); |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
285 |
if (objectTypeId == pointee) |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
286 |
{ |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
287 |
// Stop the recursion at this attribute if it is a |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
288 |
// pointer to an Object, which create too many spurious |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
289 |
// paths in the list of attribute paths because any |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
290 |
// Object can be in that part of the path. |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
291 |
continue; |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
292 |
} |
059b1b83e29b
Bug 962 - list of paths to reach objects contains bogus entries
Mitch Watrous <watrous@u.washington.edu>
parents:
7575
diff
changeset
|
293 |
|
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
294 |
m_currentPath.push_back (info.name); |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
295 |
m_alreadyProcessed.push_back (tid); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
296 |
DoGather (pointee); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
297 |
m_alreadyProcessed.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
298 |
m_currentPath.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
299 |
continue; |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
300 |
} |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
301 |
// attempt to cast to an object vector. |
7412
d79278c6e51c
refactor ObjectVector generic code into a separate file and introduce ObjectMap.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7395
diff
changeset
|
302 |
const ObjectPtrContainerChecker *vectorChecker = dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker)); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
303 |
if (vectorChecker != 0) |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
304 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
305 |
TypeId item = vectorChecker->GetItemTypeId (); |
7393
8c3dfe0be54d
use new API. kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7233
diff
changeset
|
306 |
m_currentPath.push_back (info.name + "/[i]"); |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
307 |
m_alreadyProcessed.push_back (tid); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
308 |
DoGather (item); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
309 |
m_alreadyProcessed.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
310 |
m_currentPath.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
311 |
continue; |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
312 |
} |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
313 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
314 |
for (uint32_t j = 0; j < TypeId::GetRegisteredN (); j++) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
315 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
316 |
TypeId child = TypeId::GetRegistered (j); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
317 |
if (child.IsChildOf (tid)) |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
318 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
319 |
//please take a look at the following note for an explanation |
7575
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
320 |
std::string childName = "$" + temporaryCharacter + child.GetName (); |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
321 |
std::string replaceWith = "::" + temporaryCharacter; |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
322 |
find_and_replace(childName,"::",replaceWith); |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
323 |
m_currentPath.push_back (childName); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
324 |
m_alreadyProcessed.push_back (tid); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
325 |
DoGather (child); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
326 |
m_alreadyProcessed.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
327 |
m_currentPath.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
328 |
} |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
329 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
330 |
for (uint32_t k = 0; k < m_aggregates.size (); ++k) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
331 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
332 |
std::pair<TypeId,TypeId> tmp = m_aggregates[k]; |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
333 |
if (tmp.first == tid || tmp.second == tid) |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
334 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
335 |
TypeId other; |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
336 |
if (tmp.first == tid) |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
337 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
338 |
other = tmp.second; |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
339 |
} |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
340 |
if (tmp.second == tid) |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
341 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
342 |
other = tmp.first; |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
343 |
} |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
344 |
/** |
7575
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
345 |
* Note: for the Doxygen version only, we insert a % in the |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
346 |
* path below to ensure that doxygen does not attempt to |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
347 |
* resolve the typeid names included in the string. if the |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
348 |
* name contains ::, using the % sign will remove that sign |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
349 |
* resulting for instance in $ns3MobilityModel instead of |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
350 |
* $ns3::MobilityModel hence the output must be in the form |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
351 |
* $%ns3::%MobilityModel in order to show correctly |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
352 |
* $ns3::MobilityModel We add at the beginning of the name |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
353 |
* $% and we replace all the :: in the string by ::%. |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
354 |
*/ |
7575
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
355 |
std::string name = "$" + temporaryCharacter + other.GetName (); |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
356 |
//finding and replacing :: by ::% (for Doxygen version only). |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
357 |
std::string replaceWith = "::" + temporaryCharacter; |
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
358 |
find_and_replace(name,"::",replaceWith); |
4580
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
359 |
m_currentPath.push_back (name); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
360 |
m_alreadyProcessed.push_back (tid); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
361 |
DoGather (other); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
362 |
m_alreadyProcessed.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
363 |
m_currentPath.pop_back (); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
364 |
} |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
365 |
} |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
366 |
} |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
367 |
|
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
368 |
void |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
369 |
StaticInformation::find_and_replace( std::string &source, const std::string find, std::string replace ) |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
370 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
371 |
size_t j; |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
372 |
j = source.find (find); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
373 |
while (j != std::string::npos ) |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
374 |
{ |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
375 |
source.replace (j, find.length (),replace); |
8092e3e83487
Bug 456: doxygen introspection for trace source config paths is wrong
fmoatamr
parents:
4513
diff
changeset
|
376 |
j = source.find (find,j+1); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
377 |
} |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
378 |
} |
1399
5945e92014e2
move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1376
diff
changeset
|
379 |
|
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
380 |
void |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
381 |
PrintHelp (const char *program_name) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
382 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
383 |
std::cout << "Usage: " << program_name << " [options]" << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
384 |
<< std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
385 |
<< "Options:" << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
386 |
<< " --help : print these options" << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
387 |
<< " --output-text : format output as plain text" << std::endl; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
388 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
389 |
|
1368
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
390 |
int main (int argc, char *argv[]) |
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
391 |
{ |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
392 |
bool outputText = false; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
393 |
char *programName = argv[0]; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
394 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
395 |
argv++; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
396 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
397 |
while (*argv != 0) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
398 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
399 |
char *arg = *argv; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
400 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
401 |
if (strcmp (arg, "--help") == 0) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
402 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
403 |
PrintHelp (programName); |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
404 |
return 0; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
405 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
406 |
else if (strcmp(arg, "--output-text") == 0) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
407 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
408 |
outputText = true; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
409 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
410 |
else |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
411 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
412 |
// un-recognized command-line argument |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
413 |
PrintHelp (programName); |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
414 |
return 0; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
415 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
416 |
argv++; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
417 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
418 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
419 |
if (outputText) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
420 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
421 |
anchor = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
422 |
boldStart = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
423 |
boldStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
424 |
breakBoth = "\n"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
425 |
breakHtmlOnly = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
426 |
breakTextOnly = "\n"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
427 |
brief = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
428 |
commentStart = "===============================================================\n"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
429 |
commentStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
430 |
defgroupAttributeListStart = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
431 |
defgroupAttributeListStop = "\n"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
432 |
defgroupGlobalValueListStart = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
433 |
defgroupGlobalValueListStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
434 |
defgroupTraceSourceListStart = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
435 |
defgroupTraceSourceListStop = "\n"; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
436 |
flagSpanStart = ""; |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
437 |
flagSpanStop = ""; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
438 |
functionStart = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
439 |
functionStop = "\n\n"; |
9116
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
440 |
headingStart = ""; |
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
441 |
headingStop = ""; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
442 |
indentHtmlOnly = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
443 |
ingroupConstructs = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
444 |
listStart = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
445 |
listStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
446 |
listLineStart = " * "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
447 |
listLineStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
448 |
reference = ""; |
7575
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
449 |
temporaryCharacter = ""; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
450 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
451 |
else |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
452 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
453 |
anchor = "\\anchor "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
454 |
boldStart = "<b>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
455 |
boldStop = "</b>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
456 |
breakBoth = "<br>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
457 |
breakHtmlOnly = "<br>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
458 |
breakTextOnly = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
459 |
brief = "\\brief "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
460 |
commentStart = "/*!"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
461 |
commentStop = "*/"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
462 |
defgroupAttributeListStart = "\\defgroup AttributeList "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
463 |
defgroupAttributeListStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
464 |
defgroupGlobalValueListStart = "\\defgroup GlobalValueList "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
465 |
defgroupGlobalValueListStop = ""; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
466 |
defgroupTraceSourceListStart = "\\defgroup TraceSourceList "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
467 |
defgroupTraceSourceListStop = ""; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
468 |
flagSpanStart = "<span class=\"mlabel\">"; |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
469 |
flagSpanStop = "</span>"; |
9116
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
470 |
functionStart = "\\class "; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
471 |
functionStop = ""; |
9116
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
472 |
headingStart = "<h3>"; |
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
473 |
headingStop = "</h3>"; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
474 |
indentHtmlOnly = " "; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
475 |
ingroupConstructs = "\\ingroup constructs\n"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
476 |
listStart = "<ul>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
477 |
listStop = "</ul>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
478 |
listLineStart = "<li>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
479 |
listLineStop = "</li>"; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
480 |
reference = "\\ref "; |
7575
deaf734002d2
Remove % characters showing up in introspected text file
Mitch Watrous <watrous@u.washington.edu>
parents:
7519
diff
changeset
|
481 |
temporaryCharacter = "%"; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
482 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
483 |
|
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
484 |
NodeContainer c; c.Create (1); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
485 |
|
9222
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
486 |
// The below statements register typical aggregation relationships |
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
487 |
// in ns-3 programs, that otherwise aren't picked up automatically |
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
488 |
// by the creation of the above node. To manually list other common |
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
489 |
// aggregation relationships that you would like to see show up in |
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
490 |
// the list of configuration paths in the doxygen, add additional |
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
491 |
// statements below. |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
492 |
StaticInformation info; |
3132
b0b0abb911cd
move Tcp to TcpSocketFactory
Tom Henderson <tomh@tomh.org>
parents:
3125
diff
changeset
|
493 |
info.RecordAggregationInfo ("ns3::Node", "ns3::TcpSocketFactory"); |
3125
d2d8a36cfd23
s/ns3::Udp/ns3::UdpSocketFactory
Tom Henderson <tomh@tomh.org>
parents:
2989
diff
changeset
|
494 |
info.RecordAggregationInfo ("ns3::Node", "ns3::UdpSocketFactory"); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
495 |
info.RecordAggregationInfo ("ns3::Node", "ns3::PacketSocketFactory"); |
4364 | 496 |
info.RecordAggregationInfo ("ns3::Node", "ns3::olsr::RoutingProtocol"); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
497 |
info.RecordAggregationInfo ("ns3::Node", "ns3::MobilityModel"); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
498 |
info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv4L3Protocol"); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
499 |
info.RecordAggregationInfo ("ns3::Node", "ns3::ArpL3Protocol"); |
9174
bb6bbda68e97
Bug 1520 (More partially) - config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
500 |
info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv4L4Protocol"); |
bb6bbda68e97
Bug 1520 (More partially) - config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
501 |
info.RecordAggregationInfo ("ns3::Node", "ns3::UdpL4Protocol"); |
bb6bbda68e97
Bug 1520 (More partially) - config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
502 |
info.RecordAggregationInfo ("ns3::Node", "ns3::Ipv6L3Protocol"); |
bb6bbda68e97
Bug 1520 (More partially) - config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
503 |
info.RecordAggregationInfo ("ns3::Node", "ns3::Icmpv6L4Protocol"); |
bb6bbda68e97
Bug 1520 (More partially) - config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9166
diff
changeset
|
504 |
info.RecordAggregationInfo ("ns3::Node", "ns3::TcpL4Protocol"); |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
505 |
|
9166
1d2a0119e60c
Bug 152 (Partially)- config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9140
diff
changeset
|
506 |
// Create a channel object so that channels appear in the namespace |
1d2a0119e60c
Bug 152 (Partially)- config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9140
diff
changeset
|
507 |
// paths that will be generated here. |
1d2a0119e60c
Bug 152 (Partially)- config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9140
diff
changeset
|
508 |
Ptr<CsmaChannel> csma; |
1d2a0119e60c
Bug 152 (Partially)- config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9140
diff
changeset
|
509 |
csma = CreateObject<CsmaChannel> (); |
1d2a0119e60c
Bug 152 (Partially)- config paths not documented
Mitch Watrous <watrous@u.washington.edu>
parents:
9140
diff
changeset
|
510 |
|
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
511 |
for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
512 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
513 |
Ptr<Object> object = Config::GetRootNamespaceObject (i); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
514 |
info.Gather (object->GetInstanceTypeId ()); |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
515 |
} |
1368
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
516 |
|
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
517 |
std::map< std::string, uint32_t> nameMap; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
518 |
std::map< std::string, uint32_t>::const_iterator nameMapIterator; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
519 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
520 |
// Create a map from the class names to their index in the vector of |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
521 |
// TypeId's so that the names will end up in alphabetical order. |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
522 |
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
523 |
{ |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
524 |
TypeId tid = TypeId::GetRegistered (i); |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
525 |
if (tid.MustHideFromDocumentation ()) |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
526 |
{ |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
527 |
continue; |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
528 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
529 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
530 |
// Capitalize all of letters in the name so that it sorts |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
531 |
// correctly in the map. |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
532 |
std::string name = tid.GetName (); |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
533 |
for (uint32_t j = 0; j < name.length (); j++) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
534 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
535 |
name[j] = toupper (name[j]); |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
536 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
537 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
538 |
// Save this name's index. |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
539 |
nameMap[name] = i; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
540 |
} |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
541 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
542 |
// Iterate over the map, which will print the class names in |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
543 |
// alphabetical order. |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
544 |
for (nameMapIterator = nameMap.begin (); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
545 |
nameMapIterator != nameMap.end (); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
546 |
nameMapIterator++) |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
547 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
548 |
// Get the class's index out of the map; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
549 |
uint32_t i = nameMapIterator->second; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
550 |
|
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
551 |
std::cout << commentStart << std::endl; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
552 |
TypeId tid = TypeId::GetRegistered (i); |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
553 |
if (tid.MustHideFromDocumentation ()) |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
554 |
{ |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
555 |
continue; |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
556 |
} |
9116
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
557 |
std::cout << functionStart << tid.GetName () << std::endl; |
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
558 |
std::cout << std::endl; |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
559 |
std::vector<std::string> paths = info.Get (tid); |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
560 |
|
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
561 |
// Config -------------- |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
562 |
if (paths.empty ()) |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
563 |
{ |
9222
b72fd6e6a4b5
Bug 1520 - config paths not documented in Doxygen for CsmaChannel
Mitch Watrous <watrous@u.washington.edu>
parents:
9208
diff
changeset
|
564 |
std::cout << "Doxygen introspection did not find any typical Config paths." |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
565 |
<< breakBoth << std::endl; |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
566 |
} |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
567 |
else |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
568 |
{ |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
569 |
std::cout << headingStart |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
570 |
<< "Config Paths" |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
571 |
<< headingStop << std::endl; |
9116
c2c846c432d2
Move attribute, config, trace docs to class description.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
8749
diff
changeset
|
572 |
std::cout << std::endl; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
573 |
std::cout << tid.GetName () |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
574 |
<< " is accessible through the following paths" |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
575 |
<< " with Config::Set and Config::Connect:" |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
576 |
<< std::endl; |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
577 |
std::cout << listStart << std::endl; |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
578 |
for (uint32_t k = 0; k < paths.size (); ++k) |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
579 |
{ |
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
580 |
std::string path = paths[k]; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
581 |
std::cout << listLineStart << path |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
582 |
<< listLineStop << breakTextOnly << std::endl; |
2944
d8806baadedb
generate path information for each type.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2931
diff
changeset
|
583 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
584 |
std::cout << listStop << std::endl; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
585 |
} // Config |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
586 |
|
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
587 |
// Attributes ---------- |
2693
56e28e34e109
TypeId::GetAttributeListN -> TypeId::GetAttributeN
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2602
diff
changeset
|
588 |
if (tid.GetAttributeN () == 0) |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
589 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
590 |
std::cout << "No Attributes are defined for this type." |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
591 |
<< breakBoth << std::endl; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
592 |
} |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
593 |
else |
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
594 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
595 |
std::cout << headingStart << "Attributes" |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
596 |
<< headingStop << std::endl; |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
597 |
PrintAttributes (tid, std::cout); |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
598 |
|
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
599 |
TypeId tmp = tid.GetParent (); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
600 |
while (tmp.GetParent () != tmp) |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
601 |
{ |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
602 |
if (tmp.GetAttributeN () != 0) |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
603 |
{ |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
604 |
std::cout << headingStart |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
605 |
<< "Attributes defined in parent class " |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
606 |
<< tmp.GetName () |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
607 |
<< headingStop << std::endl; |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
608 |
PrintAttributes (tmp, std::cout); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
609 |
} |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
610 |
tmp = tmp.GetParent (); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
611 |
} |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
612 |
} // Attributes |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
613 |
|
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
614 |
// Tracing ------------- |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
615 |
if (tid.GetTraceSourceN () == 0) |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
616 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
617 |
std::cout << "No TraceSources are defined for this type." |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
618 |
<< breakBoth << std::endl; |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
619 |
} |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
620 |
else |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
621 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
622 |
std::cout << headingStart << "TraceSources" |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
623 |
<< headingStop << std::endl; |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
624 |
PrintTraceSources (tid, std::cout); |
2602
d9262bff6df2
add back support for introspected doxygen.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2600
diff
changeset
|
625 |
} |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
626 |
{ |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
627 |
TypeId tmp = tid.GetParent (); |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
628 |
while (tmp.GetParent () != tmp) |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
629 |
{ |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
630 |
if (tmp.GetTraceSourceN () != 0) |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
631 |
{ |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
632 |
std::cout << headingStart |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
633 |
<< "TraceSources defined in parent class " |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
634 |
<< tmp.GetName () |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
635 |
<< headingStop << std::endl; |
2945
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
636 |
PrintTraceSources (tmp, std::cout); |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
637 |
} |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
638 |
tmp = tmp.GetParent (); |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
639 |
} |
8e9f4dc59d8b
print list of trace sources
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2944
diff
changeset
|
640 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
641 |
std::cout << commentStop << std::endl; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
642 |
} // class documentation |
1368
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
643 |
|
1853
e2d7985a5938
print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1538
diff
changeset
|
644 |
|
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
645 |
std::cout << commentStart << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
646 |
<< ingroupConstructs |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
647 |
<< defgroupTraceSourceListStart << "The list of all trace sources." |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
648 |
<< defgroupTraceSourceListStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
649 |
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i) |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
650 |
{ |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
651 |
TypeId tid = TypeId::GetRegistered (i); |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
652 |
if (tid.GetTraceSourceN () == 0 || |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
653 |
tid.MustHideFromDocumentation ()) |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
654 |
{ |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
655 |
continue; |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
656 |
} |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
657 |
std::cout << boldStart << tid.GetName () |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
658 |
<< boldStop << breakHtmlOnly << std::endl |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
659 |
<< listStart << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
660 |
for (uint32_t j = 0; j < tid.GetTraceSourceN (); ++j) |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
661 |
{ |
7395
a1bb24a8ae25
use new API, kill old one.
Mathieu Lacage <mathieu.lacage@gmail.com>
parents:
7394
diff
changeset
|
662 |
struct TypeId::TraceSourceInformation info = tid.GetTraceSource(j); |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
663 |
std::cout << listLineStart << info.name << ": " << info.help |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
664 |
<< listLineStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
665 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
666 |
std::cout << listStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
667 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
668 |
std::cout << commentStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
669 |
|
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
670 |
std::cout << commentStart << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
671 |
<< ingroupConstructs |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
672 |
<< defgroupAttributeListStart << "The list of all attributes." |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
673 |
<< defgroupAttributeListStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
674 |
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i) |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
675 |
{ |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
676 |
TypeId tid = TypeId::GetRegistered (i); |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
677 |
if (tid.GetAttributeN () == 0 || |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
678 |
tid.MustHideFromDocumentation ()) |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
679 |
{ |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
680 |
continue; |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
681 |
} |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
682 |
std::cout << boldStart << tid.GetName () |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
683 |
<< boldStop << breakHtmlOnly << std::endl |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
684 |
<< listStart << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
685 |
for (uint32_t j = 0; j < tid.GetAttributeN (); ++j) |
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
686 |
{ |
7394 | 687 |
struct TypeId::AttributeInformation info = tid.GetAttribute(j); |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
688 |
std::cout << listLineStart << info.name << ": " << info.help |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
689 |
<< listLineStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
690 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
691 |
std::cout << listStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
692 |
} |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
693 |
std::cout << commentStop << std::endl; |
2964
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
694 |
|
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
695 |
|
4e8cb1577144
generate list of trace sources and attributes in separate dox groups.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2951
diff
changeset
|
696 |
|
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
697 |
std::cout << commentStart << std::endl |
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
698 |
<< ingroupConstructs |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
699 |
<< defgroupGlobalValueListStart << "The list of all global values." |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
700 |
<< defgroupGlobalValueListStop << std::endl |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
701 |
<< listStart << std::endl; |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
702 |
for (GlobalValue::Iterator i = GlobalValue::Begin (); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
703 |
i != GlobalValue::End (); |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
704 |
++i) |
4513
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
705 |
{ |
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
706 |
StringValue val; |
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
707 |
(*i)->GetValue (val); |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
708 |
std::cout << indentHtmlOnly |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
709 |
<< listLineStart |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
710 |
<< boldStart |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
711 |
<< anchor |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
712 |
<< "GlobalValue" << (*i)->GetName () << " " << (*i)->GetName () |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
713 |
<< boldStop |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
714 |
<< ": " << (*i)->GetHelp () << "(" << val.Get () << ")" |
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
715 |
<< listLineStop << std::endl; |
4513
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
716 |
} |
9124
4ee743993c0a
Highlight attribute flags in doxygen html
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9116
diff
changeset
|
717 |
std::cout << listStop << std::endl |
7519
77e27ba9b9a1
Make the source code introspection program output text
Mitch Watrous <watrous@u.washington.edu>
parents:
7412
diff
changeset
|
718 |
<< commentStop << std::endl; |
4513
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
719 |
|
544c9d637ff1
bug 580: doxygen introspection does not document global values
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4364
diff
changeset
|
720 |
|
1368
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
721 |
return 0; |
e75dc1a2a5fb
add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
722 |
} |