Revamping the FlatBuffers docs.

Adding an API reference for the supported languages.

General docs cleanup, including a new `tutorial` section that
supports all of the supported languages.

Added samples for each supported language to mirror the new
tutorial page.

Cleaned up all the links by making them `@ref` style links,
instead of referencing the names of the generated `.html` files.

Removed all generated files that were unnecessarily committed.

Also fixed the C# tests (two were failing due to a missing file).

Bug: b/25801305

Tested: Tested all samples on Ubuntu, Mac, and Android. Docs were
generated using doxygen and viewed on Chrome.

Change-Id: I2acaba6e332a15ae2deff5f26a4a25da7bd2c954
This commit is contained in:
Mark Klara
2015-12-03 20:30:54 -08:00
parent d75d29e2fe
commit 69a31b807a
115 changed files with 5537 additions and 5917 deletions

View File

@@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <android/log.h>
#include "android_native_app_glue.h"
#include "animal_generated.h"
#include "flatbuffers/flatbuffers.h"
#include "animal_generated.h" // Includes "flatbuffers/flatbuffers.h".
void android_main(android_app *app) {
app_dummy();
@@ -24,5 +25,19 @@ void android_main(android_app *app) {
auto sound = builder.CreateString("Bark");
auto animal_buffer = sample::CreateAnimal(builder, name, sound);
builder.Finish(animal_buffer);
}
// We now have a FlatBuffer that can be stored on disk or sent over a network.
// ...Code to store on disk or send over a network goes here...
// Instead, we're going to access it immediately, as if we just recieved this.
auto animal = sample::GetAnimal(builder.GetBufferPointer());
assert(animal->name()->str() == "Dog");
assert(animal->sound()->str() == "Bark");
(void)animal; // To silence "Unused Variable" warnings.
__android_log_print(ANDROID_LOG_INFO, "FlatBufferSample",
"FlatBuffer successfully created and verified.");
}