proxygen
|
#include <StructuredHeadersBuffer.h>
Public Member Functions | |
StructuredHeadersBuffer (const std::string &s) | |
StructuredHeaders::DecodeError | parseIdentifier (StructuredHeaderItem &result) |
StructuredHeaders::DecodeError | parseIdentifier (std::string &result) |
StructuredHeaders::DecodeError | parseItem (StructuredHeaderItem &result) |
DecodeError | removeSymbol (const std::string &symbol, bool strict) |
DecodeError | removeOptionalWhitespace () |
bool | isEmpty () |
DecodeError | handleDecodeError (const DecodeError &err) |
Private Member Functions | |
DecodeError | parseBinaryContent (StructuredHeaderItem &result) |
DecodeError | parseNumber (StructuredHeaderItem &result) |
DecodeError | parseString (StructuredHeaderItem &result) |
DecodeError | parseInteger (const std::string &input, StructuredHeaderItem &result) |
DecodeError | parseFloat (const std::string &input, StructuredHeaderItem &result) |
char | peek () |
void | advanceCursor () |
int32_t | getNumCharsParsed () |
Private Attributes | |
folly::StringPiece | content_ |
folly::StringPiece | originalContent_ |
Definition at line 20 of file StructuredHeadersBuffer.h.
|
inlineexplicit |
Definition at line 23 of file StructuredHeadersBuffer.h.
References int32_t, folly::gen::isEmpty, and string.
|
private |
Definition at line 281 of file StructuredHeadersBuffer.cpp.
|
private |
Definition at line 289 of file StructuredHeadersBuffer.cpp.
DecodeError proxygen::StructuredHeadersBuffer::handleDecodeError | ( | const DecodeError & | err | ) |
Definition at line 269 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::decodeErrorDescription, and proxygen::ERROR.
bool proxygen::StructuredHeadersBuffer::isEmpty | ( | ) |
Definition at line 285 of file StructuredHeadersBuffer.cpp.
|
private |
Definition at line 97 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::BINARYCONTENT, current, proxygen::StructuredHeaders::decodeBase64(), proxygen::StructuredHeaders::encodeBase64(), proxygen::StructuredHeaders::INVALID_CHARACTER, folly::gen::isEmpty, proxygen::StructuredHeaders::isValidEncodedBinaryContent(), proxygen::StructuredHeaders::isValidEncodedBinaryContentChar(), folly::gen::move, proxygen::StructuredHeaders::OK, string, proxygen::StructuredHeaders::StructuredHeaderItem::tag, proxygen::StructuredHeaders::UNDECODEABLE_BINARY_CONTENT, proxygen::StructuredHeaders::UNEXPECTED_END_OF_BUFFER, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
|
private |
Definition at line 191 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::DOUBLE, proxygen::StructuredHeaders::OK, proxygen::StructuredHeaders::StructuredHeaderItem::tag, proxygen::StructuredHeaders::UNPARSEABLE_NUMERIC_TYPE, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
DecodeError proxygen::StructuredHeadersBuffer::parseIdentifier | ( | StructuredHeaderItem & | result | ) |
Definition at line 139 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::IDENTIFIER, proxygen::StructuredHeaders::OK, string, proxygen::StructuredHeaders::StructuredHeaderItem::tag, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
Referenced by proxygen::TEST_F().
DecodeError proxygen::StructuredHeadersBuffer::parseIdentifier | ( | std::string & | result | ) |
Definition at line 155 of file StructuredHeadersBuffer.cpp.
References current, proxygen::StructuredHeaders::INVALID_CHARACTER, folly::gen::isEmpty, proxygen::StructuredHeaders::isLcAlpha(), proxygen::StructuredHeaders::isValidIdentifierChar(), proxygen::StructuredHeaders::OK, and proxygen::StructuredHeaders::UNEXPECTED_END_OF_BUFFER.
|
private |
Definition at line 179 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::StructuredHeaderItem::INT64, int64_t, proxygen::StructuredHeaders::OK, proxygen::StructuredHeaders::StructuredHeaderItem::tag, proxygen::StructuredHeaders::UNPARSEABLE_NUMERIC_TYPE, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
DecodeError proxygen::StructuredHeadersBuffer::parseItem | ( | StructuredHeaderItem & | result | ) |
Definition at line 19 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::INVALID_CHARACTER, folly::gen::isEmpty, and proxygen::StructuredHeaders::UNEXPECTED_END_OF_BUFFER.
Referenced by proxygen::TEST_F().
|
private |
Definition at line 39 of file StructuredHeadersBuffer.cpp.
References current, proxygen::StructuredHeaders::StructuredHeaderItem::DOUBLE, proxygen::StructuredHeaders::StructuredHeaderItem::INT64, proxygen::StructuredHeaders::INVALID_CHARACTER, folly::gen::isEmpty, proxygen::StructuredHeaders::kMaxValidFloatLength, proxygen::StructuredHeaders::kMaxValidIntegerLength, proxygen::StructuredHeaders::OK, string, type, proxygen::StructuredHeaders::UNEXPECTED_END_OF_BUFFER, and proxygen::StructuredHeaders::VALUE_TOO_LONG.
|
private |
Definition at line 203 of file StructuredHeadersBuffer.cpp.
References current, proxygen::StructuredHeaders::INVALID_CHARACTER, folly::gen::isEmpty, proxygen::StructuredHeaders::isValidStringChar(), proxygen::StructuredHeaders::OK, proxygen::StructuredHeaders::StructuredHeaderItem::STRING, string, proxygen::StructuredHeaders::StructuredHeaderItem::tag, proxygen::StructuredHeaders::UNEXPECTED_END_OF_BUFFER, and proxygen::StructuredHeaders::StructuredHeaderItem::value.
|
private |
Definition at line 277 of file StructuredHeadersBuffer.cpp.
DecodeError proxygen::StructuredHeadersBuffer::removeOptionalWhitespace | ( | ) |
Definition at line 247 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::OK.
DecodeError proxygen::StructuredHeadersBuffer::removeSymbol | ( | const std::string & | symbol, |
bool | strict | ||
) |
Definition at line 254 of file StructuredHeadersBuffer.cpp.
References proxygen::StructuredHeaders::INVALID_CHARACTER, and proxygen::StructuredHeaders::OK.
Referenced by proxygen::TEST_F().
|
private |
Definition at line 67 of file StructuredHeadersBuffer.h.
|
private |
Definition at line 68 of file StructuredHeadersBuffer.h.