A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::CommandLineHelper Namespace Reference

Helpers for CommandLine to specialize UserItem. More...

Functions

template<typename T >
bool UserItemParse (const std::string &value, T &dest)
 Helpers to specialize CommandLine::UserItem::Parse()
 
template<>
bool UserItemParse< bool > (const std::string &value, bool &dest)
 Specialization of CommandLine::UserItem::Parse() to bool.
 
template<>
bool UserItemParse< uint8_t > (const std::string &value, uint8_t &dest)
 Specialization of CommandLine::UserItem::Parse() to uint8_t to distinguish from char.
 
template<typename T >
std::string GetDefault (const std::string &defaultValue)
 Helper to specialize CommandLine::UserItem::GetDefault() on types needing special handling.
 
template<>
std::string GetDefault< bool > (const std::string &defaultValue)
 Helper to specialize CommandLine::UserItem::GetDefault() on types needing special handling.
 
template<>
std::string GetDefault< Time > (const std::string &defaultValue)
 Helper to specialize CommandLine::UserItem::GetDefault() on types needing special handling.
 

Detailed Description

Helpers for CommandLine to specialize UserItem.

Function Documentation

◆ UserItemParse< bool >()

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

Specialization of CommandLine::UserItem::Parse() to bool.

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

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

◆ UserItemParse< uint8_t >()

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

Specialization of CommandLine::UserItem::Parse() to uint8_t to distinguish from char.

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

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

References NS_LOG_WARN.