nfd::tools::nfdc::CommandArguments Class Reference

Contains named command arguments. More...

#include <tools/nfdc/command-arguments.hpp>

+ Inheritance diagram for nfd::tools::nfdc::CommandArguments:
+ Collaboration diagram for nfd::tools::nfdc::CommandArguments:

Public Member Functions

template<typename T >
get (std::string_view key, const T &defaultValue=T()) const
 
template<typename T >
std::optional< T > getOptional (std::string_view key) const
 
boost::logic::tribool getTribool (std::string_view key) const
 Get an optional boolean argument as tribool. More...
 

Public Attributes

elements
 STL member. More...
 
keys
 STL member. More...
 

Detailed Description

Contains named command arguments.

Definition at line 46 of file command-arguments.hpp.

Member Function Documentation

◆ get()

template<typename T >
T nfd::tools::nfdc::CommandArguments::get ( std::string_view  key,
const T &  defaultValue = T() 
) const
inline
Returns
the argument value, or a default value if the argument is omitted on command line

Definition at line 63 of file command-arguments.hpp.

◆ getOptional()

template<typename T >
std::optional<T> nfd::tools::nfdc::CommandArguments::getOptional ( std::string_view  key) const
inline
Returns
the argument value, or nullopt if the argument is omitted on command line

Definition at line 53 of file command-arguments.hpp.

◆ getTribool()

boost::logic::tribool nfd::tools::nfdc::CommandArguments::getTribool ( std::string_view  key) const
inline

Get an optional boolean argument as tribool.

Returns
the argument value, or boost::logic::indeterminate if the argument is omitted on command line

Definition at line 72 of file command-arguments.hpp.

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.