• Home
  • Raw
  • Download

Lines Matching refs:lang_

154         lang_(GetLangParams(parser_.opts.lang)),  in GeneralGenerator()
210 code += lang_.namespace_ident + namespace_name + lang_.namespace_begin; in SaveType()
213 if (needs_includes) code += lang_.includes; in SaveType()
215 if (!namespace_name.empty()) code += lang_.namespace_end; in SaveType()
216 auto filename = NamespaceDir(ns) + defname + lang_.file_extension; in SaveType()
223 return std::string() + (lang_.language == IDLOptions::kJava in FunctionStart()
248 if (lang_.language == IDLOptions::kCSharp) { in GenTypeBasic()
256 if (lang_.language == IDLOptions::kJava) { in GenTypeBasic()
259 assert(lang_.language == IDLOptions::kCSharp); in GenTypeBasic()
271 return lang_.string_type; in GenTypePointer()
278 if (lang_.language == IDLOptions::kCSharp) return "TTable"; in GenTypePointer()
294 if (lang_.language != IDLOptions::kJava) return type; in DestinationType()
310 if(lang_.language == IDLOptions::kCSharp) { in GenOffsetType()
320 if(lang_.language == IDLOptions::kCSharp) { in GenOffsetConstruct()
328 if(lang_.language == IDLOptions::kCSharp) { in GenVectorOffsetType()
343 if (lang_.language != IDLOptions::kJava) return ""; in DestinationMask()
361 switch (lang_.language) { in DestinationCast()
389 switch (lang_.language) { in SourceCast()
440 if (lang_.language == IDLOptions::kCSharp && in GenDefaultValue()
447 auto longSuffix = lang_.language == IDLOptions::kJava ? "L" : ""; in GenDefaultValue()
453 if (lang_.language != IDLOptions::kJava) in GenDefaultValue()
472 if (lang_.language == IDLOptions::kCSharp) { in GenDefaultValueBasic()
504 GenComment(enum_def.doc_comment, code_ptr, &lang_.comment_config); in GenEnum()
505 code += std::string("public ") + lang_.enum_decl + enum_def.name; in GenEnum()
506 if (lang_.language == IDLOptions::kCSharp) { in GenEnum()
507 code += lang_.inheritance_marker + in GenEnum()
510 code += lang_.open_curly; in GenEnum()
511 if (lang_.language == IDLOptions::kJava) { in GenEnum()
518 GenComment(ev.doc_comment, code_ptr, &lang_.comment_config, " "); in GenEnum()
519 if (lang_.language != IDLOptions::kCSharp) { in GenEnum()
521 code += lang_.const_decl; in GenEnum()
526 code += lang_.enum_separator; in GenEnum()
531 if (lang_.language != IDLOptions::kCSharp) { in GenEnum()
542 code += lang_.const_decl; in GenEnum()
543 code += lang_.string_type; in GenEnum()
554 code += lang_.string_type; in GenEnum()
555 code += " " + MakeCamel("name", lang_.first_camel_upper); in GenEnum()
566 code += (lang_.language != IDLOptions::kJava) ? ";" : ""; in GenEnum()
573 case BASE_TYPE_STRING: return lang_.accessor_prefix + "__string"; in GenGetter()
574 case BASE_TYPE_STRUCT: return lang_.accessor_prefix + "__struct"; in GenGetter()
575 case BASE_TYPE_UNION: return lang_.accessor_prefix + "__union"; in GenGetter()
579 lang_.accessor_prefix + "bb." + FunctionStart('G') + "et"; in GenGetter()
595 lang_.accessor_prefix + "bb." + FunctionStart('P') + "ut"; in GenSetter()
633 code += MakeCamel(field.name, lang_.first_camel_upper); in GenStructArgs()
661 auto argname = nameprefix + MakeCamel(field.name, lang_.first_camel_upper); in GenStructBody()
670 if (lang_.language == IDLOptions::kCSharp) bb_len += ".Length"; in GenByteBufferLength()
678 key_offset += lang_.accessor_prefix_static + "__offset(" + in GenOffsetGetter()
682 key_offset += (lang_.language == IDLOptions::kCSharp ? in GenOffsetGetter()
693 key_getter += "int tableOffset = " + lang_.accessor_prefix_static; in GenLookupKeyGetter()
697 key_getter += "int comp = " + lang_.accessor_prefix_static; in GenLookupKeyGetter()
704 if (lang_.language == IDLOptions::kCSharp) { in GenLookupKeyGetter()
718 auto data_buffer = (lang_.language == IDLOptions::kCSharp) ? in GenKeyGetter()
721 if (lang_.language == IDLOptions::kJava) in GenKeyGetter()
723 key_getter += lang_.accessor_prefix_static; in GenKeyGetter()
727 if (lang_.language == IDLOptions::kJava) in GenKeyGetter()
733 if (lang_.language == IDLOptions::kCSharp) { in GenKeyGetter()
762 GenComment(struct_def.doc_comment, code_ptr, &lang_.comment_config); in GenStruct()
764 if (lang_.language == IDLOptions::kCSharp && in GenStruct()
769 code += lang_.unsubclassable_decl; in GenStruct()
771 code += lang_.accessor_type + struct_def.name; in GenStruct()
772 if (lang_.language == IDLOptions::kCSharp) { in GenStruct()
774 code += lang_.open_curly; in GenStruct()
779 if (lang_.language == IDLOptions::kCSharp) { in GenStruct()
784 code += lang_.inheritance_marker; in GenStruct()
786 code += lang_.open_curly; in GenStruct()
801 code += lang_.set_bb_byteorder; in GenStruct()
803 code += lang_.get_bb_position; in GenStruct()
805 code += lang_.get_bb_position; in GenStruct()
811 code += lang_.bool_type + struct_def.name; in GenStruct()
813 code += lang_.accessor_prefix_static + "__has_identifier(_bb, \""; in GenStruct()
822 code += "{ " + lang_.accessor_prefix + "bb_pos = _i; "; in GenStruct()
823 code += lang_.accessor_prefix + "bb = _bb; }\n"; in GenStruct()
831 GenComment(field.doc_comment, code_ptr, &lang_.comment_config, " "); in GenStruct()
836 if (lang_.language == IDLOptions::kCSharp && in GenStruct()
842 optional = lang_.optional_suffix; in GenStruct()
849 MakeCamel(field.name, lang_.first_camel_upper); in GenStruct()
850 std::string obj = lang_.language == IDLOptions::kCSharp in GenStruct()
856 auto offset_prefix = " { int o = " + lang_.accessor_prefix + "__offset(" + in GenStruct()
862 if (lang_.language != IDLOptions::kCSharp) { in GenStruct()
864 code += MakeCamel(field.name, lang_.first_camel_upper); in GenStruct()
872 if (lang_.language != IDLOptions::kCSharp) { in GenStruct()
874 code += MakeCamel(field.name, lang_.first_camel_upper); in GenStruct()
878 if (lang_.language == IDLOptions::kCSharp) { in GenStruct()
889 if (lang_.language == IDLOptions::kCSharp && in GenStruct()
905 code += lang_.getter_prefix; in GenStruct()
906 member_suffix += lang_.getter_suffix; in GenStruct()
909 code += "(" + lang_.accessor_prefix + "bb_pos + "; in GenStruct()
914 code += "(o + " + lang_.accessor_prefix + "bb_pos)" + dest_mask; in GenStruct()
921 if (lang_.language != IDLOptions::kCSharp) { in GenStruct()
924 code += lang_.getter_prefix; in GenStruct()
925 member_suffix += lang_.getter_suffix; in GenStruct()
928 code += " { return " + obj + ".__assign(" + lang_.accessor_prefix; in GenStruct()
930 code += lang_.accessor_prefix + "bb)"; in GenStruct()
935 ? "o + " + lang_.accessor_prefix + "bb_pos" in GenStruct()
936 : lang_.accessor_prefix + "__indirect(o + " + in GenStruct()
937 lang_.accessor_prefix + "bb_pos)"; in GenStruct()
938 code += ", " + lang_.accessor_prefix + "bb) : null"; in GenStruct()
942 code += lang_.getter_prefix; in GenStruct()
943 member_suffix += lang_.getter_suffix; in GenStruct()
944 code += offset_prefix + getter + "(o + " + lang_.accessor_prefix; in GenStruct()
951 if (lang_.language != IDLOptions::kCSharp) in GenStruct()
956 auto index = lang_.accessor_prefix + "__vector(o) + j * " + in GenStruct()
961 : lang_.accessor_prefix + "__indirect(" + index + ")"; in GenStruct()
962 code += ", " + lang_.accessor_prefix + "bb"; in GenStruct()
973 if (lang_.language == IDLOptions::kCSharp) { in GenStruct()
989 code += " public int " + MakeCamel(field.name, lang_.first_camel_upper); in GenStruct()
991 code += lang_.getter_prefix; in GenStruct()
993 code += lang_.accessor_prefix + "__vector_len(o) : 0; "; in GenStruct()
994 code += lang_.getter_suffix; in GenStruct()
1001 switch (lang_.language) { in GenStruct()
1004 code += MakeCamel(field.name, lang_.first_camel_upper); in GenStruct()
1006 code += lang_.accessor_prefix + "__vector_as_bytebuffer("; in GenStruct()
1015 code += MakeCamel(field.name, lang_.first_camel_upper); in GenStruct()
1017 code += lang_.accessor_prefix + "__vector_as_arraysegment("; in GenStruct()
1032 auto nestedMethodName = MakeCamel(field.name, lang_.first_camel_upper) in GenStruct()
1035 if (lang_.language == IDLOptions::kCSharp) { in GenStruct()
1037 conditional_cast = "(" + nested_type_name + lang_.optional_suffix + ")"; in GenStruct()
1039 if (lang_.language != IDLOptions::kCSharp) { in GenStruct()
1040 code += " public " + nested_type_name + lang_.optional_suffix + " "; in GenStruct()
1046 code += " public " + nested_type_name + lang_.optional_suffix + " "; in GenStruct()
1048 if (lang_.language != IDLOptions::kCSharp) in GenStruct()
1050 code += ") { int o = " + lang_.accessor_prefix + "__offset("; in GenStruct()
1053 code += lang_.accessor_prefix; in GenStruct()
1054 code += "__indirect(" + lang_.accessor_prefix + "__vector(o)), "; in GenStruct()
1055 code += lang_.accessor_prefix + "bb) : null; }\n"; in GenStruct()
1067 auto mutator_prefix = MakeCamel("mutate", lang_.first_camel_upper); in GenStruct()
1074 ? lang_.accessor_prefix + "__vector(o) + j * " + in GenStruct()
1077 ? lang_.accessor_prefix + "bb_pos + " + in GenStruct()
1079 : "o + " + lang_.accessor_prefix + "bb_pos"); in GenStruct()
1084 code += struct_def.fixed ? "void " : lang_.bool_type; in GenStruct()
1091 code += "int o = " + lang_.accessor_prefix + "__offset("; in GenStruct()
1112 "builder." + std::string(lang_.get_fbb_offset)); in GenStruct()
1148 if (lang_.language != IDLOptions::kJava) { in GenStruct()
1205 lang_.language == IDLOptions::kCSharp) { in GenStruct()
1209 if (lang_.language == IDLOptions::kJava) in GenStruct()
1235 if (lang_.language == IDLOptions::kCSharp && in GenStruct()
1273 if (lang_.language == IDLOptions::kCSharp) { in GenStruct()
1283 if (lang_.language == IDLOptions::kJava) { in GenStruct()
1300 code += "\n public static " + struct_def.name + lang_.optional_suffix; in GenStruct()
1306 if (lang_.language == IDLOptions::kJava) in GenStruct()
1313 if (lang_.language == IDLOptions::kCSharp) code += ".Value"; in GenStruct()
1336 code += (lang_.language != IDLOptions::kJava) ? ";" : ""; in GenStruct()
1339 const LanguageParameters& lang_; member in flatbuffers::general::GeneralGenerator