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

#include <ConfigAddress.h>

Inheritance diagram for net::un::config::ConfigAddress< ConfigAddressTypeT >:
Collaboration diagram for net::un::config::ConfigAddress< ConfigAddressTypeT >:

Public Member Functions

ConfigAddresssetSocketAddress (const SocketAddress &socketAddress)
ConfigAddresssetSunPath (const std::string &sunPath)
std::string getSunPath () const

Protected Member Functions

 ConfigAddress (net::config::ConfigInstance *instance, const std::string &addressOptionName, const std::string &addressOptionDescription)
ConfigAddresssunPathRequired (bool required=true)

Private Types

using Super = ConfigAddressTypeT<net::un::SocketAddress>

Private Member Functions

SocketAddressinit () final

Private Attributes

CLI::Option * sunPathOpt = nullptr

Detailed Description

template<template< typename SocketAddressT > typename ConfigAddressTypeT>
class net::un::config::ConfigAddress< ConfigAddressTypeT >

Definition at line 76 of file ConfigAddress.h.

Member Typedef Documentation

◆ Super

template<template< typename SocketAddressT > typename ConfigAddressTypeT>
using net::un::config::ConfigAddress< ConfigAddressTypeT >::Super = ConfigAddressTypeT<net::un::SocketAddress>
private

Definition at line 78 of file ConfigAddress.h.

Constructor & Destructor Documentation

◆ ConfigAddress()

template<template< typename SocketAddress > typename ConfigAddressType>
net::un::config::ConfigAddress< ConfigAddressType >::ConfigAddress ( net::config::ConfigInstance * instance,
const std::string & addressOptionName,
const std::string & addressOptionDescription )
explicitprotected

Definition at line 62 of file ConfigAddress.cpp.

67 "--sun-path",
68 "Unix domain bind path",
69 "filename:FILE",
70 std::string('\0' + instance->getInstanceName() + std::to_string(getpid()) + "_" + utils::Uuid::getUuid()));
71 }
ConfigAddressTypeT< net::un::SocketAddress > Super

References net::config::ConfigInstance::getInstanceName(), utils::Uuid::getUuid(), and sunPathOpt.

Here is the call graph for this function:

Member Function Documentation

◆ getSunPath()

template<template< typename SocketAddress > typename ConfigAddressType>
std::string net::un::config::ConfigAddress< ConfigAddressType >::getSunPath ( ) const

Definition at line 109 of file ConfigAddress.cpp.

109 {
110 return sunPathOpt->as<std::string>();
111 }

References sunPathOpt.

◆ init()

template<template< typename SocketAddress > typename ConfigAddressType>
SocketAddress * net::un::config::ConfigAddress< ConfigAddressType >::init ( )
finalprivate

Definition at line 74 of file ConfigAddress.cpp.

74 {
76
77 try {
80 delete socketAddress;
81 socketAddress = nullptr;
82
83 throw;
84 }
85
86 return socketAddress;
87 }
SocketAddress * init() final

References net::un::SocketAddress::init(), net::un::SocketAddress::SocketAddress(), and sunPathOpt.

Here is the call graph for this function:

◆ setSocketAddress()

template<template< typename SocketAddress > typename ConfigAddressType>
ConfigAddress< ConfigAddressType > & net::un::config::ConfigAddress< ConfigAddressType >::setSocketAddress ( const SocketAddress & socketAddress)

Definition at line 90 of file ConfigAddress.cpp.

90 {
92
93 return *this;
94 }
ConfigAddress & setSunPath(const std::string &sunPath)

◆ setSunPath()

template<template< typename SocketAddress > typename ConfigAddressType>
ConfigAddress< ConfigAddressType > & net::un::config::ConfigAddress< ConfigAddressType >::setSunPath ( const std::string & sunPath)

Definition at line 97 of file ConfigAddress.cpp.

97 {
99
100 sunPathOpt //
101 ->default_val(sunPath)
102 ->clear();
104
105 return *this;
106 }

References sunPathOpt.

◆ sunPathRequired()

template<template< typename SocketAddress > typename ConfigAddressType>
ConfigAddress< ConfigAddressType > & net::un::config::ConfigAddress< ConfigAddressType >::sunPathRequired ( bool required = true)
protected

Definition at line 114 of file ConfigAddress.cpp.

114 {
116
117 return *this;
118 }

References sunPathOpt.

Referenced by net::un::stream::config::ConfigSocketClient::ConfigSocketClient(), and net::un::stream::config::ConfigSocketServer::ConfigSocketServer().

Here is the caller graph for this function:

Member Data Documentation

◆ sunPathOpt

template<template< typename SocketAddressT > typename ConfigAddressTypeT>
CLI::Option* net::un::config::ConfigAddress< ConfigAddressTypeT >::sunPathOpt = nullptr
private

Definition at line 98 of file ConfigAddress.h.

Referenced by ConfigAddress(), getSunPath(), init(), setSunPath(), and sunPathRequired().


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