diff options
author | Wouter van Oortmerssen <wvo@google.com> | 2014-07-17 15:12:37 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <wvo@google.com> | 2014-07-21 16:40:39 -0700 |
commit | 127d35085a22cb33034f608ee21d65a655d1582c (patch) | |
tree | 67bc082696afdc7e3a9c7743c115165a0b5f2fa1 /docs | |
parent | bd86bf60ecd1108947cf3c9b60d630b00b4eab5b (diff) | |
download | flatbuffers-127d35085a22cb33034f608ee21d65a655d1582c.tar.gz flatbuffers-127d35085a22cb33034f608ee21d65a655d1582c.tar.bz2 flatbuffers-127d35085a22cb33034f608ee21d65a655d1582c.zip |
Added a `bit_flags` attribute to enum declarations that 1<<N every value.
Change-Id: Ib9ec0cb3ddec60b1ca124eaf815fb1ae0cc53e1c
Tested: on Windows and Linux
Bug: 16186562
Diffstat (limited to 'docs')
-rw-r--r-- | docs/html/md__schemas.html | 1 | ||||
-rwxr-xr-x | docs/source/Schemas.md | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/docs/html/md__schemas.html b/docs/html/md__schemas.html index 6f1c6f61..85381e7f 100644 --- a/docs/html/md__schemas.html +++ b/docs/html/md__schemas.html @@ -123,6 +123,7 @@ root_type Monster; <li><code>deprecated</code> (on a field): do not generate accessors for this field anymore, code should stop using this data.</li> <li><code>original_order</code> (on a table): since elements in a table do not need to be stored in any particular order, they are often optimized for space by sorting them to size. This attribute stops that from happening.</li> <li><code>force_align: size</code> (on a struct): force the alignment of this struct to be something higher than what it is naturally aligned to. Causes these structs to be aligned to that amount inside a buffer, IF that buffer is allocated with that alignment (which is not necessarily the case for buffers accessed directly inside a <code>FlatBufferBuilder</code>).</li> +<li><code>bit_flags</code> (on an enum): the values of this field indicate bits, meaning that any value N specified in the schema will end up representing 1<<N, or if you don't specify values at all, you'll get the sequence 1, 2, 4, 8, ...</li> </ul> <h2>Gotchas</h2> <h3>Schemas and version control</h3> diff --git a/docs/source/Schemas.md b/docs/source/Schemas.md index debab679..4a02179d 100755 --- a/docs/source/Schemas.md +++ b/docs/source/Schemas.md @@ -188,6 +188,10 @@ Current understood attributes: these structs to be aligned to that amount inside a buffer, IF that buffer is allocated with that alignment (which is not necessarily the case for buffers accessed directly inside a `FlatBufferBuilder`). +- `bit_flags` (on an enum): the values of this field indicate bits, + meaning that any value N specified in the schema will end up + representing 1<<N, or if you don't specify values at all, you'll get + the sequence 1, 2, 4, 8, ... ## Gotchas |