protobuf/src/google/protobuf/util/internal/utility.cc
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 #include <google/protobuf/util/internal/utility.h>
32 
33 #include <algorithm>
34 #include <cmath>
35 #include <cstdint>
36 #include <limits>
37 
38 #include <google/protobuf/stubs/callback.h>
39 #include <google/protobuf/stubs/common.h>
40 #include <google/protobuf/stubs/logging.h>
41 #include <google/protobuf/wrappers.pb.h>
42 #include <google/protobuf/descriptor.pb.h>
43 #include <google/protobuf/descriptor.h>
44 #include <google/protobuf/util/internal/constants.h>
45 #include <google/protobuf/stubs/strutil.h>
46 #include <google/protobuf/stubs/map_util.h>
47 
48 // clang-format off
49 #include <google/protobuf/port_def.inc>
50 // clang-format on
51 
52 namespace google {
53 namespace protobuf {
54 namespace util {
55 namespace converter {
56 
59  StringPiece option_name, bool default_value) {
60  const google::protobuf::Option* opt = FindOptionOrNull(options, option_name);
61  if (opt == nullptr) {
62  return default_value;
63  }
64  return GetBoolFromAny(opt->value());
65 }
66 
69  StringPiece option_name, int64_t default_value) {
70  const google::protobuf::Option* opt = FindOptionOrNull(options, option_name);
71  if (opt == nullptr) {
72  return default_value;
73  }
74  return GetInt64FromAny(opt->value());
75 }
76 
79  StringPiece option_name, double default_value) {
80  const google::protobuf::Option* opt = FindOptionOrNull(options, option_name);
81  if (opt == nullptr) {
82  return default_value;
83  }
84  return GetDoubleFromAny(opt->value());
85 }
86 
89  StringPiece option_name, StringPiece default_value) {
90  const google::protobuf::Option* opt = FindOptionOrNull(options, option_name);
91  if (opt == nullptr) {
92  return std::string(default_value);
93  }
94  return GetStringFromAny(opt->value());
95 }
96 
97 template <typename T>
98 void ParseFromAny(const std::string& data, T* result) {
99  result->ParseFromString(data);
100 }
101 
102 // Returns a boolean value contained in Any type.
103 // TODO(skarvaje): Add type checking & error messages here.
104 bool GetBoolFromAny(const google::protobuf::Any& any) {
106  ParseFromAny(any.value(), &b);
107  return b.value();
108 }
109 
112  ParseFromAny(any.value(), &i);
113  return i.value();
114 }
115 
116 double GetDoubleFromAny(const google::protobuf::Any& any) {
118  ParseFromAny(any.value(), &i);
119  return i.value();
120 }
121 
124  ParseFromAny(any.value(), &s);
125  return s.value();
126 }
127 
128 const StringPiece GetTypeWithoutUrl(StringPiece type_url) {
129  if (type_url.size() > kTypeUrlSize && type_url[kTypeUrlSize] == '/') {
130  return type_url.substr(kTypeUrlSize + 1);
131  } else {
132  size_t idx = type_url.rfind('/');
133  if (idx != type_url.npos) {
134  type_url.remove_prefix(idx + 1);
135  }
136  return type_url;
137  }
138 }
139 
140 const std::string GetFullTypeWithUrl(StringPiece simple_type) {
141  return StrCat(kTypeServiceBaseUrl, "/", simple_type);
142 }
143 
146  StringPiece option_name) {
147  for (int i = 0; i < options.size(); ++i) {
148  const google::protobuf::Option& opt = options.Get(i);
149  if (opt.name() == option_name) {
150  return &opt;
151  }
152  }
153  return nullptr;
154 }
155 
157  const google::protobuf::Type* type, StringPiece field_name) {
158  if (type != nullptr) {
159  for (int i = 0; i < type->fields_size(); ++i) {
160  const google::protobuf::Field& field = type->fields(i);
161  if (field.name() == field_name) {
162  return &field;
163  }
164  }
165  }
166  return nullptr;
167 }
168 
170  const google::protobuf::Type* type, StringPiece json_name) {
171  if (type != nullptr) {
172  for (int i = 0; i < type->fields_size(); ++i) {
173  const google::protobuf::Field& field = type->fields(i);
174  if (field.json_name() == json_name) {
175  return &field;
176  }
177  }
178  }
179  return nullptr;
180 }
181 
184  if (type != nullptr) {
185  for (int i = 0; i < type->fields_size(); ++i) {
186  const google::protobuf::Field& field = type->fields(i);
187  if (field.number() == number) {
188  return &field;
189  }
190  }
191  }
192  return nullptr;
193 }
194 
196  const google::protobuf::Enum* enum_type, StringPiece enum_name) {
197  if (enum_type != nullptr) {
198  for (int i = 0; i < enum_type->enumvalue_size(); ++i) {
199  const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i);
200  if (enum_value.name() == enum_name) {
201  return &enum_value;
202  }
203  }
204  }
205  return nullptr;
206 }
207 
210  if (enum_type != nullptr) {
211  for (int i = 0; i < enum_type->enumvalue_size(); ++i) {
212  const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i);
213  if (enum_value.number() == value) {
214  return &enum_value;
215  }
216  }
217  }
218  return nullptr;
219 }
220 
222  const google::protobuf::Enum* enum_type, StringPiece enum_name) {
223  if (enum_type != nullptr) {
224  for (int i = 0; i < enum_type->enumvalue_size(); ++i) {
225  const google::protobuf::EnumValue& enum_value = enum_type->enumvalue(i);
226  std::string enum_name_without_underscore = enum_value.name();
227 
228  // Remove underscore from the name.
229  enum_name_without_underscore.erase(
230  std::remove(enum_name_without_underscore.begin(),
231  enum_name_without_underscore.end(), '_'),
232  enum_name_without_underscore.end());
233  // Make the name uppercase.
234  for (std::string::iterator it = enum_name_without_underscore.begin();
235  it != enum_name_without_underscore.end(); ++it) {
236  *it = ascii_toupper(*it);
237  }
238 
239  if (enum_name_without_underscore == enum_name) {
240  return &enum_value;
241  }
242  }
243  }
244  return nullptr;
245 }
246 
248  std::string input_string(input);
249  std::transform(input_string.begin(), input_string.end(), input_string.begin(),
250  ::tolower);
251  return ToCamelCase(input_string);
252 }
253 
254 std::string ToCamelCase(StringPiece input) {
255  bool capitalize_next = false;
256  bool was_cap = true;
257  bool is_cap = false;
258  bool first_word = true;
260  result.reserve(input.size());
261 
262  for (size_t i = 0; i < input.size(); ++i, was_cap = is_cap) {
263  is_cap = ascii_isupper(input[i]);
264  if (input[i] == '_') {
265  capitalize_next = true;
266  if (!result.empty()) first_word = false;
267  continue;
268  } else if (first_word) {
269  // Consider when the current character B is capitalized,
270  // first word ends when:
271  // 1) following a lowercase: "...aB..."
272  // 2) followed by a lowercase: "...ABc..."
273  if (!result.empty() && is_cap &&
274  (!was_cap ||
275  (i + 1 < input.size() && ascii_islower(input[i + 1])))) {
276  first_word = false;
277  result.push_back(input[i]);
278  } else {
279  result.push_back(ascii_tolower(input[i]));
280  continue;
281  }
282  } else if (capitalize_next) {
283  capitalize_next = false;
284  if (ascii_islower(input[i])) {
285  result.push_back(ascii_toupper(input[i]));
286  continue;
287  } else {
288  result.push_back(input[i]);
289  continue;
290  }
291  } else {
292  result.push_back(ascii_tolower(input[i]));
293  }
294  }
295  return result;
296 }
297 
298 std::string ToSnakeCase(StringPiece input) {
299  bool was_not_underscore = false; // Initialize to false for case 1 (below)
300  bool was_not_cap = false;
302  result.reserve(input.size() << 1);
303 
304  for (size_t i = 0; i < input.size(); ++i) {
305  if (ascii_isupper(input[i])) {
306  // Consider when the current character B is capitalized:
307  // 1) At beginning of input: "B..." => "b..."
308  // (e.g. "Biscuit" => "biscuit")
309  // 2) Following a lowercase: "...aB..." => "...a_b..."
310  // (e.g. "gBike" => "g_bike")
311  // 3) At the end of input: "...AB" => "...ab"
312  // (e.g. "GoogleLAB" => "google_lab")
313  // 4) Followed by a lowercase: "...ABc..." => "...a_bc..."
314  // (e.g. "GBike" => "g_bike")
315  if (was_not_underscore && // case 1 out
316  (was_not_cap || // case 2 in, case 3 out
317  (i + 1 < input.size() && // case 3 out
318  ascii_islower(input[i + 1])))) { // case 4 in
319  // We add an underscore for case 2 and case 4.
320  result.push_back('_');
321  }
322  result.push_back(ascii_tolower(input[i]));
323  was_not_underscore = true;
324  was_not_cap = false;
325  } else {
326  result.push_back(input[i]);
327  was_not_underscore = input[i] != '_';
328  was_not_cap = true;
329  }
330  }
331  return result;
332 }
333 
334 std::set<std::string>* well_known_types_ = nullptr;
336 const char* well_known_types_name_array_[] = {
337  "google.protobuf.Timestamp", "google.protobuf.Duration",
338  "google.protobuf.DoubleValue", "google.protobuf.FloatValue",
339  "google.protobuf.Int64Value", "google.protobuf.UInt64Value",
340  "google.protobuf.Int32Value", "google.protobuf.UInt32Value",
341  "google.protobuf.BoolValue", "google.protobuf.StringValue",
342  "google.protobuf.BytesValue", "google.protobuf.FieldMask"};
343 
344 void DeleteWellKnownTypes() { delete well_known_types_; }
345 
346 void InitWellKnownTypes() {
347  well_known_types_ = new std::set<std::string>;
348  for (int i = 0; i < GOOGLE_ARRAYSIZE(well_known_types_name_array_); ++i) {
350  }
352 }
353 
358 }
359 
360 bool IsValidBoolString(StringPiece bool_string) {
361  return bool_string == "true" || bool_string == "false" ||
362  bool_string == "1" || bool_string == "0";
363 }
364 
366  const google::protobuf::Type& type) {
367  return field.cardinality() == google::protobuf::Field::CARDINALITY_REPEATED &&
368  (GetBoolOptionOrDefault(type.options(), "map_entry", false) ||
369  GetBoolOptionOrDefault(type.options(),
370  "google.protobuf.MessageOptions.map_entry",
371  false));
372 }
373 
375  return GetBoolOptionOrDefault(type.options(), "message_set_wire_format",
376  false) ||
378  type.options(),
379  "google.protobuf.MessageOptions.message_set_wire_format", false);
380 }
381 
383  if (value == std::numeric_limits<double>::infinity()) return "Infinity";
384  if (value == -std::numeric_limits<double>::infinity()) return "-Infinity";
385  if (std::isnan(value)) return "NaN";
386 
387  return SimpleDtoa(value);
388 }
389 
391  if (std::isfinite(value)) return SimpleFtoa(value);
392  return DoubleAsString(value);
393 }
394 
395 bool SafeStrToFloat(StringPiece str, float* value) {
396  double double_value;
397  if (!safe_strtod(str, &double_value)) {
398  return false;
399  }
400 
401  if (std::isinf(double_value) || std::isnan(double_value)) return false;
402 
403  // Fail if the value is not representable in float.
404  if (double_value > std::numeric_limits<float>::max() ||
405  double_value < -std::numeric_limits<float>::max()) {
406  return false;
407  }
408 
409  *value = static_cast<float>(double_value);
410  return true;
411 }
412 
413 } // namespace converter
414 } // namespace util
415 } // namespace protobuf
416 } // namespace google
xds_interop_client.str
str
Definition: xds_interop_client.py:487
Any
struct Any Any
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:633
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
Type
struct Type Type
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:673
google::protobuf::util::converter::well_known_types_name_array_
const char * well_known_types_name_array_[]
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:331
google::protobuf::RepeatedPtrField
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h:62
regen-readme.it
it
Definition: regen-readme.py:15
google::protobuf::value
const Descriptor::ReservedRange value
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1954
google::protobuf::util::converter::FindJsonFieldInTypeOrNull
const google::protobuf::Field * FindJsonFieldInTypeOrNull(const google::protobuf::Type *type, StringPiece json_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:165
google::protobuf::util::converter::ToCamelCase
std::string ToCamelCase(const StringPiece input)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:250
google::protobuf::util::converter::IsWellKnownType
bool IsWellKnownType(const std::string &type_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:349
google::protobuf::Enum
google::protobuf::ContainsKey
bool ContainsKey(const Collection &collection, const Key &key)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/map_util.h:239
google::protobuf::util::converter::GetTypeWithoutUrl
const StringPiece GetTypeWithoutUrl(StringPiece type_url)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:124
DoubleValue
struct DoubleValue DoubleValue
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:639
tests.google.protobuf.internal.message_test.isnan
def isnan(val)
Definition: bloaty/third_party/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/message_test.py:65
options
double_dict options[]
Definition: capstone_test.c:55
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf::safe_strtod
bool safe_strtod(const char *str, double *value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc:1354
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
make_cmakelists.converter
converter
Definition: make_cmakelists.py:317
absl::FormatConversionChar::s
@ s
google::protobuf::util::converter::SafeStrToFloat
bool SafeStrToFloat(StringPiece str, float *value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:391
google::protobuf::ascii_tolower
char ascii_tolower(char c)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:94
google::protobuf::util::converter::ToSnakeCase
std::string ToSnakeCase(StringPiece input)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:293
iterator
const typedef MCPhysReg * iterator
Definition: MCRegisterInfo.h:27
google::protobuf::util::converter::GetInt64FromAny
int64 GetInt64FromAny(const google::protobuf::Any &any)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:106
T
#define T(upbtypeconst, upbtype, ctype, default_value)
google::protobuf::EnumValue
google::protobuf::StrCat
string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc:1482
google::protobuf.internal::OnShutdown
void OnShutdown(void(*func)())
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common.cc:344
google::protobuf::Int64Value
google::protobuf::ascii_isupper
bool ascii_isupper(char c)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:82
absl::call_once
void call_once(absl::once_flag &flag, Callable &&fn, Args &&... args)
Definition: abseil-cpp/absl/base/call_once.h:206
google::protobuf::util::converter::IsMessageSetWireFormat
bool IsMessageSetWireFormat(const google::protobuf::Type &type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:370
google::protobuf.internal::once_flag
std::once_flag once_flag
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/once.h:43
google::protobuf::util::converter::GetFullTypeWithUrl
const std::string GetFullTypeWithUrl(StringPiece simple_type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:136
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
max
int max
Definition: bloaty/third_party/zlib/examples/enough.c:170
google::protobuf::util::converter::GetInt64OptionOrDefault
int64 GetInt64OptionOrDefault(const RepeatedPtrField< google::protobuf::Option > &options, const std::string &option_name, int64 default_value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:63
google::protobuf::util::converter::kTypeUrlSize
static const int64 kTypeUrlSize
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.h:56
google::protobuf::util::converter::well_known_types_
std::set< std::string > * well_known_types_
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:329
google::protobuf::StringPiece
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h:180
google::protobuf::util::converter::InitWellKnownTypes
void InitWellKnownTypes()
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:341
google::protobuf::SimpleFtoa
string SimpleFtoa(float value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc:1226
google::protobuf::util::converter::GetDoubleFromAny
double GetDoubleFromAny(const google::protobuf::Any &any)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:112
google::protobuf::util::converter::IsMap
bool IsMap(const google::protobuf::Field &field, const google::protobuf::Type &type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:360
number
int32_t number
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:850
google::protobuf::util::converter::FindOptionOrNull
const google::protobuf::Option * FindOptionOrNull(const RepeatedPtrField< google::protobuf::Option > &options, const std::string &option_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:140
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
google::protobuf::util::converter::FindEnumValueByNumberOrNull
const google::protobuf::EnumValue * FindEnumValueByNumberOrNull(const google::protobuf::Enum *enum_type, int32 value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:204
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
google::protobuf::util::converter::GetDoubleOptionOrDefault
double GetDoubleOptionOrDefault(const RepeatedPtrField< google::protobuf::Option > &options, const std::string &option_name, double default_value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:73
google::protobuf::util::converter::EnumValueNameToLowerCamelCase
std::string EnumValueNameToLowerCamelCase(const StringPiece input)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:243
setup.idx
idx
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:197
google::protobuf::util::converter::kTypeServiceBaseUrl
const char kTypeServiceBaseUrl[]
Definition: third_party/bloaty/third_party/protobuf/src/google/protobuf/util/internal/constants.h:43
google::protobuf::util::converter::GetStringFromAny
std::string GetStringFromAny(const google::protobuf::Any &any)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:118
Field
struct Field Field
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:647
google::protobuf::util::converter::DoubleAsString
std::string DoubleAsString(double value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:378
google::protobuf::util::converter::FindEnumValueByNameWithoutUnderscoreOrNull
const google::protobuf::EnumValue * FindEnumValueByNameWithoutUnderscoreOrNull(const google::protobuf::Enum *enum_type, StringPiece enum_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:217
google::protobuf::util::converter::FindFieldInTypeByNumberOrNull
const google::protobuf::Field * FindFieldInTypeByNumberOrNull(const google::protobuf::Type *type, int32 number)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:178
google::protobuf::SimpleDtoa
string SimpleDtoa(double value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.cc:1221
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
google::protobuf::util::converter::GetStringOptionOrDefault
std::string GetStringOptionOrDefault(const RepeatedPtrField< google::protobuf::Option > &options, const std::string &option_name, const std::string &default_value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:83
google::protobuf::util::converter::FindEnumValueByNameOrNull
const google::protobuf::EnumValue * FindEnumValueByNameOrNull(const google::protobuf::Enum *enum_type, StringPiece enum_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:191
google::protobuf::util::converter::ParseFromAny
void ParseFromAny(const std::string &data, T *result)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:94
google::protobuf::ascii_islower
bool ascii_islower(char c)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:86
google::protobuf::util::converter::GetBoolOptionOrDefault
bool GetBoolOptionOrDefault(const RepeatedPtrField< google::protobuf::Option > &options, const std::string &option_name, bool default_value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:53
GOOGLE_ARRAYSIZE
#define GOOGLE_ARRAYSIZE(a)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/macros.h:88
tests.google.protobuf.internal.message_test.isinf
def isinf(val)
Definition: bloaty/third_party/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/message_test.py:68
google::protobuf::ascii_toupper
char ascii_toupper(char c)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:90
BoolValue
struct BoolValue BoolValue
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:635
type_url
string * type_url
Definition: bloaty/third_party/protobuf/conformance/conformance_cpp.cc:72
google::protobuf::util::converter::well_known_types_init_
PROTOBUF_NAMESPACE_ID::internal::once_flag well_known_types_init_
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:330
StringValue
struct StringValue StringValue
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:669
google::protobuf::util::converter::FindFieldInTypeOrNull
const google::protobuf::Field * FindFieldInTypeOrNull(const google::protobuf::Type *type, StringPiece field_name)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:152
input
std::string input
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:197
google::protobuf::Option
google::protobuf::util::converter::GetBoolFromAny
bool GetBoolFromAny(const google::protobuf::Any &any)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:100
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
google::protobuf::util::converter::FloatAsString
std::string FloatAsString(float value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:386
isfinite
#define isfinite
Definition: bloaty/third_party/protobuf/conformance/third_party/jsoncpp/jsoncpp.cpp:4014
google::protobuf::util::converter::DeleteWellKnownTypes
void DeleteWellKnownTypes()
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:339
int32_t
signed int int32_t
Definition: stdint-msvc2008.h:77
phone_pb2.enum_type
enum_type
Definition: phone_pb2.py:198
google::protobuf::util::converter::IsValidBoolString
bool IsValidBoolString(const std::string &bool_string)
Definition: bloaty/third_party/protobuf/src/google/protobuf/util/internal/utility.cc:355
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
type_name
static const char * type_name(int type)
Definition: adig.c:889


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:49