mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 21:37:36 +00:00
Annotated Flatbuffer Binary (#7174)
* Annotated Flatbuffer Binary * Various fixes * Handles old schema * handle multiple missing fields * minor edits * bazel fix, spelling fix, ascii fix
This commit is contained in:
@@ -103,6 +103,11 @@ class FlatCompiler {
|
||||
void Error(const std::string &err, bool usage = true,
|
||||
bool show_exe_name = true) const;
|
||||
|
||||
void AnnotateBinaries(const uint8_t *binary_schema,
|
||||
uint64_t binary_schema_size,
|
||||
const std::string & schema_filename,
|
||||
const std::vector<std::string> &binary_files);
|
||||
|
||||
InitParams params_;
|
||||
};
|
||||
|
||||
|
||||
@@ -279,6 +279,12 @@ T *GetAnyFieldAddressOf(const Struct &st, const reflection::Field &field) {
|
||||
return reinterpret_cast<T *>(st.GetAddressOf(field.offset()));
|
||||
}
|
||||
|
||||
// Loop over all the fields of the provided `object` and call `func` on each one
|
||||
// in increasing order by their field->id(). If `reverse` is true, `func` is
|
||||
// called in descending order
|
||||
void ForAllFields(const reflection::Object *object, bool reverse,
|
||||
std::function<void(const reflection::Field *)> func);
|
||||
|
||||
// ------------------------- SETTERS -------------------------
|
||||
|
||||
// Set any scalar field, if you know its exact type.
|
||||
|
||||
Reference in New Issue
Block a user