Lines Matching full:schema
46 auto &schema = *_schema; in GenNameSpace() local
47 schema += "namespace "; in GenNameSpace()
50 if (it != name_space.components.begin()) schema += "."; in GenNameSpace()
51 schema += *it; in GenNameSpace()
53 schema += ";\n\n"; in GenNameSpace()
56 // Generate a flatbuffer schema from the Parser's internal representation.
75 std::string schema; in GenerateFBS() local
76 schema += "// Generated from " + file_name + ".proto\n\n"; in GenerateFBS()
91 schema += "include \"" + basename + ".fbs\";\n"; in GenerateFBS()
94 if (num_includes) schema += "\n"; in GenerateFBS()
105 GenNameSpace(*enum_def.defined_namespace, &schema, &last_namespace); in GenerateFBS()
106 GenComment(enum_def.doc_comment, &schema, nullptr); in GenerateFBS()
108 schema += "union " + enum_def.name; in GenerateFBS()
110 schema += "enum " + enum_def.name + " : "; in GenerateFBS()
111 schema += GenType(enum_def.underlying_type, true) + " {\n"; in GenerateFBS()
114 GenComment(ev.doc_comment, &schema, nullptr, " "); in GenerateFBS()
116 schema += " " + GenType(ev.union_type) + ",\n"; in GenerateFBS()
118 schema += " " + ev.name + " = " + enum_def.ToString(ev) + ",\n"; in GenerateFBS()
120 schema += "}\n\n"; in GenerateFBS()
129 GenNameSpace(*struct_def.defined_namespace, &schema, &last_namespace); in GenerateFBS()
130 GenComment(struct_def.doc_comment, &schema, nullptr); in GenerateFBS()
131 schema += "table " + struct_def.name + " {\n"; in GenerateFBS()
136 GenComment(field.doc_comment, &schema, nullptr, " "); in GenerateFBS()
137 schema += " " + field.name + ":" + GenType(field.value.type); in GenerateFBS()
138 if (field.value.constant != "0") schema += " = " + field.value.constant; in GenerateFBS()
139 if (field.required) schema += " (required)"; in GenerateFBS()
140 schema += ";\n"; in GenerateFBS()
143 schema += "}\n\n"; in GenerateFBS()
145 return schema; in GenerateFBS()