A Discrete-Event Network Simulator
API
ns3::CommandLine::Item Class Referenceabstract

The argument abstract base class. More...

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

Public Member Functions

virtual ~Item ()
 Destructor. More...
 
virtual std::string GetDefault () const
 
virtual bool HasDefault () const
 
virtual bool Parse (const std::string value)=0
 Parse from a string. More...
 

Public Attributes

std::string m_help
 Argument help string. More...
 
std::string m_name
 Argument label: --m_name=... More...
 

Detailed Description

The argument abstract base class.

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

Constructor & Destructor Documentation

◆ ~Item()

ns3::CommandLine::Item::~Item ( )
virtual

Destructor.

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

References NS_LOG_FUNCTION.

Member Function Documentation

◆ GetDefault()

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

Reimplemented in ns3::CommandLine::CallbackItem, ns3::CommandLine::StringItem, and ns3::CommandLine::UserItem< T >.

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

◆ HasDefault()

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

Reimplemented in ns3::CommandLine::CallbackItem, ns3::CommandLine::StringItem, and ns3::CommandLine::UserItem< T >.

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

◆ Parse()

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

Parse from a string.

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

Implemented in ns3::CommandLine::CallbackItem, ns3::CommandLine::StringItem, and ns3::CommandLine::UserItem< T >.

Member Data Documentation

◆ m_help

std::string ns3::CommandLine::Item::m_help

Argument help string.

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

Referenced by ns3::CommandLine::AddNonOption(), and ns3::CommandLine::AddValue().

◆ m_name

std::string ns3::CommandLine::Item::m_name

Argument label: --m_name=...

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

Referenced by ns3::CommandLine::AddNonOption(), ns3::CommandLine::AddValue(), and ns3::CommandLine::HandleNonOption().


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