A Discrete-Event Network Simulator
API
Public Member Functions | Public Attributes | List of all members
ns3::CommandLine::UserItem< T > Class Template Reference

An argument Item assigning to POD. More...

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

Public Member Functions

std::string GetDefault () const
 
bool HasDefault () 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

std::string m_default
 String representation of default value. More...
 
T * m_valuePtr
 Pointer to the POD location. 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

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

An argument Item assigning to POD.

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

Member Function Documentation

◆ GetDefault()

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

Reimplemented from ns3::CommandLine::Item.

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

◆ HasDefault()

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

Reimplemented from ns3::CommandLine::Item.

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

◆ Parse()

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

Member Data Documentation

◆ m_default

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

String representation of default value.

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

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

◆ m_valuePtr

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

Pointer to the POD location.

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

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


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