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

Extension of Item for extra non-options, stored as strings. More...

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

Public Member Functions

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

Public Attributes

std::string m_value
 The argument value.
 
- Public Attributes inherited from ns3::CommandLine::Item
std::string m_help
 Argument help string.
 
std::string m_name
 Argument label: --m_name=...
 

Detailed Description

Extension of Item for extra non-options, stored as strings.

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

Member Function Documentation

◆ GetDefault()

std::string ns3::CommandLine::StringItem::GetDefault ( ) const
overridevirtual
Returns
The default value

Implements ns3::CommandLine::Item.

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

◆ HasDefault()

bool ns3::CommandLine::StringItem::HasDefault ( ) const
overridevirtual
Returns
true if this item has a default value.

Reimplemented from ns3::CommandLine::Item.

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

◆ Parse()

bool ns3::CommandLine::StringItem::Parse ( const std::string & value) const
overridevirtual

Parse from a string.

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

Implements ns3::CommandLine::Item.

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

Member Data Documentation

◆ m_value

std::string ns3::CommandLine::StringItem::m_value
mutable

The argument value.

Internal: This has to be mutable because the Parse()
function is const in the base class Item.

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


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