A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::CommandLine::UserItem< T > Class Template Reference

An argument Item assigning to POD. More...

+ Inheritance diagram for ns3::CommandLine::UserItem< T >:
+ Collaboration diagram for ns3::CommandLine::UserItem< T >:

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_default
 String representation of default value.
 
T * m_valuePtr
 Pointer to the POD location.
 
- Public Attributes inherited from ns3::CommandLine::Item
std::string m_help
 Argument help string.
 
std::string m_name
 Argument label: --m_name=...
 

Detailed Description

template<typename T>
class ns3::CommandLine::UserItem< T >

An argument Item assigning to POD.

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

Member Function Documentation

◆ GetDefault()

template<typename T >
std::string ns3::CommandLine::UserItem< T >::GetDefault ( ) const
overridevirtual
Returns
The default value

Implements ns3::CommandLine::Item.

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

References ns3::CommandLineHelper::GetDefault().

+ Here is the call graph for this function:

◆ HasDefault()

template<typename T >
bool ns3::CommandLine::UserItem< T >::HasDefault ( ) const
overridevirtual
Returns
true if this item has a default value.

Reimplemented from ns3::CommandLine::Item.

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

◆ Parse()

template<typename T >
bool ns3::CommandLine::UserItem< T >::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 789 of file command-line.h.

References ns3::CommandLineHelper::UserItemParse().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_default

template<typename T >
std::string ns3::CommandLine::UserItem< T >::m_default

String representation of default value.

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

◆ m_valuePtr

template<typename T >
T* ns3::CommandLine::UserItem< T >::m_valuePtr

Pointer to the POD location.

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


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