proxygen
proxygen::HPACKHeader Class Reference

#include <HPACKHeader.h>

Public Member Functions

 HPACKHeader ()
 
 HPACKHeader (const HPACKHeaderName &name_, const folly::fbstring &value_)
 
 HPACKHeader (folly::StringPiece name_, folly::StringPiece value_)
 
 HPACKHeader (HPACKHeader &&goner) noexcept
 
HPACKHeaderoperator= (HPACKHeader &&goner) noexcept
 
 ~HPACKHeader ()
 
uint32_t bytes () const
 
bool operator== (const HPACKHeader &other) const
 
bool operator< (const HPACKHeader &other) const
 
bool operator> (const HPACKHeader &other) const
 
HPACKHeader copy () const
 
bool hasValue () const
 

Public Attributes

HPACKHeaderName name
 
folly::fbstring value
 

Static Public Attributes

static const uint32_t kMinLength = 32
 

Detailed Description

Definition at line 20 of file HPACKHeader.h.

Constructor & Destructor Documentation

proxygen::HPACKHeader::HPACKHeader ( )
inline

Definition at line 24 of file HPACKHeader.h.

Referenced by copy().

24 {}
proxygen::HPACKHeader::HPACKHeader ( const HPACKHeaderName name_,
const folly::fbstring value_ 
)
inline

Definition at line 26 of file HPACKHeader.h.

27  :
28  name(name_), value(value_) {}
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83
std::string name_
Definition: gtest.cc:2607
proxygen::HPACKHeader::HPACKHeader ( folly::StringPiece  name_,
folly::StringPiece  value_ 
)
inline

Definition at line 30 of file HPACKHeader.h.

31  :
32  name(name_), value(value_.data(), value_.size()) {}
constexpr size_type size() const
Definition: Range.h:431
constexpr Iter data() const
Definition: Range.h:446
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83
proxygen::HPACKHeader::HPACKHeader ( HPACKHeader &&  goner)
inlinenoexcept

Definition at line 34 of file HPACKHeader.h.

35  : name(std::move(goner.name)),
36  value(std::move(goner.value)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83
proxygen::HPACKHeader::~HPACKHeader ( )
inline

Definition at line 44 of file HPACKHeader.h.

44 {}

Member Function Documentation

uint32_t proxygen::HPACKHeader::bytes ( ) const
inline
bool proxygen::HPACKHeader::hasValue ( ) const
inline

Some header entries don't have a value, see StaticHeaderTable

Definition at line 78 of file HPACKHeader.h.

References folly::basic_fbstring< E, T, A, Storage >::empty(), and value.

Referenced by TEST_F().

78  {
79  return !value.empty();
80  }
bool empty() const
Definition: FBString.h:1372
folly::fbstring value
Definition: HPACKHeader.h:83
bool proxygen::HPACKHeader::operator< ( const HPACKHeader other) const
inline

Definition at line 56 of file HPACKHeader.h.

References name, and value.

56  {
57  bool eqname = (name == other.name);
58  if (!eqname) {
59  return name < other.name;
60  }
61  return value < other.value;
62  }
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83
HPACKHeader& proxygen::HPACKHeader::operator= ( HPACKHeader &&  goner)
inlinenoexcept

Definition at line 38 of file HPACKHeader.h.

References name, folly::f14::swap(), and value.

38  {
39  std::swap(name, goner.name);
40  std::swap(value, goner.value);
41  return *this;
42  }
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83
void swap(SwapTrackingAlloc< T > &, SwapTrackingAlloc< T > &)
Definition: F14TestUtil.h:414
bool proxygen::HPACKHeader::operator== ( const HPACKHeader other) const
inline

Definition at line 53 of file HPACKHeader.h.

References name, and value.

53  {
54  return name == other.name && value == other.value;
55  }
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83
bool proxygen::HPACKHeader::operator> ( const HPACKHeader other) const
inline

Definition at line 63 of file HPACKHeader.h.

References name, and value.

63  {
64  bool eqname = (name == other.name);
65  if (!eqname) {
66  return name > other.name;
67  }
68  return value > other.value;
69  }
HPACKHeaderName name
Definition: HPACKHeader.h:82
folly::fbstring value
Definition: HPACKHeader.h:83

Member Data Documentation

const uint32_t proxygen::HPACKHeader::kMinLength = 32
static

Definition at line 22 of file HPACKHeader.h.


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