Files
flatbuffers/tests/monster_test.fbs
Wouter van Oortmerssen 26a30738a4 Initial commit of the FlatBuffers code.
Change-Id: I4c9f0f722490b374257adb3fec63e44ae93da920
Tested: using VS2010 / Xcode / gcc on Linux.
2014-06-10 13:53:28 -07:00

35 lines
615 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];
}
root_type Monster;