proxygen
folly::io::Cursor Class Reference

#include <Cursor.h>

Inheritance diagram for folly::io::Cursor:
folly::io::detail::CursorBase< Cursor, const IOBuf >

Public Member Functions

 Cursor (const IOBuf *buf)
 
template<class OtherDerived , class OtherBuf >
 Cursor (const detail::CursorBase< OtherDerived, OtherBuf > &cursor)
 
- Public Member Functions inherited from folly::io::detail::CursorBase< Cursor, const IOBuf >
 CursorBase (const IOBuf *buf)
 
 CursorBase (const CursorBase< OtherDerived, OtherBuf > &cursor)
 
void reset (const IOBuf *buf)
 
size_t getCurrentPosition () const
 
const uint8_tdata () const
 
size_t length () const
 
size_t totalLength () const
 
bool canAdvance (size_t amount) const
 
bool isAtEnd () const
 
void advanceToEnd ()
 
Cursoroperator+= (size_t offset)
 
Cursor operator+ (size_t offset) const
 
Cursoroperator-= (size_t offset)
 
Cursor operator- (size_t offset) const
 
size_t operator- (const CursorBase &other) const
 
size_t operator- (const const IOBuf *buf) const
 
bool operator== (const Cursor &other) const
 
bool operator!= (const Cursor &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)
 

Additional Inherited Members

- Protected Member Functions inherited from folly::io::detail::CursorBase< Cursor, const IOBuf >
void dcheckIntegrity () const
 
 ~CursorBase ()
 
const IOBufhead ()
 
bool tryAdvanceBuffer ()
 
bool tryRetreatBuffer ()
 
void advanceBufferIfEmpty ()
 
- Protected Attributes inherited from folly::io::detail::CursorBase< Cursor, const IOBuf >
const IOBufcrtBuf_
 
const IOBufbuffer_
 
const uint8_tcrtBegin_
 
const uint8_tcrtEnd_
 
const uint8_tcrtPos_
 
size_t absolutePos_
 

Detailed Description

Definition at line 721 of file Cursor.h.

Constructor & Destructor Documentation

folly::io::Cursor::Cursor ( const IOBuf buf)
inlineexplicit

Definition at line 723 of file Cursor.h.

724  : detail::CursorBase<Cursor, const IOBuf>(buf) {}
template<class OtherDerived , class OtherBuf >
folly::io::Cursor::Cursor ( const detail::CursorBase< OtherDerived, OtherBuf > &  cursor)
inlineexplicit

Definition at line 727 of file Cursor.h.

728  : detail::CursorBase<Cursor, const IOBuf>(cursor) {}

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