#include <iostream>
#include <algorithm>
#include <map>
#include <climits>
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/global-value.h"
#include "ns3/log.h"
#include "ns3/object-vector.h"
#include "ns3/object.h"
#include "ns3/pointer.h"
#include "ns3/string.h"
#include "ns3/node-container.h"
#include "ns3/simple-channel.h"
Go to the source code of this file.
Classes | |
struct | AttributeDescriptor |
Descriptor for an AttributeValue. More... | |
class | StaticInformation |
Gather aggregation and configuration path information from registered types. More... | |
Namespaces | |
anonymous_namespace{print-introspected-doxygen.cc} | |
Typedefs | |
typedef std::map< std::string, int32_t > | NameMap |
typedef NameMap::const_iterator | NameMapIterator |
Functions | |
NameMap | GetNameMap (const StaticInformation &info) |
StaticInformation | GetTypicalAggregations () |
void | PrintAllAttributes (std::ostream &os) |
Print the list of all Attributes. More... | |
void | PrintAllGlobals (std::ostream &os) |
Print the list of all global variables. More... | |
void | PrintAllLogComponents (std::ostream &os) |
Print the list of all LogComponents. More... | |
void | PrintAllTraceSources (std::ostream &os) |
Print the list of all Trace sources. More... | |
void | PrintAttributeHelper (std::ostream &os, const AttributeDescriptor &attr) |
Print documentation corresponding to use of the ATTRIBUTE_HELPER_HEADER macro or ATTRIBUTE_VALUE_DEFINE_WITH_NAME macro. More... | |
void | PrintAttributeImplementations (std::ostream &os) |
Print documentation for Attribute implementations. More... | |
void | PrintAttributes (std::ostream &os, const TypeId tid) |
Print the Attributes block for tid, including Attributes declared in base classes. More... | |
void | PrintAttributesTid (std::ostream &os, const TypeId tid) |
Print direct Attributes for this TypeId. More... | |
void | PrintAttributeValueSection (std::ostream &os, const std::string &name, const bool seeBase=true) |
Print the section definition for an AttributeValue. More... | |
void | PrintAttributeValueWithName (std::ostream &os, const std::string &name, const std::string &type, const std::string &header) |
Print the AttributeValue documentation for a class. More... | |
void | PrintConfigPaths (std::ostream &os, const StaticInformation &info, const TypeId tid) |
void | PrintMakeAccessors (std::ostream &os, const std::string &name) |
Print the AttributeValue MakeAccessor documentation for a class. More... | |
void | PrintMakeChecker (std::ostream &os, const std::string &name, const std::string &header) |
Print the AttributeValue MakeChecker documentation for a class. More... | |
void | PrintSize (std::ostream &os, const TypeId tid) |
Print the size of the type represented by this tid. More... | |
void | PrintTraceSources (std::ostream &os, const TypeId tid) |
Print the Trace sources block for tid, including Trace sources declared in base classes. More... | |
void | PrintTraceSourcesTid (std::ostream &os, const TypeId tid) |
Print direct Trace sources for this TypeId. More... | |
void | SetMarkup (bool outputText) |
Initialize the markup strings, for either doxygen or text. More... | |
template<typename T > | |
void | Uniquefy (T t) |
Helper to keep only the unique items in a container. More... | |
typedef std::map< std::string, int32_t> NameMap |
Definition at line 1286 of file print-introspected-doxygen.cc.
typedef NameMap::const_iterator NameMapIterator |
Definition at line 1287 of file print-introspected-doxygen.cc.
NameMap GetNameMap | ( | const StaticInformation & | info | ) |
Definition at line 1293 of file print-introspected-doxygen.cc.
References ns3::TypeId::GetName(), StaticInformation::GetNoTypeIds(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::MustHideFromDocumentation(), and NS_LOG_FUNCTION_NOARGS.
StaticInformation GetTypicalAggregations | ( | ) |
Definition at line 1236 of file print-introspected-doxygen.cc.
References StaticInformation::Gather(), ns3::Object::GetInstanceTypeId(), ns3::Config::GetRootNamespaceObject(), ns3::Config::GetRootNamespaceObjectN(), NS_LOG_FUNCTION_NOARGS, and StaticInformation::RecordAggregationInfo().
void PrintAllAttributes | ( | std::ostream & | os | ) |
Print the list of all Attributes.
[in,out] | os | The output stream. |
Definition at line 447 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, anonymous_namespace{print-introspected-doxygen.cc}::breakHtmlOnly, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetName(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::AttributeInformation::help, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, ns3::TypeId::MustHideFromDocumentation(), ns3::TypeId::AttributeInformation::name, NS_LOG_FUNCTION_NOARGS, anonymous_namespace{print-introspected-doxygen.cc}::page, and anonymous_namespace{print-introspected-doxygen.cc}::reference.
void PrintAllGlobals | ( | std::ostream & | os | ) |
Print the list of all global variables.
[in,out] | os | The output stream. |
Definition at line 492 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::anchor, ns3::GlobalValue::Begin(), anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, ns3::GlobalValue::End(), ns3::StringValue::Get(), anonymous_namespace{print-introspected-doxygen.cc}::indentHtmlOnly, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, NS_LOG_FUNCTION_NOARGS, anonymous_namespace{print-introspected-doxygen.cc}::page, and anonymous_namespace{print-introspected-doxygen.cc}::reference.
void PrintAllLogComponents | ( | std::ostream & | os | ) |
Print the list of all LogComponents.
[in,out] | os | The output stream. |
Definition at line 530 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, ns3::LogComponent::GetComponentList(), anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, NS_LOG_FUNCTION_NOARGS, anonymous_namespace{print-introspected-doxygen.cc}::page, and anonymous_namespace{print-introspected-doxygen.cc}::reference.
void PrintAllTraceSources | ( | std::ostream & | os | ) |
Print the list of all Trace sources.
[in,out] | os | The output stream. |
Definition at line 571 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, anonymous_namespace{print-introspected-doxygen.cc}::breakHtmlOnly, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, ns3::TypeId::GetName(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::GetTraceSource(), ns3::TypeId::GetTraceSourceN(), ns3::TypeId::TraceSourceInformation::help, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, ns3::TypeId::MustHideFromDocumentation(), ns3::TypeId::TraceSourceInformation::name, NS_LOG_FUNCTION_NOARGS, anonymous_namespace{print-introspected-doxygen.cc}::page, and anonymous_namespace{print-introspected-doxygen.cc}::reference.
void PrintAttributeHelper | ( | std::ostream & | os, |
const AttributeDescriptor & | attr | ||
) |
Print documentation corresponding to use of the ATTRIBUTE_HELPER_HEADER macro or ATTRIBUTE_VALUE_DEFINE_WITH_NAME macro.
[in,out] | os | The output stream. |
[in] | attr | The AttributeDescriptor. |
Definition at line 838 of file print-introspected-doxygen.cc.
References AttributeDescriptor::m_header, AttributeDescriptor::m_name, AttributeDescriptor::m_seeBase, AttributeDescriptor::m_type, NS_LOG_FUNCTION, PrintAttributeValueSection(), PrintAttributeValueWithName(), PrintMakeAccessors(), and PrintMakeChecker().
Referenced by PrintAttributeImplementations().
void PrintAttributeImplementations | ( | std::ostream & | os | ) |
Print documentation for Attribute implementations.
Definition at line 854 of file print-introspected-doxygen.cc.
References NS_LOG_FUNCTION_NOARGS, PrintAttributeHelper(), PrintAttributeValueSection(), PrintAttributeValueWithName(), PrintMakeAccessors(), and PrintMakeChecker().
void PrintAttributes | ( | std::ostream & | os, |
const TypeId | tid | ||
) |
Print the Attributes block for tid, including Attributes declared in base classes.
All Attributes of this TypeId will be printed, including those defined in parent classes.
[in,out] | os | The output stream. |
[in] | tid | The TypeId to print. |
Definition at line 306 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::breakBoth, ns3::TypeId::GetAttributeN(), ns3::TypeId::GetName(), ns3::TypeId::GetParent(), anonymous_namespace{print-introspected-doxygen.cc}::headingStart, anonymous_namespace{print-introspected-doxygen.cc}::headingStop, NS_LOG_FUNCTION, and PrintAttributesTid().
void PrintAttributesTid | ( | std::ostream & | os, |
const TypeId | tid | ||
) |
Print direct Attributes for this TypeId.
Only attributes defined directly by this TypeId will be printed.
[in,out] | os | The output stream. |
[in] | tid | The TypeId to print. |
Definition at line 174 of file print-introspected-doxygen.cc.
References ns3::TypeId::AttributeInformation::accessor, ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::ATTR_GET, ns3::TypeId::ATTR_SET, anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, ns3::TypeId::AttributeInformation::checker, ns3::TypeId::AttributeInformation::flags, anonymous_namespace{print-introspected-doxygen.cc}::flagSpanStart, anonymous_namespace{print-introspected-doxygen.cc}::flagSpanStop, ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::ObjectPtrContainerChecker::GetItemTypeId(), ns3::TypeId::GetName(), ns3::PointerChecker::GetPointeeTypeId(), ns3::TypeId::AttributeInformation::help, ns3::TypeId::AttributeInformation::initialValue, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, ns3::TypeId::AttributeInformation::name, NS_LOG_FUNCTION, ns3::PeekPointer(), and anonymous_namespace{print-introspected-doxygen.cc}::reference.
Referenced by PrintAttributes().
void PrintAttributeValueSection | ( | std::ostream & | os, |
const std::string & | name, | ||
const bool | seeBase = true |
||
) |
Print the section definition for an AttributeValue.
In doxygen form this will print a comment block with
* \ingroup attribute * \defgroup attribute_<name>Value <name>Value *
[in,out] | os | The output stream. |
[in] | name | The base name of the resulting AttributeValue type. |
[in] | seeBase | Print a "see also" pointing to the base class. |
Definition at line 629 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, NS_LOG_FUNCTION, anonymous_namespace{print-introspected-doxygen.cc}::sectionStart, anonymous_namespace{print-introspected-doxygen.cc}::seeAlso, and anonymous_namespace{print-introspected-doxygen.cc}::subSectionStart.
Referenced by PrintAttributeHelper(), and PrintAttributeImplementations().
void PrintAttributeValueWithName | ( | std::ostream & | os, |
const std::string & | name, | ||
const std::string & | type, | ||
const std::string & | header | ||
) |
Print the AttributeValue documentation for a class.
This will print documentation for the <name>Value class and methods.
[in,out] | os | The output stream. |
[in] | name | The token to use in defining the accessor name. |
[in] | type | The underlying type name. |
[in] | header | The header file which contains this declaration. |
Definition at line 670 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::argument, anonymous_namespace{print-introspected-doxygen.cc}::classStart, anonymous_namespace{print-introspected-doxygen.cc}::codeWord, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, anonymous_namespace{print-introspected-doxygen.cc}::functionStart, NS_LOG_FUNCTION, anonymous_namespace{print-introspected-doxygen.cc}::returns, anonymous_namespace{print-introspected-doxygen.cc}::sectionStart, anonymous_namespace{print-introspected-doxygen.cc}::seeAlso, and anonymous_namespace{print-introspected-doxygen.cc}::variable.
Referenced by PrintAttributeHelper(), and PrintAttributeImplementations().
void PrintConfigPaths | ( | std::ostream & | os, |
const StaticInformation & | info, | ||
const TypeId | tid | ||
) |
Definition at line 1333 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::breakBoth, anonymous_namespace{print-introspected-doxygen.cc}::breakTextOnly, StaticInformation::Get(), ns3::TypeId::GetName(), anonymous_namespace{print-introspected-doxygen.cc}::headingStart, anonymous_namespace{print-introspected-doxygen.cc}::headingStop, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, and NS_LOG_FUNCTION.
void PrintMakeAccessors | ( | std::ostream & | os, |
const std::string & | name | ||
) |
Print the AttributeValue MakeAccessor documentation for a class.
This will print documentation for the Make<name>Accessor
functions.
[in,out] | os | The output stream. |
[in] | name | The token to use in defining the accessor name. |
Definition at line 756 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, anonymous_namespace{print-introspected-doxygen.cc}::copyDoc, anonymous_namespace{print-introspected-doxygen.cc}::functionStart, NS_LOG_FUNCTION, anonymous_namespace{print-introspected-doxygen.cc}::sectionStart, and anonymous_namespace{print-introspected-doxygen.cc}::seeAlso.
Referenced by PrintAttributeHelper(), and PrintAttributeImplementations().
void PrintMakeChecker | ( | std::ostream & | os, |
const std::string & | name, | ||
const std::string & | header | ||
) |
Print the AttributeValue MakeChecker documentation for a class.
This will print documentation for the Make<name>Checker
function.
[in,out] | os | The output stream. |
[in] | name | The token to use in defining the accessor name. |
[in] | header | The header file which contains this declaration. |
Definition at line 792 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::classStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, anonymous_namespace{print-introspected-doxygen.cc}::functionStart, NS_LOG_FUNCTION, anonymous_namespace{print-introspected-doxygen.cc}::returns, anonymous_namespace{print-introspected-doxygen.cc}::sectionStart, and anonymous_namespace{print-introspected-doxygen.cc}::seeAlso.
Referenced by PrintAttributeHelper(), and PrintAttributeImplementations().
void PrintSize | ( | std::ostream & | os, |
const TypeId | tid | ||
) |
Print the size of the type represented by this tid.
[in,out] | os | The output stream. |
[in] | tid | The TypeId to print. |
Definition at line 423 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, ns3::TypeId::GetSize(), NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void PrintTraceSources | ( | std::ostream & | os, |
const TypeId | tid | ||
) |
Print the Trace sources block for tid, including Trace sources declared in base classes.
All Trace sources of this TypeId will be printed, including those defined in parent classes.
[in,out] | os | The output stream. |
[in] | tid | The TypeId to print. |
Definition at line 383 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::breakBoth, ns3::TypeId::GetName(), ns3::TypeId::GetParent(), ns3::TypeId::GetTraceSourceN(), anonymous_namespace{print-introspected-doxygen.cc}::headingStart, anonymous_namespace{print-introspected-doxygen.cc}::headingStop, NS_LOG_FUNCTION, and PrintTraceSourcesTid().
void PrintTraceSourcesTid | ( | std::ostream & | os, |
const TypeId | tid | ||
) |
Print direct Trace sources for this TypeId.
Only Trace sources defined directly by this TypeId will be printed.
[in,out] | os | The output stream. |
[in] | tid | The TypeId to print. |
Definition at line 352 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, anonymous_namespace{print-introspected-doxygen.cc}::breakBoth, ns3::TypeId::TraceSourceInformation::callback, ns3::TypeId::GetTraceSource(), ns3::TypeId::GetTraceSourceN(), ns3::TypeId::TraceSourceInformation::help, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, ns3::TypeId::TraceSourceInformation::name, and NS_LOG_FUNCTION.
Referenced by PrintTraceSources().
void SetMarkup | ( | bool | outputText | ) |
Initialize the markup strings, for either doxygen or text.
[in] | outputText | true for text output, false for doxygen output. |
Definition at line 85 of file print-introspected-doxygen.cc.
References anonymous_namespace{print-introspected-doxygen.cc}::anchor, anonymous_namespace{print-introspected-doxygen.cc}::argument, anonymous_namespace{print-introspected-doxygen.cc}::boldStart, anonymous_namespace{print-introspected-doxygen.cc}::boldStop, anonymous_namespace{print-introspected-doxygen.cc}::breakBoth, anonymous_namespace{print-introspected-doxygen.cc}::breakHtmlOnly, anonymous_namespace{print-introspected-doxygen.cc}::breakTextOnly, anonymous_namespace{print-introspected-doxygen.cc}::brief, anonymous_namespace{print-introspected-doxygen.cc}::classStart, anonymous_namespace{print-introspected-doxygen.cc}::classStop, anonymous_namespace{print-introspected-doxygen.cc}::codeWord, anonymous_namespace{print-introspected-doxygen.cc}::commentStart, anonymous_namespace{print-introspected-doxygen.cc}::commentStop, anonymous_namespace{print-introspected-doxygen.cc}::copyDoc, anonymous_namespace{print-introspected-doxygen.cc}::flagSpanStart, anonymous_namespace{print-introspected-doxygen.cc}::flagSpanStop, anonymous_namespace{print-introspected-doxygen.cc}::functionStart, anonymous_namespace{print-introspected-doxygen.cc}::functionStop, anonymous_namespace{print-introspected-doxygen.cc}::headingStart, anonymous_namespace{print-introspected-doxygen.cc}::headingStop, anonymous_namespace{print-introspected-doxygen.cc}::indentHtmlOnly, anonymous_namespace{print-introspected-doxygen.cc}::listLineStart, anonymous_namespace{print-introspected-doxygen.cc}::listLineStop, anonymous_namespace{print-introspected-doxygen.cc}::listStart, anonymous_namespace{print-introspected-doxygen.cc}::listStop, NS_LOG_FUNCTION, anonymous_namespace{print-introspected-doxygen.cc}::page, anonymous_namespace{print-introspected-doxygen.cc}::reference, anonymous_namespace{print-introspected-doxygen.cc}::returns, anonymous_namespace{print-introspected-doxygen.cc}::sectionStart, anonymous_namespace{print-introspected-doxygen.cc}::seeAlso, anonymous_namespace{print-introspected-doxygen.cc}::subSectionStart, and anonymous_namespace{print-introspected-doxygen.cc}::variable.
void Uniquefy | ( | T | t | ) |
Helper to keep only the unique items in a container.
The container is modified in place; the elements end up sorted.
The container must support begin()
, end()
and erase()
, which, among the STL containers, limits this to std::vector
, std::dequeue
and std::list
.
The container elements must support operator<
(for std::sort
) and operator==
(for std::unique
).
T | The container type. |
t | The container. |
Definition at line 1124 of file print-introspected-doxygen.cc.
Referenced by StaticInformation::Gather(), and StaticInformation::GetNoTypeIds().