A Discrete-Event Network Simulator
API
ns3::CommandLineHelper Namespace Reference

Helpers for CommandLine to specialize on bool. More...

Functions

template<typename T >
bool UserItemParse (const std::string value, T &val)
 Helpers to specialize CommandLine::UserItem::Parse() More...
 
template<>
bool UserItemParse< bool > (const std::string value, bool &val)
 Specialization of CommandLine::UserItem to bool. More...
 
template<>
bool UserItemParse< uint8_t > (const std::string value, uint8_t &val)
 Specialization of CommandLine::UserItem to uint8_t to distinguish from char. More...
 
template<typename T >
std::string GetDefault (const T &val)
 Helper to specialize CommandLine::UserItem::GetDefault() on bool. More...
 
template<>
std::string GetDefault< bool > (const bool &val)
 Helper to specialize CommandLine::UserItem::GetDefault() on bool. More...
 

Detailed Description

Helpers for CommandLine to specialize on bool.

Function Documentation

◆ UserItemParse< bool >()

template<>
bool ns3::CommandLineHelper::UserItemParse< bool > ( const std::string  value,
bool &  val 
)

Specialization of CommandLine::UserItem to bool.

Parameters
[in]valueThe argument name
[out]valThe boolean variable to set
Returns
true if parsing was successful

Definition at line 815 of file command-line.cc.

◆ UserItemParse< uint8_t >()

template<>
bool ns3::CommandLineHelper::UserItemParse< uint8_t > ( const std::string  value,
uint8_t &  val 
)

Specialization of CommandLine::UserItem to uint8_t to distinguish from char.

Parameters
[in]valueThe argument name
[out]valThe uint8_t variable to set
Returns
true if parsing was successful

Definition at line 846 of file command-line.cc.

References NS_LOG_WARN.