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

Public Member Functions

void Gather (TypeId tid)
std::vector< std::string > Get (TypeId tid)
void Print (void) const
void RecordAggregationInfo (std::string a, std::string b)

Private Member Functions

void DoGather (TypeId tid)
void find_and_replace (std::string &source, const std::string find, std::string replace)
std::string GetCurrentPath (void) const
bool HasAlreadyBeenProcessed (TypeId tid) const
void RecordOutput (TypeId tid)

Private Attributes

std::vector< std::pair< TypeId,
TypeId > > 
std::vector< TypeIdm_alreadyProcessed
std::vector< std::string > m_currentPath
std::vector< std::pair< TypeId,
std::string > > 

Detailed Description

Gather aggregation and configuration path information from registered types.

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

Member Function Documentation

void StaticInformation::DoGather ( TypeId  tid)

Gather attribute, configuration path information for tid

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 266 of file print-introspected-doxygen.cc.

References ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::TypeId::GetName(), ns3::TypeId::GetRegistered(), ns3::TypeId::GetRegisteredN(), ns3::TypeId::IsChildOf(), and NS_LOG_FUNCTION.

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

(Inplace) find and replace all instances of string

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 369 of file print-introspected-doxygen.cc.

void StaticInformation::Gather ( TypeId  tid)

Gather aggregation and configuration path information for tid

tid[in] the TypeId to gather information from

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

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

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

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

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

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

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

void StaticInformation::Print ( void  ) const

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

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

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

Record the a -> b aggregation relation.

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

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

References ns3::TypeId::LookupByName().

void StaticInformation::RecordOutput ( TypeId  tid)

Record the current config path for tid.

tid[in] the TypeId to record.

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

Member Data Documentation

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

List of aggregation relationships.

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

std::vector<TypeId> StaticInformation::m_alreadyProcessed

List of TypeIds we've already processed

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

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

Current configuration path

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

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

Configuration path for each TypeId

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

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