Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
google::protobuf::io::CodedInputStream Class Reference

#include <coded_stream.h>

Public Types

typedef int Limit
 

Public Member Functions

int BytesUntilLimit () const
 
int BytesUntilTotalBytesLimit () const
 
bool CheckEntireMessageConsumedAndPopLimit (Limit limit)
 
 CodedInputStream (const uint8 *buffer, int size)
 
 CodedInputStream (ZeroCopyInputStream *input)
 
bool ConsumedEntireMessage ()
 
int CurrentPosition () const
 
void DecrementRecursionDepth ()
 
bool DecrementRecursionDepthAndPopLimit (Limit limit)
 
bool ExpectAtEnd ()
 
PROTOBUF_ALWAYS_INLINE bool ExpectTag (uint32 expected)
 
bool GetDirectBufferPointer (const void **data, int *size)
 
PROTOBUF_ALWAYS_INLINE void GetDirectBufferPointerInline (const void **data, int *size)
 
MessageFactoryGetExtensionFactory ()
 
const DescriptorPoolGetExtensionPool ()
 
bool IncrementRecursionDepth ()
 
std::pair< CodedInputStream::Limit, intIncrementRecursionDepthAndPushLimit (int byte_limit)
 
PROTOBUF_ALWAYS_INLINE bool InternalReadRawInline (void *buffer, int size)
 
PROTOBUF_ALWAYS_INLINE bool InternalReadStringInline (std::string *buffer, int size)
 
bool IsFlat () const
 
bool LastTagWas (uint32 expected)
 
void PopLimit (Limit limit)
 
 PROTOBUF_DEPRECATED_MSG ("Please use the single parameter version of SetTotalBytesLimit(). The " "second parameter is ignored.") void SetTotalBytesLimit(int total_bytes_limit
 
Limit PushLimit (int byte_limit)
 
Limit ReadLengthAndPushLimit ()
 
bool ReadLittleEndian32 (uint32 *value)
 
bool ReadLittleEndian64 (uint64 *value)
 
bool ReadRaw (void *buffer, int size)
 
bool ReadString (std::string *buffer, int size)
 
PROTOBUF_ALWAYS_INLINE uint32 ReadTag ()
 
PROTOBUF_ALWAYS_INLINE uint32 ReadTagNoLastTag ()
 
PROTOBUF_ALWAYS_INLINE std::pair< uint32, bool > ReadTagWithCutoff (uint32 cutoff)
 
PROTOBUF_ALWAYS_INLINE std::pair< uint32, bool > ReadTagWithCutoffNoLastTag (uint32 cutoff)
 
bool ReadVarint32 (uint32 *value)
 
bool ReadVarint64 (uint64 *value)
 
bool ReadVarintSizeAsInt (int *value)
 
int RecursionBudget ()
 
void SetConsumed ()
 
void SetExtensionRegistry (const DescriptorPool *pool, MessageFactory *factory)
 
void SetLastTag (uint32 tag)
 
void SetRecursionLimit (int limit)
 
void SetTotalBytesLimit (int total_bytes_limit)
 
bool Skip (int count)
 
void UnsafeDecrementRecursionDepth ()
 
 ~CodedInputStream ()
 

Static Public Member Functions

static const PROTOBUF_ALWAYS_INLINE uint8ExpectTagFromArray (const uint8 *buffer, uint32 expected)
 
static int GetDefaultRecursionLimit ()
 
static const uint8ReadLittleEndian32FromArray (const uint8 *buffer, uint32 *value)
 
static const uint8ReadLittleEndian64FromArray (const uint8 *buffer, uint64 *value)
 

Public Attributes

 int
 

Private Member Functions

void Advance (int amount)
 
void BackUpInputToCurrentPosition ()
 
int BufferSize () const
 
 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS (CodedInputStream)
 
void PrintTotalBytesLimitError ()
 
bool ReadLittleEndian32Fallback (uint32 *value)
 
bool ReadLittleEndian64Fallback (uint64 *value)
 
bool ReadStringFallback (std::string *buffer, int size)
 
uint32 ReadTagFallback (uint32 first_byte_or_zero)
 
uint32 ReadTagSlow ()
 
int64 ReadVarint32Fallback (uint32 first_byte_or_zero)
 
bool ReadVarint32Slow (uint32 *value)
 
std::pair< uint64, bool > ReadVarint64Fallback ()
 
bool ReadVarint64Slow (uint64 *value)
 
int ReadVarintSizeAsIntFallback ()
 
int ReadVarintSizeAsIntSlow ()
 
void RecomputeBufferLimits ()
 
bool Refresh ()
 
bool SkipFallback (int count, int original_buffer_size)
 

Private Attributes

bool aliasing_enabled_
 
const uint8buffer_
 
const uint8buffer_end_
 
int buffer_size_after_limit_
 
Limit current_limit_
 
MessageFactoryextension_factory_
 
const DescriptorPoolextension_pool_
 
ZeroCopyInputStreaminput_
 
uint32 last_tag_
 
bool legitimate_message_end_
 
int overflow_bytes_
 
int recursion_budget_
 
int recursion_limit_
 
int total_bytes_limit_
 
int total_bytes_read_
 

Static Private Attributes

static int default_recursion_limit_ = 100
 
static const int kDefaultTotalBytesLimit = INT_MAX
 

Friends

class google::protobuf::internal::EpsCopyByteStream
 
class google::protobuf::ZeroCopyCodedInputStream
 

Detailed Description

Definition at line 173 of file coded_stream.h.

Member Typedef Documentation

◆ Limit

Definition at line 350 of file coded_stream.h.

Constructor & Destructor Documentation

◆ CodedInputStream() [1/2]

google::protobuf::io::CodedInputStream::CodedInputStream ( ZeroCopyInputStream input)
inlineexplicit

Definition at line 1339 of file coded_stream.h.

◆ CodedInputStream() [2/2]

google::protobuf::io::CodedInputStream::CodedInputStream ( const uint8 buffer,
int  size 
)
inlineexplicit

Definition at line 1359 of file coded_stream.h.

◆ ~CodedInputStream()

google::protobuf::io::CodedInputStream::~CodedInputStream ( )

Definition at line 77 of file coded_stream.cc.

Member Function Documentation

◆ Advance()

void google::protobuf::io::CodedInputStream::Advance ( int  amount)
inlineprivate

Definition at line 1295 of file coded_stream.h.

◆ BackUpInputToCurrentPosition()

void google::protobuf::io::CodedInputStream::BackUpInputToCurrentPosition ( )
private

Definition at line 91 of file coded_stream.cc.

◆ BufferSize()

int google::protobuf::io::CodedInputStream::BufferSize ( ) const
inlineprivate

Definition at line 1335 of file coded_stream.h.

◆ BytesUntilLimit()

int google::protobuf::io::CodedInputStream::BytesUntilLimit ( ) const

Definition at line 171 of file coded_stream.cc.

◆ BytesUntilTotalBytesLimit()

int google::protobuf::io::CodedInputStream::BytesUntilTotalBytesLimit ( ) const

Definition at line 186 of file coded_stream.cc.

◆ CheckEntireMessageConsumedAndPopLimit()

bool google::protobuf::io::CodedInputStream::CheckEntireMessageConsumedAndPopLimit ( Limit  limit)

Definition at line 165 of file coded_stream.cc.

◆ ConsumedEntireMessage()

bool google::protobuf::io::CodedInputStream::ConsumedEntireMessage ( )
inline

Definition at line 1072 of file coded_stream.h.

◆ CurrentPosition()

int google::protobuf::io::CodedInputStream::CurrentPosition ( ) const
inline

Definition at line 1135 of file coded_stream.h.

◆ DecrementRecursionDepth()

void google::protobuf::io::CodedInputStream::DecrementRecursionDepth ( )
inline

Definition at line 1312 of file coded_stream.h.

◆ DecrementRecursionDepthAndPopLimit()

bool google::protobuf::io::CodedInputStream::DecrementRecursionDepthAndPopLimit ( Limit  limit)

Definition at line 157 of file coded_stream.cc.

◆ ExpectAtEnd()

bool google::protobuf::io::CodedInputStream::ExpectAtEnd ( )
inline

Definition at line 1121 of file coded_stream.h.

◆ ExpectTag()

bool google::protobuf::io::CodedInputStream::ExpectTag ( uint32  expected)
inline

Definition at line 1076 of file coded_stream.h.

◆ ExpectTagFromArray()

const uint8 * google::protobuf::io::CodedInputStream::ExpectTagFromArray ( const uint8 buffer,
uint32  expected 
)
inlinestatic

Definition at line 1100 of file coded_stream.h.

◆ GetDefaultRecursionLimit()

static int google::protobuf::io::CodedInputStream::GetDefaultRecursionLimit ( )
inlinestatic

Definition at line 416 of file coded_stream.h.

◆ GetDirectBufferPointer()

bool google::protobuf::io::CodedInputStream::GetDirectBufferPointer ( const void **  data,
int size 
)

Definition at line 231 of file coded_stream.cc.

◆ GetDirectBufferPointerInline()

void google::protobuf::io::CodedInputStream::GetDirectBufferPointerInline ( const void **  data,
int size 
)
inline

Definition at line 1115 of file coded_stream.h.

◆ GetExtensionFactory()

MessageFactory * google::protobuf::io::CodedInputStream::GetExtensionFactory ( )
inline

Definition at line 1331 of file coded_stream.h.

◆ GetExtensionPool()

const DescriptorPool * google::protobuf::io::CodedInputStream::GetExtensionPool ( )
inline

Definition at line 1327 of file coded_stream.h.

◆ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS()

google::protobuf::io::CodedInputStream::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS ( CodedInputStream  )
private

◆ IncrementRecursionDepth()

bool google::protobuf::io::CodedInputStream::IncrementRecursionDepth ( )
inline

Definition at line 1307 of file coded_stream.h.

◆ IncrementRecursionDepthAndPushLimit()

std::pair< CodedInputStream::Limit, int > google::protobuf::io::CodedInputStream::IncrementRecursionDepthAndPushLimit ( int  byte_limit)

Definition at line 148 of file coded_stream.cc.

◆ InternalReadRawInline()

bool google::protobuf::io::CodedInputStream::InternalReadRawInline ( void buffer,
int  size 
)
inline

Definition at line 70 of file coded_stream_inl.h.

◆ InternalReadStringInline()

bool google::protobuf::io::CodedInputStream::InternalReadStringInline ( std::string buffer,
int  size 
)
inline

Definition at line 50 of file coded_stream_inl.h.

◆ IsFlat()

bool google::protobuf::io::CodedInputStream::IsFlat ( ) const
inline

Definition at line 1379 of file coded_stream.h.

◆ LastTagWas()

bool google::protobuf::io::CodedInputStream::LastTagWas ( uint32  expected)
inline

Definition at line 1068 of file coded_stream.h.

◆ PopLimit()

void google::protobuf::io::CodedInputStream::PopLimit ( Limit  limit)

Definition at line 136 of file coded_stream.cc.

◆ PrintTotalBytesLimitError()

void google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError ( )
private

Definition at line 191 of file coded_stream.cc.

◆ PROTOBUF_DEPRECATED_MSG()

google::protobuf::io::CodedInputStream::PROTOBUF_DEPRECATED_MSG ( "Please use the single parameter version of SetTotalBytesLimit(). The " "second parameter is ignored."  )

◆ PushLimit()

CodedInputStream::Limit google::protobuf::io::CodedInputStream::PushLimit ( int  byte_limit)

Definition at line 117 of file coded_stream.cc.

◆ ReadLengthAndPushLimit()

CodedInputStream::Limit google::protobuf::io::CodedInputStream::ReadLengthAndPushLimit ( )

Definition at line 152 of file coded_stream.cc.

◆ ReadLittleEndian32()

bool google::protobuf::io::CodedInputStream::ReadLittleEndian32 ( uint32 value)
inline

Definition at line 989 of file coded_stream.h.

◆ ReadLittleEndian32Fallback()

bool google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback ( uint32 value)
private

Definition at line 282 of file coded_stream.cc.

◆ ReadLittleEndian32FromArray()

const uint8 * google::protobuf::io::CodedInputStream::ReadLittleEndian32FromArray ( const uint8 buffer,
uint32 value 
)
inlinestatic

Definition at line 956 of file coded_stream.h.

◆ ReadLittleEndian64()

bool google::protobuf::io::CodedInputStream::ReadLittleEndian64 ( uint64 value)
inline

Definition at line 1002 of file coded_stream.h.

◆ ReadLittleEndian64Fallback()

bool google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback ( uint64 value)
private

Definition at line 299 of file coded_stream.cc.

◆ ReadLittleEndian64FromArray()

const uint8 * google::protobuf::io::CodedInputStream::ReadLittleEndian64FromArray ( const uint8 buffer,
uint64 value 
)
inlinestatic

Definition at line 970 of file coded_stream.h.

◆ ReadRaw()

bool google::protobuf::io::CodedInputStream::ReadRaw ( void buffer,
int  size 
)

Definition at line 239 of file coded_stream.cc.

◆ ReadString()

bool google::protobuf::io::CodedInputStream::ReadString ( std::string buffer,
int  size 
)

Definition at line 243 of file coded_stream.cc.

◆ ReadStringFallback()

bool google::protobuf::io::CodedInputStream::ReadStringFallback ( std::string buffer,
int  size 
)
private

Definition at line 248 of file coded_stream.cc.

◆ ReadTag()

PROTOBUF_ALWAYS_INLINE uint32 google::protobuf::io::CodedInputStream::ReadTag ( )
inline

Definition at line 268 of file coded_stream.h.

◆ ReadTagFallback()

uint32 google::protobuf::io::CodedInputStream::ReadTagFallback ( uint32  first_byte_or_zero)
private

Definition at line 502 of file coded_stream.cc.

◆ ReadTagNoLastTag()

uint32 google::protobuf::io::CodedInputStream::ReadTagNoLastTag ( )
inline

Definition at line 1015 of file coded_stream.h.

◆ ReadTagSlow()

uint32 google::protobuf::io::CodedInputStream::ReadTagSlow ( )
private

Definition at line 476 of file coded_stream.cc.

◆ ReadTagWithCutoff()

PROTOBUF_ALWAYS_INLINE std::pair<uint32, bool> google::protobuf::io::CodedInputStream::ReadTagWithCutoff ( uint32  cutoff)
inline

Definition at line 283 of file coded_stream.h.

◆ ReadTagWithCutoffNoLastTag()

std::pair< uint32, bool > google::protobuf::io::CodedInputStream::ReadTagWithCutoffNoLastTag ( uint32  cutoff)
inline

Definition at line 1028 of file coded_stream.h.

◆ ReadVarint32()

bool google::protobuf::io::CodedInputStream::ReadVarint32 ( uint32 value)
inline

Definition at line 916 of file coded_stream.h.

◆ ReadVarint32Fallback()

int64 google::protobuf::io::CodedInputStream::ReadVarint32Fallback ( uint32  first_byte_or_zero)
private

Definition at line 428 of file coded_stream.cc.

◆ ReadVarint32Slow()

bool google::protobuf::io::CodedInputStream::ReadVarint32Slow ( uint32 value)
private

Definition at line 420 of file coded_stream.cc.

◆ ReadVarint64()

bool google::protobuf::io::CodedInputStream::ReadVarint64 ( uint64 value)
inline

Definition at line 931 of file coded_stream.h.

◆ ReadVarint64Fallback()

std::pair< uint64, bool > google::protobuf::io::CodedInputStream::ReadVarint64Fallback ( )
private

Definition at line 568 of file coded_stream.cc.

◆ ReadVarint64Slow()

bool google::protobuf::io::CodedInputStream::ReadVarint64Slow ( uint64 value)
private

Definition at line 539 of file coded_stream.cc.

◆ ReadVarintSizeAsInt()

bool google::protobuf::io::CodedInputStream::ReadVarintSizeAsInt ( int value)
inline

Definition at line 942 of file coded_stream.h.

◆ ReadVarintSizeAsIntFallback()

int google::protobuf::io::CodedInputStream::ReadVarintSizeAsIntFallback ( )
private

Definition at line 458 of file coded_stream.cc.

◆ ReadVarintSizeAsIntSlow()

int google::protobuf::io::CodedInputStream::ReadVarintSizeAsIntSlow ( )
private

Definition at line 450 of file coded_stream.cc.

◆ RecomputeBufferLimits()

void google::protobuf::io::CodedInputStream::RecomputeBufferLimits ( )
inlineprivate

Definition at line 104 of file coded_stream.cc.

◆ RecursionBudget()

int google::protobuf::io::CodedInputStream::RecursionBudget ( )
inline

Definition at line 414 of file coded_stream.h.

◆ Refresh()

bool google::protobuf::io::CodedInputStream::Refresh ( )
private

Definition at line 587 of file coded_stream.cc.

◆ SetConsumed()

void google::protobuf::io::CodedInputStream::SetConsumed ( )
inline

Definition at line 338 of file coded_stream.h.

◆ SetExtensionRegistry()

void google::protobuf::io::CodedInputStream::SetExtensionRegistry ( const DescriptorPool pool,
MessageFactory factory 
)
inline

Definition at line 1321 of file coded_stream.h.

◆ SetLastTag()

void google::protobuf::io::CodedInputStream::SetLastTag ( uint32  tag)
inline

Definition at line 329 of file coded_stream.h.

◆ SetRecursionLimit()

void google::protobuf::io::CodedInputStream::SetRecursionLimit ( int  limit)
inline

Definition at line 1302 of file coded_stream.h.

◆ SetTotalBytesLimit()

void google::protobuf::io::CodedInputStream::SetTotalBytesLimit ( int  total_bytes_limit)

Definition at line 178 of file coded_stream.cc.

◆ Skip()

bool google::protobuf::io::CodedInputStream::Skip ( int  count)
inline

Definition at line 1381 of file coded_stream.h.

◆ SkipFallback()

bool google::protobuf::io::CodedInputStream::SkipFallback ( int  count,
int  original_buffer_size 
)
private

Definition at line 200 of file coded_stream.cc.

◆ UnsafeDecrementRecursionDepth()

void google::protobuf::io::CodedInputStream::UnsafeDecrementRecursionDepth ( )
inline

Definition at line 1316 of file coded_stream.h.

Friends And Related Function Documentation

◆ google::protobuf::internal::EpsCopyByteStream

friend class google::protobuf::internal::EpsCopyByteStream
friend

Definition at line 644 of file coded_stream.h.

◆ google::protobuf::ZeroCopyCodedInputStream

friend class google::protobuf::ZeroCopyCodedInputStream
friend

Definition at line 643 of file coded_stream.h.

Member Data Documentation

◆ aliasing_enabled_

bool google::protobuf::io::CodedInputStream::aliasing_enabled_
private

Definition at line 558 of file coded_stream.h.

◆ buffer_

const uint8* google::protobuf::io::CodedInputStream::buffer_
private

Definition at line 539 of file coded_stream.h.

◆ buffer_end_

const uint8* google::protobuf::io::CodedInputStream::buffer_end_
private

Definition at line 540 of file coded_stream.h.

◆ buffer_size_after_limit_

int google::protobuf::io::CodedInputStream::buffer_size_after_limit_
private

Definition at line 570 of file coded_stream.h.

◆ current_limit_

Limit google::protobuf::io::CodedInputStream::current_limit_
private

Definition at line 561 of file coded_stream.h.

◆ default_recursion_limit_

int google::protobuf::io::CodedInputStream::default_recursion_limit_ = 100
staticprivate

Definition at line 641 of file coded_stream.h.

◆ extension_factory_

MessageFactory* google::protobuf::io::CodedInputStream::extension_factory_
private

Definition at line 585 of file coded_stream.h.

◆ extension_pool_

const DescriptorPool* google::protobuf::io::CodedInputStream::extension_pool_
private

Definition at line 584 of file coded_stream.h.

◆ input_

ZeroCopyInputStream* google::protobuf::io::CodedInputStream::input_
private

Definition at line 541 of file coded_stream.h.

◆ int

google::protobuf::io::CodedInputStream::int
Initial value:
{
SetTotalBytesLimit(total_bytes_limit)

Definition at line 398 of file coded_stream.h.

◆ kDefaultTotalBytesLimit

const int google::protobuf::io::CodedInputStream::kDefaultTotalBytesLimit = INT_MAX
staticprivate

Definition at line 639 of file coded_stream.h.

◆ last_tag_

uint32 google::protobuf::io::CodedInputStream::last_tag_
private

Definition at line 550 of file coded_stream.h.

◆ legitimate_message_end_

bool google::protobuf::io::CodedInputStream::legitimate_message_end_
private

Definition at line 555 of file coded_stream.h.

◆ overflow_bytes_

int google::protobuf::io::CodedInputStream::overflow_bytes_
private

Definition at line 547 of file coded_stream.h.

◆ recursion_budget_

int google::protobuf::io::CodedInputStream::recursion_budget_
private

Definition at line 579 of file coded_stream.h.

◆ recursion_limit_

int google::protobuf::io::CodedInputStream::recursion_limit_
private

Definition at line 581 of file coded_stream.h.

◆ total_bytes_limit_

int google::protobuf::io::CodedInputStream::total_bytes_limit_
private

Definition at line 574 of file coded_stream.h.

◆ total_bytes_read_

int google::protobuf::io::CodedInputStream::total_bytes_read_
private

Definition at line 542 of file coded_stream.h.


The documentation for this class was generated from the following files:
google::protobuf::io::CodedInputStream::SetTotalBytesLimit
void SetTotalBytesLimit(int total_bytes_limit)
Definition: coded_stream.cc:178


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:10