SNode.C
Loading...
Searching...
No Matches
net::in::config::ConfigAddressReverse< ConfigAddressTypeT > Class Template Reference

#include <ConfigAddress.h>

Inheritance diagram for net::in::config::ConfigAddressReverse< ConfigAddressTypeT >:
Collaboration diagram for net::in::config::ConfigAddressReverse< ConfigAddressTypeT >:

Public Member Functions

SocketAddress getSocketAddress (const SocketAddress::SockAddr &sockAddr, SocketAddress::SockLen sockAddrLen)
ConfigAddressReversesetNumericReverse (bool numeric=true)
bool getNumericReverse () const
Public Member Functions inherited from net::config::ConfigSection
template<typename T>
 ConfigSection (ConfigInstance *instance, T *sectionPtr, const std::string &group="Sections")
 ~ConfigSection () override
 ConfigSection (const ConfigSection &)=delete
 ConfigSection (ConfigSection &&)=delete
ConfigSectionoperator= (const ConfigSection &)=delete
Public Member Functions inherited from utils::SubCommand
 SubCommand (const SubCommand &)=delete
 SubCommand (SubCommand &&)=delete
SubCommandoperator= (const SubCommand &)=delete
SubCommandoperator= (SubCommand &&)=delete
virtual ~SubCommand ()
std::string getName () const
std::string version () const
CLI::Option * setConfig (const std::string &defaultConfigFile) const
CLI::Option * setLogFile (const std::string &defaultLogFile) const
CLI::Option * setVersionFlag (const std::string &version) const
bool hasParent () const
SubCommandgetParent () const
SubCommandallowExtras (bool allow=true)
SubCommandrequired (bool required=true, bool force=true)
SubCommandrequired (SubCommand *subCommand, bool required=true)
SubCommandrequired (CLI::Option *option, bool required=true)
bool getRequired () const
SubCommandneeds (SubCommand *subCommand, bool needs=true)
SubCommanddisabled (SubCommand *subCommand, bool disabled=true)
SubCommandsetRequireCallback (const std::function< void(void)> &callback)
SubCommandfinalCallback (const std::function< void()> &finalCallback)
std::string configToStr () const
std::string help (const CLI::App *helpApp, const CLI::AppFormatMode &mode) const
template<typename NewSubCommand, typename... Args>
NewSubCommand * newSubCommand (Args &&... args)
template<typename RequestedSubCommand>
RequestedSubCommand * getSubCommand ()
template<typename RequestedSubCommand>
RequestedSubCommand * getSubCommand () const
CLI::Option * getOption (const std::string &name) const
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const
template<typename ValueTypeT>
CLI::Option * addOption (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const
template<typename ValueTypeT>
CLI::Option * addOptionVariable (const std::string &name, ValueTypeT &variable, const std::string &description, const std::string &typeName, const CLI::Validator &additionalValidator) const
template<typename ValueTypeT>
CLI::Option * addOptionVariable (const std::string &name, ValueTypeT &variable, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &additionalValidator) const
CLI::Option * addOptionFunction (const std::string &name, const std::function< void(const std::string &)> &callback, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const
template<typename ValueTypeT>
CLI::Option * addOptionFunction (const std::string &name, const std::function< void(const std::string &)> &callback, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const
template<typename ValueTypeT>
CLI::Option * addFlag (const std::string &name, const std::string &description, const std::string &typeName, ValueTypeT defaultValue, const CLI::Validator &validator) const
CLI::Option * addFlagFunction (const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const
CLI::Option * addFlagFunction (const std::string &name, const std::function< void()> &callback, const std::string &description, const std::string &typeName, const std::string &defaultValue, const CLI::Validator &validator) const

Protected Member Functions

 ConfigAddressReverse (net::config::ConfigInstance *instance, const std::string &addressOptionName, const std::string &addressOptionDescription)
Protected Member Functions inherited from utils::SubCommand
 SubCommand (SubCommand *parent, std::shared_ptr< utils::AppWithPtr > appWithPtr, const std::string &group, bool final)
template<typename ConcretSubCommand>
 SubCommand (SubCommand *parent, ConcretSubCommand *concretSubCommand, const std::string &group, bool final=true)
void parse (int argc, char *argv[]) const
SubCommanddescription (const std::string &description)
SubCommandfooter (const std::string &footer)
void removeSubCommand ()
template<typename ValueTypeT>
CLI::Option * setDefaultValue (CLI::Option *option, const ValueTypeT &value, bool clear=true) const
CLI::Option * setConfigurable (CLI::Option *option, bool configurable) const

Private Types

using Super = ConfigAddressTypeT<SocketAddress>

Private Attributes

CLI::Option * numericReverseOpt = nullptr

Additional Inherited Members

Static Protected Member Functions inherited from utils::SubCommand
static CLI::App * getHelpTriggerApp ()
static CLI::App * getShowConfigTriggerApp ()
static CLI::App * getCommandlineTriggerApp ()
Static Protected Attributes inherited from utils::SubCommand
static std::shared_ptr< CLI::Formatter > sectionFormatter = makeSectionFormatter()
static std::map< std::string, std::string > aliases
static CLI::App * helpTriggerApp = nullptr
static CLI::App * showConfigTriggerApp = nullptr
static CLI::App * commandlineTriggerApp = nullptr

Detailed Description

template<template< typename SocketAddressT > typename ConfigAddressTypeT>
class net::in::config::ConfigAddressReverse< ConfigAddressTypeT >

Definition at line 64 of file ConfigAddress.h.

Member Typedef Documentation

◆ Super

template<template< typename SocketAddressT > typename ConfigAddressTypeT>
using net::in::config::ConfigAddressReverse< ConfigAddressTypeT >::Super = ConfigAddressTypeT<SocketAddress>
private

Definition at line 68 of file ConfigAddress.h.

Constructor & Destructor Documentation

◆ ConfigAddressReverse()

template<template< typename SocketAddress > typename ConfigAddressType>
net::in::config::ConfigAddressReverse< ConfigAddressType >::ConfigAddressReverse ( net::config::ConfigInstance * instance,
const std::string & addressOptionName,
const std::string & addressOptionDescription )
protected

Definition at line 65 of file ConfigAddress.cpp.

68 : ConfigSection(instance, this)
71 "--numeric-reverse{true}",
72 "Suppress reverse host name lookup",
73 "bool",
75 CLI::IsMember({"true", "false"}));
76 }
#define XSTR(s)
ConfigSection(ConfigInstance *instance, T *sectionPtr, const std::string &group="Sections")
CLI::Option * addFlag(const std::string &name, const std::string &description, const std::string &typeName, const CLI::Validator &validator) const

References numericReverseOpt.

Member Function Documentation

◆ getNumericReverse()

template<template< typename SocketAddress > typename ConfigAddressType>
bool net::in::config::ConfigAddressReverse< ConfigAddressType >::getNumericReverse ( ) const

Definition at line 86 of file ConfigAddress.cpp.

86 {
87 return numericReverseOpt->as<bool>();
88 }

References numericReverseOpt.

◆ getSocketAddress()

template<template< typename SocketAddress > typename ConfigAddressType>
SocketAddress net::in::config::ConfigAddressReverse< ConfigAddressType >::getSocketAddress ( const SocketAddress::SockAddr & sockAddr,
SocketAddress::SockLen sockAddrLen )

Definition at line 91 of file ConfigAddress.cpp.

◆ setNumericReverse()

template<template< typename SocketAddress > typename ConfigAddressType>
ConfigAddressReverse< ConfigAddressType > & net::in::config::ConfigAddressReverse< ConfigAddressType >::setNumericReverse ( bool numeric = true)

Definition at line 79 of file ConfigAddress.cpp.

79 {
80 setDefaultValue(numericReverseOpt, numeric ? "true" : "false");
81
82 return *this;
83 }
CLI::Option * setDefaultValue(CLI::Option *option, const ValueTypeT &value, bool clear=true) const
Definition SubCommand.h:347

Member Data Documentation

◆ numericReverseOpt

template<template< typename SocketAddressT > typename ConfigAddressTypeT>
CLI::Option* net::in::config::ConfigAddressReverse< ConfigAddressTypeT >::numericReverseOpt = nullptr
private

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