Go to the documentation of this file.
54 std::map<string, string>* variables) {
59 int part_tag_size = tag_size;
66 string tag_bytes =
StrCat(tag_array[0]);
67 for (
int i = 1;
i < part_tag_size;
i++) {
68 tag_bytes +=
", " +
StrCat(tag_array[
i]);
71 (*variables)[
"tag"] =
StrCat(tag);
72 (*variables)[
"tag_size"] =
StrCat(tag_size);
73 (*variables)[
"tag_bytes"] = tag_bytes;
80 tag_bytes =
StrCat(tag_array[0]);
81 for (
int i = 1;
i < part_tag_size;
i++) {
82 tag_bytes +=
", " +
StrCat(tag_array[
i]);
89 (*variables)[
"access_level"] =
"public";
94 (*variables)[
"name"] =
name();
98 (*variables)[
"number"] =
number();
100 (*variables)[
"name_def_message"] =
101 (*variables)[
"name"] +
"_ = " + (*variables)[
"default_value"];
103 (*variables)[
"name_def_message"] = (*variables)[
"name"] +
"_";
106 (*variables)[
"has_property_check"] =
"Has" + (*variables)[
"property_name"];
107 (*variables)[
"other_has_property_check"] =
"other.Has" + (*variables)[
"property_name"];
108 (*variables)[
"has_not_property_check"] =
"!" + (*variables)[
"has_property_check"];
109 (*variables)[
"other_has_not_property_check"] =
"!" + (*variables)[
"other_has_property_check"];
113 (*variables)[
"has_field_check"] =
"(_hasBits" + hasBitsNumber +
" & " + hasBitsMask +
") != 0";
114 (*variables)[
"set_has_field"] =
"_hasBits" + hasBitsNumber +
" |= " + hasBitsMask;
115 (*variables)[
"clear_has_field"] =
"_hasBits" + hasBitsNumber +
" &= ~" + hasBitsMask;
118 (*variables)[
"has_property_check"] =
119 (*variables)[
"property_name"] +
" != " + (*variables)[
"default_value"];
120 (*variables)[
"other_has_property_check"] =
"other." +
121 (*variables)[
"property_name"] +
" != " + (*variables)[
"default_value"];
126 std::map<string, string>* variables) {
129 (*variables)[
"has_property_check"] =
"Has" +
property_name();
131 (*variables)[
"has_property_check"] =
142 presenceIndex_(presenceIndex) {
166 printer->
Print(
"[global::System.ObsoleteAttribute]\n");
169 printer->
Print(
"[global::System.ObsoleteAttribute]\n");
207 string wrapped_field_type_name =
type_name(wrapped_field);
212 return wrapped_field_type_name;
214 return wrapped_field_type_name +
"?";
237 return "pb::ByteString";
297 for(
int i = 0;
i < text.size();
i++) {
298 if (text[
i] < 0x20 || text[
i] > 0x7e) {
306 if (
descriptor->default_value_string().empty())
309 return "global::System.Encoding.UTF8.GetString(global::System.Convert.FromBase64String(\" +" +
StringToBase64(
descriptor->default_value_string()) +
" +\"))";
313 if (
descriptor->default_value_string().empty())
314 return "pb::ByteString.Empty";
338 if (
value == std::numeric_limits<double>::infinity()) {
339 return "double.PositiveInfinity";
340 }
else if (
value == -std::numeric_limits<double>::infinity()) {
341 return "double.NegativeInfinity";
349 if (
value == std::numeric_limits<float>::infinity()) {
350 return "float.PositiveInfinity";
351 }
else if (
value == -std::numeric_limits<float>::infinity()) {
352 return "float.NegativeInfinity";
int32 default_value_int32() const
std::string GetStringDefaultValueInternal(const FieldDescriptor *descriptor)
void Print(const std::map< std::string, std::string > &variables, const char *text)
const FieldOptions & options() const
string StrCat(const AlphaNum &a, const AlphaNum &b)
void WriteGeneratedCodeAttributes(io::Printer *printer)
std::string StringToBase64(const std::string &input)
virtual void GenerateExtensionCode(io::Printer *printer)
const Descriptor * containing_type() const
bool default_value_bool() const
void SetCommonOneofFieldVariables(std::map< string, string > *variables)
GLsizei const GLchar *const * string
double default_value_double() const
const FieldDescriptor * descriptor_
const std::string & name() const
std::string GetBytesDefaultValueInternal(const FieldDescriptor *descriptor)
bool IsProto2(const FileDescriptor *descriptor)
void AddDeprecatedFlag(io::Printer *printer)
std::map< string, string > variables_
std::string default_value()
const MessageOptions & options() const
std::string GetFieldName(const FieldDescriptor *descriptor)
const FileDescriptor * file() const
void SetCommonFieldVariables(std::map< string, string > *variables)
void AddPublicMemberAttributes(io::Printer *printer)
virtual void GenerateFreezingCode(io::Printer *printer)
#define GOOGLE_LOG(LEVEL)
uint32 default_value_uint32() const
std::string GetPropertyName(const FieldDescriptor *descriptor)
int64 default_value_int64() const
float default_value_float() const
std::string GetClassName(const Descriptor *descriptor)
std::string capitalized_type_name()
const std::string & name() const
bool AllPrintableAscii(const std::string &text)
std::string property_name()
std::string oneof_property_name()
bool IsWrapperType(const FieldDescriptor *descriptor)
uint64 default_value_uint64() const
const Descriptor * message_type() const
static PROTOBUF_ALWAYS_INLINE uint8 * WriteTagToArray(uint32 value, uint8 *target)
const OneofDescriptor * containing_oneof() const
virtual void GenerateCodecCode(io::Printer *printer)
GLsizei const GLfloat * value
std::string UnderscoresToCamelCase(const std::string &input, bool cap_next_letter, bool preserve_period)
const Descriptor * descriptor_
std::string GetEnumValueName(const std::string &enum_name, const std::string &enum_value_name)
FieldGeneratorBase(const FieldDescriptor *descriptor, int presenceIndex, const Options *options)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:49