Molybden API
Loading...
Searching...
No Matches
molybden::ProxyConfig Class Referenceabstract

An interface that all proxy config implementations must extend. More...

#include <proxy_config.hpp>

Inheritance diagram for molybden::ProxyConfig:
molybden::AutoDetectProxyConfig molybden::CustomProxyConfig molybden::DirectProxyConfig molybden::PacProxyConfig molybden::SystemProxyConfig

Public Member Functions

template<class S >
std::shared_ptr< S > as ()
 Casts this proxy configuration to the target type.
 

Protected Member Functions

virtual ProxyConfigType type () const =0
 Returns the current proxy config type.
 

Detailed Description

An interface that all proxy config implementations must extend.

Member Function Documentation

◆ as()

template<class S >
std::shared_ptr< S > molybden::ProxyConfig::as ( )

Casts this proxy configuration to the target type.

Returns an empty std::shared_ptr if this proxy configuration is not of the given target type. For example:

if (auto url_proxy_config = proxy_config->As<UrlProxyConfig>()) {
const std::string& pac_url = url_proxy_config->PacUrl();
}
Template Parameters
Sthe target type that must be the ProxyConfig subclass.

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