|
proxygen
|
#include <Cursor.h>
Public Member Functions | |
| RWCursor (IOBuf *buf) | |
| template<class OtherDerived , class OtherBuf > | |
| RWCursor (const detail::CursorBase< OtherDerived, OtherBuf > &cursor) | |
| void | gather (size_t n) |
| void | gatherAtMost (size_t n) |
| size_t | pushAtMost (const uint8_t *buf, size_t len) |
| void | insert (std::unique_ptr< folly::IOBuf > buf) |
| uint8_t * | writableData () |
Public Member Functions inherited from folly::io::detail::CursorBase< RWCursor< access >, IOBuf > | |
| CursorBase (IOBuf *buf) | |
| CursorBase (const CursorBase< OtherDerived, OtherBuf > &cursor) | |
| void | reset (IOBuf *buf) |
| size_t | getCurrentPosition () const |
| const uint8_t * | data () const |
| size_t | length () const |
| size_t | totalLength () const |
| bool | canAdvance (size_t amount) const |
| bool | isAtEnd () const |
| void | advanceToEnd () |
| RWCursor< access > & | operator+= (size_t offset) |
| RWCursor< access > | operator+ (size_t offset) const |
| RWCursor< access > & | operator-= (size_t offset) |
| RWCursor< access > | operator- (size_t offset) const |
| size_t | operator- (const CursorBase &other) const |
| size_t | operator- (const IOBuf *buf) const |
| bool | operator== (const RWCursor< access > &other) const |
| bool | operator!= (const RWCursor< access > &other) const |
| std::enable_if< std::is_arithmetic< T >::value, bool >::type | tryRead (T &val) |
| bool | tryReadBE (T &val) |
| bool | tryReadLE (T &val) |
| T | read () |
| T | readBE () |
| T | readLE () |
| std::string | readFixedString (size_t len) |
| std::string | readTerminatedString (char termChar= '\0', size_t maxLength=std::numeric_limits< size_t >::max()) |
| std::string | readWhile (const Predicate &predicate) |
| void | readWhile (const Predicate &predicate, Output &out) |
| void | skipWhile (const Predicate &predicate) |
| size_t | skipAtMost (size_t len) |
| void | skip (size_t len) |
| void | skipNoAdvance (size_t len) |
| size_t | retreatAtMost (size_t len) |
| void | retreat (size_t len) |
| size_t | pullAtMost (void *buf, size_t len) |
| void | pull (void *buf, size_t len) |
| ByteRange | peekBytes () |
| std::pair< const uint8_t *, size_t > | peek () |
| void | clone (std::unique_ptr< folly::IOBuf > &buf, size_t len) |
| void | clone (folly::IOBuf &buf, size_t len) |
| size_t | cloneAtMost (folly::IOBuf &buf, size_t len) |
| size_t | cloneAtMost (std::unique_ptr< folly::IOBuf > &buf, size_t len) |
Public Member Functions inherited from folly::io::detail::Writable< RWCursor< access > > | |
| std::enable_if< std::is_arithmetic< T >::value >::type | write (T value) |
| void | writeBE (T value) |
| void | writeLE (T value) |
| void | push (const uint8_t *buf, size_t len) |
| void | push (ByteRange buf) |
| void | push (Cursor cursor, size_t len) |
| size_t | pushAtMost (ByteRange buf) |
| size_t | pushAtMost (Cursor cursor, size_t len) |
Private Member Functions | |
| void | maybeUnshare () |
| void | advanceDone () |
Private Attributes | |
| bool | maybeShared_ |
Friends | |
| class | detail::CursorBase< RWCursor< access >, IOBuf > |
Additional Inherited Members | |
Protected Member Functions inherited from folly::io::detail::CursorBase< RWCursor< access >, IOBuf > | |
| void | dcheckIntegrity () const |
| ~CursorBase () | |
| IOBuf * | head () |
| bool | tryAdvanceBuffer () |
| bool | tryRetreatBuffer () |
| void | advanceBufferIfEmpty () |
Protected Attributes inherited from folly::io::detail::CursorBase< RWCursor< access >, IOBuf > | |
| IOBuf * | crtBuf_ |
| IOBuf * | buffer_ |
| const uint8_t * | crtBegin_ |
| const uint8_t * | crtEnd_ |
| const uint8_t * | crtPos_ |
| size_t | absolutePos_ |
|
inlineexplicit |
|
inlineexplicit |
|
inlineprivate |
|
inline |
Gather at least n bytes contiguously into the current buffer, by coalescing subsequent buffers from the chain as necessary.
Definition at line 831 of file Cursor.h.
References folly::io::detail::CursorBase< Derived, BufType >::crtBegin_, folly::io::detail::CursorBase< Derived, BufType >::crtBuf_, folly::io::detail::CursorBase< Derived, BufType >::crtEnd_, folly::io::detail::CursorBase< Derived, BufType >::crtPos_, folly::io::detail::CursorBase< Derived, BufType >::head(), and folly::io::detail::CursorBase< Derived, BufType >::totalLength().
Referenced by TEST().
|
inline |
Definition at line 849 of file Cursor.h.
References folly::io::detail::CursorBase< Derived, BufType >::crtBegin_, folly::io::detail::CursorBase< Derived, BufType >::crtBuf_, folly::io::detail::CursorBase< Derived, BufType >::crtEnd_, folly::io::detail::CursorBase< Derived, BufType >::crtPos_, folly::io::detail::CursorBase< Derived, BufType >::dcheckIntegrity(), min, folly::size(), and folly::io::detail::CursorBase< Derived, BufType >::totalLength().
|
inline |
Definition at line 895 of file Cursor.h.
References folly::io::detail::CursorBase< Derived, BufType >::absolutePos_, folly::io::detail::CursorBase< Derived, BufType >::buffer_, folly::IOBuf::computeChainDataLength(), folly::io::detail::CursorBase< Derived, BufType >::crtBegin_, folly::io::detail::CursorBase< Derived, BufType >::crtBuf_, folly::io::detail::CursorBase< Derived, BufType >::crtEnd_, folly::io::detail::CursorBase< Derived, BufType >::crtPos_, folly::io::detail::CursorBase< Derived, BufType >::dcheckIntegrity(), folly::io::detail::CursorBase< Derived, BufType >::length(), folly::gen::move, folly::IOBuf::prependChain(), and folly::IOBuf::trimStart().
|
inlineprivate |
Definition at line 940 of file Cursor.h.
References folly::io::detail::CursorBase< Derived, BufType >::crtBegin_, folly::io::detail::CursorBase< Derived, BufType >::crtBuf_, folly::io::detail::CursorBase< Derived, BufType >::crtEnd_, folly::io::detail::CursorBase< Derived, BufType >::crtPos_, and UNLIKELY.
|
inline |
Definition at line 860 of file Cursor.h.
References folly::io::detail::CursorBase< Derived, BufType >::crtPos_, folly::io::detail::CursorBase< Derived, BufType >::length(), LIKELY, folly::io::detail::CursorBase< Derived, BufType >::tryAdvanceBuffer(), UNLIKELY, and folly::io::UNSHARE.
|
inline |
Definition at line 934 of file Cursor.h.
References folly::io::detail::CursorBase< Derived, BufType >::crtBegin_, folly::io::detail::CursorBase< Derived, BufType >::crtBuf_, folly::io::detail::CursorBase< Derived, BufType >::crtPos_, and folly::io::detail::CursorBase< Derived, BufType >::dcheckIntegrity().
Referenced by fizz::transformBufferBlocks().
|
friend |
|
private |