proxygen
proxygen::compress::HeaderPiece Class Reference

#include <HeaderPiece.h>

Public Member Functions

 HeaderPiece (const char *inData, uint32_t inLen, bool inOwner, bool inMultiValued)
 
 HeaderPiece (HeaderPiece &&goner) noexcept
 
 ~HeaderPiece ()
 
bool isMultiValued () const
 

Public Attributes

folly::StringPiece str
 

Private Attributes

bool owner
 
bool multiValued
 

Detailed Description

in-place representation of a header name or value

Definition at line 20 of file HeaderPiece.h.

Constructor & Destructor Documentation

proxygen::compress::HeaderPiece::HeaderPiece ( const char *  inData,
uint32_t  inLen,
bool  inOwner,
bool  inMultiValued 
)
inline

Construct a view around the data

Definition at line 25 of file HeaderPiece.h.

29  : str(inData, inLen),
30  owner(inOwner),
31  multiValued(inMultiValued) {}
proxygen::compress::HeaderPiece::HeaderPiece ( HeaderPiece &&  goner)
inlinenoexcept

Definition at line 33 of file HeaderPiece.h.

34  : str(goner.str),
35  owner(goner.owner),
36  multiValued(goner.multiValued){
37  goner.owner = false;
38  }
proxygen::compress::HeaderPiece::~HeaderPiece ( )
inline

Definition at line 40 of file HeaderPiece.h.

References folly::Range< Iter >::data(), owner, and str.

40  {
41  if (owner) {
42  CHECK_NOTNULL(str.data());
43  delete[] str.data();
44  }
45  }
constexpr Iter data() const
Definition: Range.h:446

Member Function Documentation

bool proxygen::compress::HeaderPiece::isMultiValued ( ) const
inline

Definition at line 47 of file HeaderPiece.h.

References multiValued.

Referenced by TEST_F().

47  {
48  return multiValued;
49  }

Member Data Documentation

bool proxygen::compress::HeaderPiece::multiValued
private

Definition at line 56 of file HeaderPiece.h.

Referenced by isMultiValued().

bool proxygen::compress::HeaderPiece::owner
private

Definition at line 55 of file HeaderPiece.h.

Referenced by ~HeaderPiece().

folly::StringPiece proxygen::compress::HeaderPiece::str

Definition at line 52 of file HeaderPiece.h.

Referenced by proxygen::GzipHeaderCodec::parseNameValues(), and ~HeaderPiece().


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