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 >
T get (const std::string &key, const T &defaultValue=T()) const
 
template<typename T >
optional< T > getOptional (const std::string &key) const
 
boost::logic::tribool getTribool (const std::string &key) const
 get an optional boolean argument as tribool More...
 

Public Attributes

T elements
 STL member. More...
 
K keys
 STL member. More...
 

Detailed Description

contains named command arguments

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

Member Function Documentation

◆ get()

template<typename T >
T nfd::tools::nfdc::CommandArguments::get ( const std::string &  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 62 of file command-arguments.hpp.

◆ getOptional()

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

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

◆ getTribool()

boost::logic::tribool nfd::tools::nfdc::CommandArguments::getTribool ( const std::string &  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 71 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.