a swap metadata field inside the buffer given to SwapMetaUnpacker More...

#include <SwapMetaView.h>

Collaboration diagram for Store::SwapMetaView:

Public Member Functions

void checkExpectedLength (size_t) const
 ensures that our fixed-size field value has the given expected length More...
 

Public Attributes

const void * rawValue = nullptr
 
size_t rawLength = 0
 
RawSwapMetaType rawType = RawSwapMetaTypeBottom
 
SwapMetaType type = STORE_META_VOID
 

Private Member Functions

 SwapMetaView ()=default
 
 SwapMetaView (const SwapMetaView &)=default
 
 SwapMetaView (SwapMetaView &&)=default
 
SwapMetaViewoperator= (const SwapMetaView &)=default
 
SwapMetaViewoperator= (SwapMetaView &&)=default
 
 SwapMetaView (const void *begin, const void *const end)
 

Friends

class SwapMetaIterator
 

Detailed Description

Definition at line 20 of file SwapMetaView.h.

Constructor & Destructor Documentation

◆ SwapMetaView() [1/4]

Store::SwapMetaView::SwapMetaView ( )
privatedefault

◆ SwapMetaView() [2/4]

Store::SwapMetaView::SwapMetaView ( const SwapMetaView )
privatedefault

◆ SwapMetaView() [3/4]

Store::SwapMetaView::SwapMetaView ( SwapMetaView &&  )
privatedefault

◆ SwapMetaView() [4/4]

Store::SwapMetaView::SwapMetaView ( const void *  begin,
const void *const  end 
)
explicitprivate

positions the view at the first swap meta field in the given buffer

Parameters
beginis where the buffer and the field starts
endis where the buffer (but not necessarily the field) finishes

Definition at line 57 of file SwapMetaView.cc.

References assert, Store::HandleBadRawType(), Here, Store::HonoredSwapMetaType(), rawLength, rawType, rawValue, Store::SwapMetaExtract(), Store::SwapMetaFieldValueLengthMax, and type.

Member Function Documentation

◆ checkExpectedLength()

void Store::SwapMetaView::checkExpectedLength ( size_t  expectedLength) const

Definition at line 83 of file SwapMetaView.cc.

References Here, and ToSBuf().

Referenced by Store::CheckSwapMetaKey(), and Store::UnpackSwapMetaKey().

◆ operator=() [1/2]

SwapMetaView & Store::SwapMetaView::operator= ( const SwapMetaView )
privatedefault

◆ operator=() [2/2]

SwapMetaView & Store::SwapMetaView::operator= ( SwapMetaView &&  )
privatedefault

Friends And Related Function Documentation

◆ SwapMetaIterator

friend class SwapMetaIterator
friend

Definition at line 50 of file SwapMetaView.h.

Member Data Documentation

◆ rawLength

size_t Store::SwapMetaView::rawLength = 0

The number of bytes in rawValue (i.e. L in swap meta TLV field). This length may not match the length of valid fields of this type. Not meaningful when type is STORE_META_VOID.

Definition at line 35 of file SwapMetaView.h.

Referenced by SwapMetaView(), Store::CheckSwapMetaUrl(), Store::operator<<(), and Store::UnpackNewSwapMetaVaryHeaders().

◆ rawType

RawSwapMetaType Store::SwapMetaView::rawType = RawSwapMetaTypeBottom

The serialized type (i.e. T in swap meta TLV field). This type value may not match any named by SwapMetaType.

Definition at line 39 of file SwapMetaView.h.

Referenced by SwapMetaView(), and Store::operator<<().

◆ rawValue

const void* Store::SwapMetaView::rawValue = nullptr

A serialized rawLength-byte value (i.e. V in swap meta TLV field). The value contents may be completely malformed/bogus. Not meaningful when type is STORE_META_VOID.

Definition at line 30 of file SwapMetaView.h.

Referenced by SwapMetaView(), Store::CheckSwapMetaKey(), Store::CheckSwapMetaUrl(), Store::operator<<(), Store::UnpackNewSwapMetaVaryHeaders(), and Store::UnpackSwapMetaKey().

◆ type

SwapMetaType Store::SwapMetaView::type = STORE_META_VOID

The sanitized TLV type that always matches one named by SwapMetaType: rawType (if matches a value named by SwapMetaType) or STORE_META_VOID.

Definition at line 43 of file SwapMetaView.h.

Referenced by SwapMetaView(), Store::CheckSwapMetaKey(), Store::CheckSwapMetaUrl(), Store::UnpackNewSwapMetaVaryHeaders(), and Store::UnpackSwapMetaKey().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors