A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Config::ArrayMatcher Class Reference

Helper to test if an array entry matches a config path specification. More...

+ Collaboration diagram for ns3::Config::ArrayMatcher:

Public Member Functions

 ArrayMatcher (std::string element)
 Construct from a Config path specification.
 
bool Matches (std::size_t i) const
 Test if a specific index matches the Config Path.
 

Private Member Functions

bool StringToUint32 (std::string str, uint32_t *value) const
 Convert a string to an uint32_t.
 

Private Attributes

std::string m_element
 The Config path element.
 

Detailed Description

Helper to test if an array entry matches a config path specification.

Definition at line 194 of file config.cc.

Constructor & Destructor Documentation

◆ ArrayMatcher()

ns3::Config::ArrayMatcher::ArrayMatcher ( std::string element)

Construct from a Config path specification.

Parameters
[in]elementThe Config path specification.

Definition at line 225 of file config.cc.

References NS_LOG_FUNCTION.

Referenced by Matches().

+ Here is the caller graph for this function:

Member Function Documentation

◆ Matches()

bool ns3::Config::ArrayMatcher::Matches ( std::size_t i) const

Test if a specific index matches the Config Path.

Parameters
[in]iThe index.
Returns
true if the index matches the Config Path.

Definition at line 232 of file config.cc.

References ArrayMatcher(), m_element, Matches(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and StringToUint32().

Referenced by ns3::Config::Resolver::DoArrayResolve(), and Matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StringToUint32()

bool ns3::Config::ArrayMatcher::StringToUint32 ( std::string str,
uint32_t * value ) const
private

Convert a string to an uint32_t.

Parameters
[in]strThe string.
[in]valueThe location to store the uint32_t.
Returns
true if the string could be converted.

Definition at line 294 of file config.cc.

References NS_LOG_FUNCTION.

Referenced by Matches().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_element

std::string ns3::Config::ArrayMatcher::m_element
private

The Config path element.

Definition at line 221 of file config.cc.

Referenced by Matches().


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