a swap metadata field inside the buffer given to SwapMetaUnpacker More...
#include <SwapMetaView.h>
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 | |
SwapMetaView & | operator= (const SwapMetaView &)=default |
SwapMetaView & | operator= (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]
|
privatedefault |
◆ SwapMetaView() [2/4]
|
privatedefault |
◆ SwapMetaView() [3/4]
|
privatedefault |
◆ SwapMetaView() [4/4]
|
explicitprivate |
positions the view at the first swap meta field in the given buffer
- Parameters
-
begin is where the buffer and the field starts end is 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]
|
privatedefault |
◆ operator=() [2/2]
|
privatedefault |
Friends And Related Function Documentation
◆ 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:
- src/store/SwapMetaView.h
- src/store/SwapMetaView.cc