Files
flatbuffers/tests/monster_test.fbs
Wouter van Oortmerssen a0b6ffc25b Add buffer verification functionality to FlatBuffers
Bug: 15732628
Change-Id: I0b7cb65982d6b8957d5a899cca7d2b5d2ef53206
Tested: On Windows, OS X and Linux
2014-07-01 17:52:16 -07:00

37 lines
676 B
Plaintext
Executable File

// example IDL file
namespace MyGame.Example;
enum Color:byte { Red = 0, Green, Blue = 2 }
union Any { Monster } // TODO: add more elements
struct Test { a:short; b:byte; }
struct Vec3 (force_align: 16) {
x:float;
y:float;
z:float;
test1:double;
test2:byte;
test3:Test;
}
table Monster {
pos:Vec3;
mana:short = 150;
hp:short = 100;
name:string;
friendly:bool = false (deprecated, priority: 1);
inventory:[ubyte];
/// an example documentation comment: this will end up in the generated code
/// multiline too
color:Color = Blue;
test:Any;
test4:[Test];
testarrayofstring:[string];
testarrayoftables:[Monster];
}
root_type Monster;