TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
google::protobuf::io::CodedInputStream Class Reference

#include <coded_stream.h>

Public Types

typedef int Limit
 

Public Member Functions

 CodedInputStream (ZeroCopyInputStream *input)
 
 CodedInputStream (const uint8 *buffer, int size)
 
 ~CodedInputStream ()
 
bool IsFlat () const
 
bool Skip (int count)
 
bool GetDirectBufferPointer (const void **data, int *size)
 
void GetDirectBufferPointerInline (const void **data, int *size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE
 
bool ReadRaw (void *buffer, int size)
 
bool ReadString (string *buffer, int size)
 
bool InternalReadStringInline (string *buffer, int size) GOOGLE_ATTRIBUTE_ALWAYS_INLINE
 
bool ReadLittleEndian32 (uint32 *value)
 
bool ReadLittleEndian64 (uint64 *value)
 
bool ReadVarint32 (uint32 *value)
 
bool ReadVarint64 (uint64 *value)
 
uint32 ReadTag () GOOGLE_ATTRIBUTE_ALWAYS_INLINE
 
std::pair< uint32, boolReadTagWithCutoff (uint32 cutoff) GOOGLE_ATTRIBUTE_ALWAYS_INLINE
 
bool ExpectTag (uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE
 
bool ExpectAtEnd ()
 
bool LastTagWas (uint32 expected)
 
bool ConsumedEntireMessage ()
 
Limit PushLimit (int byte_limit)
 
void PopLimit (Limit limit)
 
int BytesUntilLimit () const
 
int CurrentPosition () const
 
void SetTotalBytesLimit (int total_bytes_limit, int warning_threshold)
 
int BytesUntilTotalBytesLimit () const
 
void SetRecursionLimit (int limit)
 
bool IncrementRecursionDepth ()
 
void DecrementRecursionDepth ()
 
void SetExtensionRegistry (const DescriptorPool *pool, MessageFactory *factory)
 
const DescriptorPoolGetExtensionPool ()
 
MessageFactoryGetExtensionFactory ()
 

Static Public Member Functions

static const uint8ReadLittleEndian32FromArray (const uint8 *buffer, uint32 *value)
 
static const uint8ReadLittleEndian64FromArray (const uint8 *buffer, uint64 *value)
 
static const uint8ExpectTagFromArray (const uint8 *buffer, uint32 expected) GOOGLE_ATTRIBUTE_ALWAYS_INLINE
 

Private Member Functions

 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS (CodedInputStream)
 
void Advance (int amount)
 
void BackUpInputToCurrentPosition ()
 
void RecomputeBufferLimits ()
 
void PrintTotalBytesLimitError ()
 
bool Refresh ()
 
bool ReadVarint32Fallback (uint32 *value)
 
bool ReadVarint64Fallback (uint64 *value)
 
bool ReadVarint32Slow (uint32 *value)
 
bool ReadVarint64Slow (uint64 *value)
 
bool ReadLittleEndian32Fallback (uint32 *value)
 
bool ReadLittleEndian64Fallback (uint64 *value)
 
uint32 ReadTagFallback ()
 
uint32 ReadTagSlow ()
 
bool ReadStringFallback (string *buffer, int size)
 
int BufferSize () const
 

Private Attributes

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

Static Private Attributes

static const int kDefaultTotalBytesLimit = 64 << 20
 
static const int kDefaultTotalBytesWarningThreshold = 32 << 20
 
static int default_recursion_limit_
 

Member Typedef Documentation

Constructor & Destructor Documentation

google::protobuf::io::CodedInputStream::CodedInputStream ( ZeroCopyInputStream input)
inlineexplicit
1166  : input_(input),
1167  buffer_(NULL),
1168  buffer_end_(NULL),
1169  total_bytes_read_(0),
1170  overflow_bytes_(0),
1171  last_tag_(0),
1172  legitimate_message_end_(false),
1173  aliasing_enabled_(false),
1178  recursion_depth_(0),
1182  // Eagerly Refresh() so buffer space is immediately available.
1183  Refresh();
1184 }
bool legitimate_message_end_
Definition: coded_stream.h:489
ZeroCopyInputStream * input_
Definition: coded_stream.h:473
int recursion_limit_
Definition: coded_stream.h:520
const uint8 * buffer_end_
Definition: coded_stream.h:475
static int default_recursion_limit_
Definition: coded_stream.h:572
arena_t NULL
Definition: jemalloc_internal.h:624
int overflow_bytes_
Definition: coded_stream.h:481
int buffer_size_after_limit_
Definition: coded_stream.h:504
const DescriptorPool * extension_pool_
Definition: coded_stream.h:523
int recursion_depth_
Definition: coded_stream.h:518
int total_bytes_read_
Definition: coded_stream.h:476
#define input
Definition: wire_format_lite.h:242
bool aliasing_enabled_
Definition: coded_stream.h:492
MessageFactory * extension_factory_
Definition: coded_stream.h:524
const uint8 * buffer_
Definition: coded_stream.h:474
int total_bytes_limit_
Definition: coded_stream.h:508
static const int kDefaultTotalBytesWarningThreshold
Definition: coded_stream.h:570
static const int32 kint32max
Definition: common.h:197
Limit current_limit_
Definition: coded_stream.h:495
uint32 last_tag_
Definition: coded_stream.h:484
int total_bytes_warning_threshold_
Definition: coded_stream.h:514
static const int kDefaultTotalBytesLimit
Definition: coded_stream.h:568

+ Here is the call graph for this function:

google::protobuf::io::CodedInputStream::CodedInputStream ( const uint8 buffer,
int  size 
)
inlineexplicit
1187  : input_(NULL),
1188  buffer_(buffer),
1189  buffer_end_(buffer + size),
1190  total_bytes_read_(size),
1191  overflow_bytes_(0),
1192  last_tag_(0),
1193  legitimate_message_end_(false),
1194  aliasing_enabled_(false),
1195  current_limit_(size),
1199  recursion_depth_(0),
1203  // Note that setting current_limit_ == size is important to prevent some
1204  // code paths from trying to access input_ and segfaulting.
1205 }
bool legitimate_message_end_
Definition: coded_stream.h:489
ZeroCopyInputStream * input_
Definition: coded_stream.h:473
int recursion_limit_
Definition: coded_stream.h:520
const uint8 * buffer_end_
Definition: coded_stream.h:475
static int default_recursion_limit_
Definition: coded_stream.h:572
arena_t NULL
Definition: jemalloc_internal.h:624
int overflow_bytes_
Definition: coded_stream.h:481
int buffer_size_after_limit_
Definition: coded_stream.h:504
const DescriptorPool * extension_pool_
Definition: coded_stream.h:523
int recursion_depth_
Definition: coded_stream.h:518
int total_bytes_read_
Definition: coded_stream.h:476
bool aliasing_enabled_
Definition: coded_stream.h:492
MessageFactory * extension_factory_
Definition: coded_stream.h:524
const uint8 * buffer_
Definition: coded_stream.h:474
int total_bytes_limit_
Definition: coded_stream.h:508
static const int kDefaultTotalBytesWarningThreshold
Definition: coded_stream.h:570
Limit current_limit_
Definition: coded_stream.h:495
uint32 last_tag_
Definition: coded_stream.h:484
int total_bytes_warning_threshold_
Definition: coded_stream.h:514
static const int kDefaultTotalBytesLimit
Definition: coded_stream.h:568
google::protobuf::io::CodedInputStream::~CodedInputStream ( )

Member Function Documentation

void google::protobuf::io::CodedInputStream::Advance ( int  amount)
inlineprivate
1125  {
1126  buffer_ += amount;
1127 }
const uint8 * buffer_
Definition: coded_stream.h:474

+ Here is the caller graph for this function:

void google::protobuf::io::CodedInputStream::BackUpInputToCurrentPosition ( )
private
int google::protobuf::io::CodedInputStream::BufferSize ( ) const
inlineprivate
1161  {
1162  return buffer_end_ - buffer_;
1163 }
const uint8 * buffer_end_
Definition: coded_stream.h:475
const uint8 * buffer_
Definition: coded_stream.h:474

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::ConsumedEntireMessage ( )
inline
932  {
934 }
bool legitimate_message_end_
Definition: coded_stream.h:489

+ Here is the caller graph for this function:

int google::protobuf::io::CodedInputStream::CurrentPosition ( ) const
inline
995  {
997 }
int buffer_size_after_limit_
Definition: coded_stream.h:504
int total_bytes_read_
Definition: coded_stream.h:476
int BufferSize() const
Definition: coded_stream.h:1161

+ Here is the call graph for this function:

void google::protobuf::io::CodedInputStream::DecrementRecursionDepth ( )
inline
1143  {
1145 }
int recursion_depth_
Definition: coded_stream.h:518

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::ExpectAtEnd ( )
inline
980  {
981  // If we are at a limit we know no more bytes can be read. Otherwise, it's
982  // hard to say without calling Refresh(), and we'd rather not do that.
983 
984  if (buffer_ == buffer_end_ &&
985  ((buffer_size_after_limit_ != 0) ||
987  last_tag_ = 0; // Pretend we called ReadTag()...
988  legitimate_message_end_ = true; // ... and it hit EOF.
989  return true;
990  } else {
991  return false;
992  }
993 }
bool legitimate_message_end_
Definition: coded_stream.h:489
const uint8 * buffer_end_
Definition: coded_stream.h:475
int buffer_size_after_limit_
Definition: coded_stream.h:504
int total_bytes_read_
Definition: coded_stream.h:476
const uint8 * buffer_
Definition: coded_stream.h:474
Limit current_limit_
Definition: coded_stream.h:495
uint32 last_tag_
Definition: coded_stream.h:484
bool google::protobuf::io::CodedInputStream::ExpectTag ( uint32  expected)
inline
936  {
937  if (expected < (1 << 7)) {
938  if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] == expected) {
939  Advance(1);
940  return true;
941  } else {
942  return false;
943  }
944  } else if (expected < (1 << 14)) {
945  if (GOOGLE_PREDICT_TRUE(BufferSize() >= 2) &&
946  buffer_[0] == static_cast<uint8>(expected | 0x80) &&
947  buffer_[1] == static_cast<uint8>(expected >> 7)) {
948  Advance(2);
949  return true;
950  } else {
951  return false;
952  }
953  } else {
954  // Don't bother optimizing for larger values.
955  return false;
956  }
957 }
void Advance(int amount)
Definition: coded_stream.h:1125
const uint8 * buffer_end_
Definition: coded_stream.h:475
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
const uint8 * buffer_
Definition: coded_stream.h:474
int BufferSize() const
Definition: coded_stream.h:1161

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const uint8 * google::protobuf::io::CodedInputStream::ExpectTagFromArray ( const uint8 buffer,
uint32  expected 
)
inlinestatic
960  {
961  if (expected < (1 << 7)) {
962  if (buffer[0] == expected) {
963  return buffer + 1;
964  }
965  } else if (expected < (1 << 14)) {
966  if (buffer[0] == static_cast<uint8>(expected | 0x80) &&
967  buffer[1] == static_cast<uint8>(expected >> 7)) {
968  return buffer + 2;
969  }
970  }
971  return NULL;
972 }
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::GetDirectBufferPointer ( const void **  data,
int *  size 
)
void google::protobuf::io::CodedInputStream::GetDirectBufferPointerInline ( const void **  data,
int *  size 
)
inline
975  {
976  *data = buffer_;
977  *size = buffer_end_ - buffer_;
978 }
const uint8 * buffer_end_
Definition: coded_stream.h:475
const uint8 * buffer_
Definition: coded_stream.h:474

+ Here is the caller graph for this function:

MessageFactory * google::protobuf::io::CodedInputStream::GetExtensionFactory ( )
inline
1157  {
1158  return extension_factory_;
1159 }
MessageFactory * extension_factory_
Definition: coded_stream.h:524
const DescriptorPool * google::protobuf::io::CodedInputStream::GetExtensionPool ( )
inline
1153  {
1154  return extension_pool_;
1155 }
const DescriptorPool * extension_pool_
Definition: coded_stream.h:523
google::protobuf::io::CodedInputStream::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS ( CodedInputStream  )
private
bool google::protobuf::io::CodedInputStream::IncrementRecursionDepth ( )
inline
1138  {
1139  ++recursion_depth_;
1141 }
int recursion_limit_
Definition: coded_stream.h:520
int recursion_depth_
Definition: coded_stream.h:518

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::InternalReadStringInline ( string *  buffer,
int  size 
)
inline
49  {
50  if (size < 0) return false; // security: size is often user-supplied
51 
52  if (BufferSize() >= size) {
53  STLStringResizeUninitialized(buffer, size);
54  // When buffer is empty, string_as_array(buffer) will return NULL but memcpy
55  // requires non-NULL pointers even when size is 0. Hench this check.
56  if (size > 0) {
57  memcpy(mutable_string_data(buffer), buffer_, size);
58  Advance(size);
59  }
60  return true;
61  }
62 
63  return ReadStringFallback(buffer, size);
64 }
void Advance(int amount)
Definition: coded_stream.h:1125
void STLStringResizeUninitialized(string *s, size_t new_size)
Definition: stl_util.h:67
bool ReadStringFallback(string *buffer, int size)
const uint8 * buffer_
Definition: coded_stream.h:474
char * mutable_string_data(string *s)
Definition: zero_copy_stream_impl_lite.h:340
int BufferSize() const
Definition: coded_stream.h:1161

+ Here is the call graph for this function:

bool google::protobuf::io::CodedInputStream::IsFlat ( ) const
inline
1207  {
1208  return input_ == NULL;
1209 }
ZeroCopyInputStream * input_
Definition: coded_stream.h:473
arena_t NULL
Definition: jemalloc_internal.h:624
bool google::protobuf::io::CodedInputStream::LastTagWas ( uint32  expected)
inline
928  {
929  return last_tag_ == expected;
930 }
uint32 last_tag_
Definition: coded_stream.h:484

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

void google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError ( )
private
Limit google::protobuf::io::CodedInputStream::PushLimit ( int  byte_limit)

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::ReadLittleEndian32 ( uint32 value)
inline
850  {
851 #if defined(PROTOBUF_LITTLE_ENDIAN)
852  if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
853  memcpy(value, buffer_, sizeof(*value));
854  Advance(sizeof(*value));
855  return true;
856  } else {
858  }
859 #else
861 #endif
862 }
void Advance(int amount)
Definition: coded_stream.h:1125
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
bool ReadLittleEndian32Fallback(uint32 *value)
const uint8 * buffer_
Definition: coded_stream.h:474
const FieldDescriptor value
Definition: descriptor.h:1522
int BufferSize() const
Definition: coded_stream.h:1161

+ Here is the call graph for this function:

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

+ Here is the caller graph for this function:

const uint8 * google::protobuf::io::CodedInputStream::ReadLittleEndian32FromArray ( const uint8 buffer,
uint32 value 
)
inlinestatic
816  {
817 #if defined(PROTOBUF_LITTLE_ENDIAN)
818  memcpy(value, buffer, sizeof(*value));
819  return buffer + sizeof(*value);
820 #else
821  *value = (static_cast<uint32>(buffer[0]) ) |
822  (static_cast<uint32>(buffer[1]) << 8) |
823  (static_cast<uint32>(buffer[2]) << 16) |
824  (static_cast<uint32>(buffer[3]) << 24);
825  return buffer + sizeof(*value);
826 #endif
827 }
uint32_t uint32
Definition: Define.h:150
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::ReadLittleEndian64 ( uint64 value)
inline
864  {
865 #if defined(PROTOBUF_LITTLE_ENDIAN)
866  if (GOOGLE_PREDICT_TRUE(BufferSize() >= static_cast<int>(sizeof(*value)))) {
867  memcpy(value, buffer_, sizeof(*value));
868  Advance(sizeof(*value));
869  return true;
870  } else {
872  }
873 #else
875 #endif
876 }
void Advance(int amount)
Definition: coded_stream.h:1125
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
const uint8 * buffer_
Definition: coded_stream.h:474
const FieldDescriptor value
Definition: descriptor.h:1522
bool ReadLittleEndian64Fallback(uint64 *value)
int BufferSize() const
Definition: coded_stream.h:1161

+ Here is the call graph for this function:

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

+ Here is the caller graph for this function:

const uint8 * google::protobuf::io::CodedInputStream::ReadLittleEndian64FromArray ( const uint8 buffer,
uint64 value 
)
inlinestatic
831  {
832 #if defined(PROTOBUF_LITTLE_ENDIAN)
833  memcpy(value, buffer, sizeof(*value));
834  return buffer + sizeof(*value);
835 #else
836  uint32 part0 = (static_cast<uint32>(buffer[0]) ) |
837  (static_cast<uint32>(buffer[1]) << 8) |
838  (static_cast<uint32>(buffer[2]) << 16) |
839  (static_cast<uint32>(buffer[3]) << 24);
840  uint32 part1 = (static_cast<uint32>(buffer[4]) ) |
841  (static_cast<uint32>(buffer[5]) << 8) |
842  (static_cast<uint32>(buffer[6]) << 16) |
843  (static_cast<uint32>(buffer[7]) << 24);
844  *value = static_cast<uint64>(part0) |
845  (static_cast<uint64>(part1) << 32);
846  return buffer + sizeof(*value);
847 #endif
848 }
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

uint32 google::protobuf::io::CodedInputStream::ReadTag ( )
inline
878  {
879  if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && buffer_[0] < 0x80) {
880  last_tag_ = buffer_[0];
881  Advance(1);
882  return last_tag_;
883  } else {
885  return last_tag_;
886  }
887 }
void Advance(int amount)
Definition: coded_stream.h:1125
const uint8 * buffer_end_
Definition: coded_stream.h:475
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
const uint8 * buffer_
Definition: coded_stream.h:474
uint32 last_tag_
Definition: coded_stream.h:484

+ Here is the call graph for this function:

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

+ Here is the caller graph for this function:

uint32 google::protobuf::io::CodedInputStream::ReadTagSlow ( )
private
std::pair< uint32, bool > google::protobuf::io::CodedInputStream::ReadTagWithCutoff ( uint32  cutoff)
inline
890  {
891  // In performance-sensitive code we can expect cutoff to be a compile-time
892  // constant, and things like "cutoff >= kMax1ByteVarint" to be evaluated at
893  // compile time.
895  // Hot case: buffer_ non_empty, buffer_[0] in [1, 128).
896  // TODO(gpike): Is it worth rearranging this? E.g., if the number of fields
897  // is large enough then is it better to check for the two-byte case first?
898  if (static_cast<int8>(buffer_[0]) > 0) {
899  const uint32 kMax1ByteVarint = 0x7f;
900  uint32 tag = last_tag_ = buffer_[0];
901  Advance(1);
902  return make_pair(tag, cutoff >= kMax1ByteVarint || tag <= cutoff);
903  }
904  // Other hot case: cutoff >= 0x80, buffer_ has at least two bytes available,
905  // and tag is two bytes. The latter is tested by bitwise-and-not of the
906  // first byte and the second byte.
907  if (cutoff >= 0x80 &&
909  GOOGLE_PREDICT_TRUE((buffer_[0] & ~buffer_[1]) >= 0x80)) {
910  const uint32 kMax2ByteVarint = (0x7f << 7) + 0x7f;
911  uint32 tag = last_tag_ = (1u << 7) * buffer_[1] + (buffer_[0] - 0x80);
912  Advance(2);
913  // It might make sense to test for tag == 0 now, but it is so rare that
914  // that we don't bother. A varint-encoded 0 should be one byte unless
915  // the encoder lost its mind. The second part of the return value of
916  // this function is allowed to be either true or false if the tag is 0,
917  // so we don't have to check for tag == 0. We may need to check whether
918  // it exceeds cutoff.
919  bool at_or_below_cutoff = cutoff >= kMax2ByteVarint || tag <= cutoff;
920  return make_pair(tag, at_or_below_cutoff);
921  }
922  }
923  // Slow path
925  return make_pair(last_tag_, static_cast<uint32>(last_tag_ - 1) < cutoff);
926 }
void Advance(int amount)
Definition: coded_stream.h:1125
const uint8 * buffer_end_
Definition: coded_stream.h:475
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
uint32_t uint32
Definition: Define.h:150
const uint8 * buffer_
Definition: coded_stream.h:474
uint32 last_tag_
Definition: coded_stream.h:484

+ Here is the call graph for this function:

bool google::protobuf::io::CodedInputStream::ReadVarint32 ( uint32 value)
inline
793  {
794  if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) {
795  *value = *buffer_;
796  Advance(1);
797  return true;
798  } else {
799  return ReadVarint32Fallback(value);
800  }
801 }
void Advance(int amount)
Definition: coded_stream.h:1125
const uint8 * buffer_end_
Definition: coded_stream.h:475
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
bool ReadVarint32Fallback(uint32 *value)
const uint8 * buffer_
Definition: coded_stream.h:474
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

bool google::protobuf::io::CodedInputStream::ReadVarint32Slow ( uint32 value)
private
bool google::protobuf::io::CodedInputStream::ReadVarint64 ( uint64 value)
inline
803  {
804  if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) {
805  *value = *buffer_;
806  Advance(1);
807  return true;
808  } else {
809  return ReadVarint64Fallback(value);
810  }
811 }
void Advance(int amount)
Definition: coded_stream.h:1125
const uint8 * buffer_end_
Definition: coded_stream.h:475
bool ReadVarint64Fallback(uint64 *value)
#define GOOGLE_PREDICT_TRUE
Definition: common.h:235
const uint8 * buffer_
Definition: coded_stream.h:474
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the call graph for this function:

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

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

void google::protobuf::io::CodedInputStream::SetExtensionRegistry ( const DescriptorPool pool,
MessageFactory factory 
)
inline
1148  {
1149  extension_pool_ = pool;
1150  extension_factory_ = factory;
1151 }
const DescriptorPool * extension_pool_
Definition: coded_stream.h:523
MessageFactory * extension_factory_
Definition: coded_stream.h:524
void google::protobuf::io::CodedInputStream::SetRecursionLimit ( int  limit)
inline
1134  {
1135  recursion_limit_ = limit;
1136 }
int recursion_limit_
Definition: coded_stream.h:520
void google::protobuf::io::CodedInputStream::SetTotalBytesLimit ( int  total_bytes_limit,
int  warning_threshold 
)
bool google::protobuf::io::CodedInputStream::Skip ( int  count)

+ Here is the caller graph for this function:

Member Data Documentation

bool google::protobuf::io::CodedInputStream::aliasing_enabled_
private
const uint8* google::protobuf::io::CodedInputStream::buffer_
private
const uint8* google::protobuf::io::CodedInputStream::buffer_end_
private
int google::protobuf::io::CodedInputStream::buffer_size_after_limit_
private
Limit google::protobuf::io::CodedInputStream::current_limit_
private
int google::protobuf::io::CodedInputStream::default_recursion_limit_
staticprivate
MessageFactory* google::protobuf::io::CodedInputStream::extension_factory_
private
const DescriptorPool* google::protobuf::io::CodedInputStream::extension_pool_
private
ZeroCopyInputStream* google::protobuf::io::CodedInputStream::input_
private
const int google::protobuf::io::CodedInputStream::kDefaultTotalBytesLimit = 64 << 20
staticprivate
const int google::protobuf::io::CodedInputStream::kDefaultTotalBytesWarningThreshold = 32 << 20
staticprivate
uint32 google::protobuf::io::CodedInputStream::last_tag_
private
bool google::protobuf::io::CodedInputStream::legitimate_message_end_
private
int google::protobuf::io::CodedInputStream::overflow_bytes_
private
int google::protobuf::io::CodedInputStream::recursion_depth_
private
int google::protobuf::io::CodedInputStream::recursion_limit_
private
int google::protobuf::io::CodedInputStream::total_bytes_limit_
private
int google::protobuf::io::CodedInputStream::total_bytes_read_
private
int google::protobuf::io::CodedInputStream::total_bytes_warning_threshold_
private

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