#include <RegisteredHeaders.h>

Collaboration diagram for Http::HeaderLookupTable_t:

Public Member Functions

 HeaderLookupTable_t ()
 
const HeaderTableRecordlookup (const char *buf, const std::size_t len) const
 look record type up by name (C-string and length) More...
 
const HeaderTableRecordlookup (const std::string &key) const
 look record type up by name (std::string) More...
 
const HeaderTableRecordlookup (const SBuf &key) const
 look record type up by name (SBuf) More...
 
const HeaderTableRecordlookup (Http::HdrType id) const
 look record type up by header ID More...
 

Private Member Functions

void initCache ()
 

Private Attributes

std::vector< const HeaderTableRecord * > idCache
 

Static Private Attributes

static const HeaderTableRecord BadHdr {"*INVALID*:", Http::HdrType::BAD_HDR, Http::HdrFieldType::ftInvalid, HdrKind::None}
 used to signal "not found" from lookups More...
 

Detailed Description

Class for looking up registered header definitions

Look up HeaderTableRecord's by name or registered header ID.

Actual records are defined in file RegisteredHeadersHash.gperf, which is compiled using gperf to RegisteredHeadersHash.cci which is then included in RegisteredHeaders.cc.

Definition at line 178 of file RegisteredHeaders.h.

Constructor & Destructor Documentation

◆ HeaderLookupTable_t()

Http::HeaderLookupTable_t::HeaderLookupTable_t ( )

Definition at line 40 of file RegisteredHeaders.cc.

References initCache().

Member Function Documentation

◆ initCache()

void Http::HeaderLookupTable_t::initCache ( )
private

◆ lookup() [1/4]

◆ lookup() [2/4]

const HeaderTableRecord & Http::HeaderLookupTable_t::lookup ( const SBuf key) const
inline

Definition at line 188 of file RegisteredHeaders.h.

References SBuf::length(), lookup(), and SBuf::rawContent().

◆ lookup() [3/4]

const HeaderTableRecord & Http::HeaderLookupTable_t::lookup ( const std::string &  key) const
inline

Definition at line 184 of file RegisteredHeaders.h.

References lookup().

◆ lookup() [4/4]

const HeaderTableRecord & Http::HeaderLookupTable_t::lookup ( Http::HdrType  id) const
inline

Definition at line 192 of file RegisteredHeaders.h.

References idCache.

Member Data Documentation

◆ BadHdr

const HeaderTableRecord Http::HeaderLookupTable_t::BadHdr {"*INVALID*:", Http::HdrType::BAD_HDR, Http::HdrFieldType::ftInvalid, HdrKind::None}
staticprivate

Definition at line 199 of file RegisteredHeaders.h.

Referenced by lookup().

◆ idCache

std::vector<const HeaderTableRecord *> Http::HeaderLookupTable_t::idCache
private

Definition at line 198 of file RegisteredHeaders.h.

Referenced by initCache(), and lookup().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors