A Discrete-Event Network Simulator
API
ns3::CommandLine::CallbackItem Class Reference

An argument Item using a Callback to parse the input. More...

+ Inheritance diagram for ns3::CommandLine::CallbackItem:
+ Collaboration diagram for ns3::CommandLine::CallbackItem:

Public Member Functions

std::string GetDefault (void) const
 
bool HasDefault (void) const
 
virtual bool Parse (const std::string value)
 Parse from a string. More...
 
- Public Member Functions inherited from ns3::CommandLine::Item
virtual ~Item ()
 Destructor. More...
 

Public Attributes

ns3::Callback< bool, std::string > m_callback
 The Callback. More...
 
std::string m_default
 The default value, as a string, if it exists. More...
 
- Public Attributes inherited from ns3::CommandLine::Item
std::string m_help
 Argument help string. More...
 
std::string m_name
 Argument label: --m_name=... More...
 

Detailed Description

An argument Item using a Callback to parse the input.

Definition at line 482 of file command-line.h.

Member Function Documentation

◆ GetDefault()

std::string ns3::CommandLine::CallbackItem::GetDefault ( void  ) const
virtual
Returns
The default value

Reimplemented from ns3::CommandLine::Item.

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

◆ HasDefault()

bool ns3::CommandLine::CallbackItem::HasDefault ( void  ) const
virtual
Returns
true if this item has a default value.

Reimplemented from ns3::CommandLine::Item.

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

◆ Parse()

bool ns3::CommandLine::CallbackItem::Parse ( const std::string  value)
virtual

Parse from a string.

Parameters
[in]valueThe string representation
Returns
true if parsing the value succeeded

Implements ns3::CommandLine::Item.

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

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_callback

ns3::Callback<bool, std::string> ns3::CommandLine::CallbackItem::m_callback

The Callback.

Definition at line 496 of file command-line.h.

Referenced by ns3::CommandLine::AddValue().

◆ m_default

std::string ns3::CommandLine::CallbackItem::m_default

The default value, as a string, if it exists.

Definition at line 497 of file command-line.h.

Referenced by ns3::CommandLine::AddValue().


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