Add [Dart] support (#4676)
* Add [Dart] support
* fix enum vectors
* Allow for opt out of string interning
* fix comment style, make interning opt in
* remove Offset<T>, prefer int
* avoid creating unnecessary vtable objects
* start work on tests - do not generate builder if struct has 0 fields - add int64
* support reading structs properly
* correctly handle reading vectors of structs, dartfmt
* support structs, fix unnecessary prepares
* fix bool customizations
* undo unintentional removal of file
* docs updates, complete tutorial, bug fix for codegen
* more documentation
* Update docs, add to doxygen file
* update package structure, add samples script/code
* rearrange sample
* Tests
* Add readme for pub
* cleanup package for pub
* update docs for renamed file
* remove custom matcher, use `closeTo` instead
* remove unintentional file
* remove unintended file checkin
* use auto, move method, cleanup
* refactor to ObjectBuilders, add Builders
* Update tests, examples
* Add files missing from previous commit
* documentation and example updates
* Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script
* fix sample for slightly different schema
* Update pubspec.yaml
2018-05-18 18:06:15 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
// ignore_for_file: unused_import, unused_field, unused_local_variable
|
|
|
|
|
|
|
|
library my_game;
|
|
|
|
|
|
|
|
import 'dart:typed_data' show Uint8List;
|
|
|
|
import 'package:flat_buffers/flat_buffers.dart' as fb;
|
|
|
|
|
2018-08-20 18:54:37 +00:00
|
|
|
import 'include_test1_my_game_generated.dart';
|
|
|
|
import 'include_test2_my_game_generated.dart';
|
Add [Dart] support (#4676)
* Add [Dart] support
* fix enum vectors
* Allow for opt out of string interning
* fix comment style, make interning opt in
* remove Offset<T>, prefer int
* avoid creating unnecessary vtable objects
* start work on tests - do not generate builder if struct has 0 fields - add int64
* support reading structs properly
* correctly handle reading vectors of structs, dartfmt
* support structs, fix unnecessary prepares
* fix bool customizations
* undo unintentional removal of file
* docs updates, complete tutorial, bug fix for codegen
* more documentation
* Update docs, add to doxygen file
* update package structure, add samples script/code
* rearrange sample
* Tests
* Add readme for pub
* cleanup package for pub
* update docs for renamed file
* remove custom matcher, use `closeTo` instead
* remove unintentional file
* remove unintended file checkin
* use auto, move method, cleanup
* refactor to ObjectBuilders, add Builders
* Update tests, examples
* Add files missing from previous commit
* documentation and example updates
* Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script
* fix sample for slightly different schema
* Update pubspec.yaml
2018-05-18 18:06:15 +00:00
|
|
|
import './monster_test_my_game.example_generated.dart' as my_game_example;
|
2018-08-20 18:54:37 +00:00
|
|
|
import './monster_test_my_game.example2_generated.dart' as my_game_example2;
|
Add [Dart] support (#4676)
* Add [Dart] support
* fix enum vectors
* Allow for opt out of string interning
* fix comment style, make interning opt in
* remove Offset<T>, prefer int
* avoid creating unnecessary vtable objects
* start work on tests - do not generate builder if struct has 0 fields - add int64
* support reading structs properly
* correctly handle reading vectors of structs, dartfmt
* support structs, fix unnecessary prepares
* fix bool customizations
* undo unintentional removal of file
* docs updates, complete tutorial, bug fix for codegen
* more documentation
* Update docs, add to doxygen file
* update package structure, add samples script/code
* rearrange sample
* Tests
* Add readme for pub
* cleanup package for pub
* update docs for renamed file
* remove custom matcher, use `closeTo` instead
* remove unintentional file
* remove unintended file checkin
* use auto, move method, cleanup
* refactor to ObjectBuilders, add Builders
* Update tests, examples
* Add files missing from previous commit
* documentation and example updates
* Update LICENSE, make dartanalyzer happy, fix minor bugs, get rid of duplicate files, publish script
* fix sample for slightly different schema
* Update pubspec.yaml
2018-05-18 18:06:15 +00:00
|
|
|
|
|
|
|
class InParentNamespace {
|
|
|
|
InParentNamespace._(this._bc, this._bcOffset);
|
|
|
|
factory InParentNamespace(List<int> bytes) {
|
|
|
|
fb.BufferContext rootRef = new fb.BufferContext.fromBytes(bytes);
|
|
|
|
return reader.read(rootRef, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const fb.Reader<InParentNamespace> reader = const _InParentNamespaceReader();
|
|
|
|
|
|
|
|
final fb.BufferContext _bc;
|
|
|
|
final int _bcOffset;
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() {
|
|
|
|
return 'InParentNamespace{}';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class _InParentNamespaceReader extends fb.TableReader<InParentNamespace> {
|
|
|
|
const _InParentNamespaceReader();
|
|
|
|
|
|
|
|
@override
|
|
|
|
InParentNamespace createObject(fb.BufferContext bc, int offset) =>
|
|
|
|
new InParentNamespace._(bc, offset);
|
|
|
|
}
|
|
|
|
|
|
|
|
class InParentNamespaceObjectBuilder extends fb.ObjectBuilder {
|
|
|
|
|
|
|
|
InParentNamespaceObjectBuilder();
|
|
|
|
|
|
|
|
/// Finish building, and store into the [fbBuilder].
|
|
|
|
@override
|
|
|
|
int finish(
|
|
|
|
fb.Builder fbBuilder) {
|
|
|
|
assert(fbBuilder != null);
|
|
|
|
|
|
|
|
fbBuilder.startTable();
|
|
|
|
return fbBuilder.endTable();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Convenience method to serialize to byte list.
|
|
|
|
@override
|
|
|
|
Uint8List toBytes([String fileIdentifier]) {
|
|
|
|
fb.Builder fbBuilder = new fb.Builder();
|
|
|
|
int offset = finish(fbBuilder);
|
|
|
|
return fbBuilder.finish(offset, fileIdentifier);
|
|
|
|
}
|
|
|
|
}
|