mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 13:37:25 +00:00
* add support for using array of scalar as key field * update cmakelist and test.cpp to include the tests * update bazel rule * address comments * clang format * delete comment * delete comment * address the rest of the commnets * address comments * update naming in test file * format build file * buildifier * make keycomparelessthan call keycomparewithvalue * update to use flatbuffer array instead of raw pointer * clang * format * revert format * revert format * update * run generate_code.py * run code generator * revert changes by generate_code.py * fist run make flatc and then run generate_code.py Co-authored-by: Wen Sun <sunwen@google.com>
22 lines
314 B
Plaintext
22 lines
314 B
Plaintext
namespace keyfield.sample;
|
|
|
|
struct Baz {
|
|
a: [uint8:4] (key); // A fixed-sized array of uint8 as a Key
|
|
b: uint8 ;
|
|
}
|
|
|
|
struct Bar {
|
|
a: [float:3] (key); // A fixed-sized array of float as a Key
|
|
b: uint8;
|
|
}
|
|
|
|
table FooTable {
|
|
a: int;
|
|
b: int;
|
|
c: string (key);
|
|
d: [Baz];
|
|
e: [Bar];
|
|
}
|
|
root_type FooTable;
|
|
|