#include <UriScheme.h>

Collaboration diagram for AnyP::UriScheme:

Public Types

typedef std::vector< SBufLowercaseSchemeNames
 

Public Member Functions

 UriScheme ()
 
 UriScheme (AnyP::ProtocolType const aScheme, const char *img=nullptr)
 
 UriScheme (const AnyP::UriScheme &o)
 
 UriScheme (AnyP::UriScheme &&)=default
 
 ~UriScheme ()
 
AnyP::UriSchemeoperator= (const AnyP::UriScheme &o)
 
AnyP::UriSchemeoperator= (AnyP::UriScheme &&)=default
 
 operator AnyP::ProtocolType () const
 
bool operator!= (AnyP::ProtocolType const &aProtocol) const
 
SBuf image () const
 
Port defaultPort () const
 

Static Public Member Functions

static void Init ()
 initializes down-cased protocol scheme names array More...
 
static AnyP::ProtocolType FindProtocolType (const SBuf &)
 

Private Attributes

AnyP::ProtocolType theScheme_
 This is a typecode pointer into the enum/registry of protocols handled. More...
 
SBuf image_
 the string representation More...
 

Static Private Attributes

static LowercaseSchemeNames LowercaseSchemeNames_
 

Detailed Description

This class represents a URI Scheme such as http:// https://, wais://, urn: etc. It does not represent the PROTOCOL that such schemes refer to.

Definition at line 31 of file UriScheme.h.

Member Typedef Documentation

◆ LowercaseSchemeNames

Constructor & Destructor Documentation

◆ UriScheme() [1/4]

AnyP::UriScheme::UriScheme ( )
inline

Definition at line 36 of file UriScheme.h.

◆ UriScheme() [2/4]

AnyP::UriScheme::UriScheme ( AnyP::ProtocolType const  aScheme,
const char *  img = nullptr 
)
Parameters
imgExplicit scheme representation for unknown/none schemes.

Definition at line 16 of file UriScheme.cc.

References image_, LowercaseSchemeNames_, AnyP::PROTO_MAX, AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, and theScheme_.

◆ UriScheme() [3/4]

AnyP::UriScheme::UriScheme ( const AnyP::UriScheme o)
inline

Definition at line 39 of file UriScheme.h.

◆ UriScheme() [4/4]

AnyP::UriScheme::UriScheme ( AnyP::UriScheme &&  )
default

◆ ~UriScheme()

AnyP::UriScheme::~UriScheme ( )
inline

Definition at line 41 of file UriScheme.h.

Member Function Documentation

◆ defaultPort()

◆ FindProtocolType()

AnyP::ProtocolType AnyP::UriScheme::FindProtocolType ( const SBuf scheme)
static
Returns
ProtocolType for the given scheme name or PROTO_UNKNOWN

Definition at line 52 of file UriScheme.cc.

References Acl::Init(), SBuf::isEmpty(), AnyP::PROTO_NONE, AnyP::PROTO_UNKNOWN, and SBuf::toLower().

Referenced by uriParseScheme().

◆ image()

◆ Init()

void AnyP::UriScheme::Init ( )
static

Definition at line 38 of file UriScheme.cc.

References AnyP::PROTO_MAX, AnyP::PROTO_NONE, AnyP::ProtocolType_str, and SBuf::toLower().

Referenced by SquidMain().

◆ operator AnyP::ProtocolType()

AnyP::UriScheme::operator AnyP::ProtocolType ( ) const
inline

Definition at line 50 of file UriScheme.h.

References theScheme_.

◆ operator!=()

bool AnyP::UriScheme::operator!= ( AnyP::ProtocolType const &  aProtocol) const
inline

Definition at line 52 of file UriScheme.h.

References theScheme_.

◆ operator=() [1/2]

AnyP::UriScheme & AnyP::UriScheme::operator= ( AnyP::UriScheme &&  )
default

◆ operator=() [2/2]

AnyP::UriScheme & AnyP::UriScheme::operator= ( const AnyP::UriScheme o)
inline

Definition at line 43 of file UriScheme.h.

References image_, and theScheme_.

Member Data Documentation

◆ image_

SBuf AnyP::UriScheme::image_
private

Definition at line 76 of file UriScheme.h.

Referenced by UriScheme(), image(), and operator=().

◆ LowercaseSchemeNames_

AnyP::UriScheme::LowercaseSchemeNames AnyP::UriScheme::LowercaseSchemeNames_
staticprivate

optimization: stores down-cased protocol scheme names, copied from AnyP::ProtocolType_str

Definition at line 70 of file UriScheme.h.

Referenced by UriScheme().

◆ theScheme_

AnyP::ProtocolType AnyP::UriScheme::theScheme_
private

Definition at line 73 of file UriScheme.h.

Referenced by UriScheme(), operator AnyP::ProtocolType(), operator!=(), and operator=().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors