A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StaticInformation Class Reference

Gather aggregation and configuration path information from registered types. More...

+ Collaboration diagram for StaticInformation:

Public Member Functions

void Gather (TypeId tid)
 Gather aggregation and configuration path information for tid. More...
 
std::vector< std::string > Get (TypeId tid)
 
void Print (void) const
 Print output in "a -> b" form on std::cout. More...
 
void RecordAggregationInfo (std::string a, std::string b)
 Record the a -> b aggregation relation. More...
 

Private Member Functions

void DoGather (TypeId tid)
 Gather attribute, configuration path information for tid. More...
 
void find_and_replace (std::string &source, const std::string find, std::string replace)
 (Inplace) find and replace all instances of string More...
 
std::string GetCurrentPath (void) const
 
bool HasAlreadyBeenProcessed (TypeId tid) const
 
void RecordOutput (TypeId tid)
 Record the current config path for tid. More...
 

Private Attributes

std::vector< std::pair< TypeId,
TypeId > > 
m_aggregates
 List of aggregation relationships. More...
 
std::vector< TypeIdm_alreadyProcessed
 List of TypeIds we've already processed. More...
 
std::vector< std::string > m_currentPath
 Current configuration path. More...
 
std::vector< std::pair< TypeId,
std::string > > 
m_output
 Configuration path for each TypeId. More...
 

Detailed Description

Gather aggregation and configuration path information from registered types.

Definition at line 142 of file print-introspected-doxygen.cc.

Member Function Documentation

void StaticInformation::DoGather ( TypeId  tid)
private

Gather attribute, configuration path information for tid.

Parameters
tid[in] the TypeId to gather information from

Note: for the Doxygen version only, we insert a % in the path below to ensure that doxygen does not attempt to resolve the typeid names included in the string. if the name contains ::, using the % sign will remove that sign resulting for instance in $ns3MobilityModel instead of $ns3::MobilityModel hence the output must be in the form $ns3::MobilityModel in order to show correctly $ns3::MobilityModel We add at the beginning of the name $% and we replace all the :: in the string by ::%.

Definition at line 291 of file print-introspected-doxygen.cc.

References ns3::TypeId::AttributeInformation::checker, ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::ObjectPtrContainerChecker::GetItemTypeId(), ns3::TypeId::GetName(), ns3::PointerChecker::GetPointeeTypeId(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::IsChildOf(), ns3::TypeId::AttributeInformation::name, NS_LOG_FUNCTION, ns3::PeekPointer(), and anonymous_namespace{print-introspected-doxygen.cc}::temporaryCharacter.

+ Here is the call graph for this function:

void StaticInformation::find_and_replace ( std::string &  source,
const std::string  find,
std::string  replace 
)
private

(Inplace) find and replace all instances of string

Parameters
source[inout] string to search and replace in
find[in] string to search for
replace[in] string to insert in place of find

Definition at line 394 of file print-introspected-doxygen.cc.

void StaticInformation::Gather ( TypeId  tid)

Gather aggregation and configuration path information for tid.

Parameters
tid[in] the TypeId to gather information from

Definition at line 282 of file print-introspected-doxygen.cc.

Referenced by main().

+ Here is the caller graph for this function:

std::vector< std::string > StaticInformation::Get ( TypeId  tid)
Returns
the configuration paths for tid
Parameters
tid[in] the TypeId to return information for

Definition at line 267 of file print-introspected-doxygen.cc.

Referenced by main().

+ Here is the caller graph for this function:

std::string StaticInformation::GetCurrentPath ( void  ) const
private
Returns
the current configuration path

Definition at line 236 of file print-introspected-doxygen.cc.

bool StaticInformation::HasAlreadyBeenProcessed ( TypeId  tid) const
private
Returns
whether the tid has already been processed
Parameters
tid[in] the TypeId to check.

Definition at line 254 of file print-introspected-doxygen.cc.

void StaticInformation::Print ( void  ) const

Print output in "a -> b" form on std::cout.

Definition at line 226 of file print-introspected-doxygen.cc.

void StaticInformation::RecordAggregationInfo ( std::string  a,
std::string  b 
)

Record the a -> b aggregation relation.

Parameters
a[in] the source(?) TypeId name
b[in] the destination(?) TypeId name

Definition at line 220 of file print-introspected-doxygen.cc.

References ns3::TypeId::LookupByName().

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void StaticInformation::RecordOutput ( TypeId  tid)
private

Record the current config path for tid.

Parameters
tid[in] the TypeId to record.

Definition at line 248 of file print-introspected-doxygen.cc.

Member Data Documentation

std::vector<std::pair<TypeId,TypeId> > StaticInformation::m_aggregates
private

List of aggregation relationships.

Definition at line 216 of file print-introspected-doxygen.cc.

std::vector<TypeId> StaticInformation::m_alreadyProcessed
private

List of TypeIds we've already processed.

Definition at line 212 of file print-introspected-doxygen.cc.

std::vector<std::string> StaticInformation::m_currentPath
private

Current configuration path.

Definition at line 208 of file print-introspected-doxygen.cc.

std::vector<std::pair<TypeId,std::string> > StaticInformation::m_output
private

Configuration path for each TypeId.

Definition at line 204 of file print-introspected-doxygen.cc.


The documentation for this class was generated from the following file: