353 lines
13 KiB
Dart
353 lines
13 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// This code was generated by ObjectBox. To update it run the generator again
|
|
// with `dart run build_runner build`.
|
|
// See also https://docs.objectbox.io/getting-started#generate-objectbox-code
|
|
|
|
// ignore_for_file: camel_case_types, depend_on_referenced_packages
|
|
// coverage:ignore-file
|
|
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:flat_buffers/flat_buffers.dart' as fb;
|
|
import 'package:objectbox/internal.dart'
|
|
as obx_int; // generated code can access "internal" functionality
|
|
import 'package:objectbox/objectbox.dart' as obx;
|
|
import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart';
|
|
|
|
import 'xiao_connector/models/capture_box.dart';
|
|
import 'xiao_connector/models/capture_point.dart';
|
|
|
|
export 'package:objectbox/objectbox.dart'; // so that callers only have to import this file
|
|
|
|
final _entities = <obx_int.ModelEntity>[
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(1, 8883777039160106085),
|
|
name: 'CapturePoint',
|
|
lastPropertyId: const obx_int.IdUid(28, 5600095333294587898),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 7031141970833098443),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 1),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 9089711773119462722),
|
|
name: 'type',
|
|
type: 9,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(12, 8018734828546727200),
|
|
name: 'uuid',
|
|
type: 9,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(21, 5571567596004635004),
|
|
name: 'rotationX',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(22, 128950109858162458),
|
|
name: 'rotationY',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(23, 572745053585623035),
|
|
name: 'rotationZ',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(24, 174662964807733060),
|
|
name: 'accelerationX',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(25, 2607558191101966289),
|
|
name: 'accelerationY',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(26, 8078744267935466967),
|
|
name: 'accelerationZ',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(27, 2235290443011784871),
|
|
name: 'millisecondsSinceEpochReceived',
|
|
type: 6,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(28, 5600095333294587898),
|
|
name: 'millisecondsSinceEpochSend',
|
|
type: 6,
|
|
flags: 0)
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[]),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(2, 1642885530071590702),
|
|
name: 'CaptureBox',
|
|
lastPropertyId: const obx_int.IdUid(4, 5477306218303066701),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 6772033063452157797),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 1),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 6118609604439630810),
|
|
name: 'type',
|
|
type: 9,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(3, 4134744801341910087),
|
|
name: 'uuid',
|
|
type: 9,
|
|
flags: 0),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(4, 5477306218303066701),
|
|
name: 'startTime',
|
|
type: 10,
|
|
flags: 0)
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[])
|
|
];
|
|
|
|
/// Shortcut for [obx.Store.new] that passes [getObjectBoxModel] and for Flutter
|
|
/// apps by default a [directory] using `defaultStoreDirectory()` from the
|
|
/// ObjectBox Flutter library.
|
|
///
|
|
/// Note: for desktop apps it is recommended to specify a unique [directory].
|
|
///
|
|
/// See [obx.Store.new] for an explanation of all parameters.
|
|
///
|
|
/// For Flutter apps, also calls `loadObjectBoxLibraryAndroidCompat()` from
|
|
/// the ObjectBox Flutter library to fix loading the native ObjectBox library
|
|
/// on Android 6 and older.
|
|
Future<obx.Store> openStore(
|
|
{String? directory,
|
|
int? maxDBSizeInKB,
|
|
int? maxDataSizeInKB,
|
|
int? fileMode,
|
|
int? maxReaders,
|
|
bool queriesCaseSensitiveDefault = true,
|
|
String? macosApplicationGroup}) async {
|
|
await loadObjectBoxLibraryAndroidCompat();
|
|
return obx.Store(getObjectBoxModel(),
|
|
directory: directory ?? (await defaultStoreDirectory()).path,
|
|
maxDBSizeInKB: maxDBSizeInKB,
|
|
maxDataSizeInKB: maxDataSizeInKB,
|
|
fileMode: fileMode,
|
|
maxReaders: maxReaders,
|
|
queriesCaseSensitiveDefault: queriesCaseSensitiveDefault,
|
|
macosApplicationGroup: macosApplicationGroup);
|
|
}
|
|
|
|
/// Returns the ObjectBox model definition for this project for use with
|
|
/// [obx.Store.new].
|
|
obx_int.ModelDefinition getObjectBoxModel() {
|
|
final model = obx_int.ModelInfo(
|
|
entities: _entities,
|
|
lastEntityId: const obx_int.IdUid(2, 1642885530071590702),
|
|
lastIndexId: const obx_int.IdUid(0, 0),
|
|
lastRelationId: const obx_int.IdUid(0, 0),
|
|
lastSequenceId: const obx_int.IdUid(0, 0),
|
|
retiredEntityUids: const [],
|
|
retiredIndexUids: const [],
|
|
retiredPropertyUids: const [
|
|
5928562934131159642,
|
|
5591187076567204697,
|
|
595530508372810754,
|
|
376663189826498742,
|
|
2249450669900993772,
|
|
3338488084769147616,
|
|
6118432389289072923,
|
|
652072338599943564,
|
|
4974899424217069697,
|
|
6174239378189558256,
|
|
890878501153569237,
|
|
1635504337236403097,
|
|
3739937748546759727,
|
|
1440167199258268261,
|
|
90858017595682556,
|
|
8864904344725714676,
|
|
6079624305294726236
|
|
],
|
|
retiredRelationUids: const [],
|
|
modelVersion: 5,
|
|
modelVersionParserMinimum: 5,
|
|
version: 1);
|
|
|
|
final bindings = <Type, obx_int.EntityDefinition>{
|
|
CapturePoint: obx_int.EntityDefinition<CapturePoint>(
|
|
model: _entities[0],
|
|
toOneRelations: (CapturePoint object) => [],
|
|
toManyRelations: (CapturePoint object) => {},
|
|
getId: (CapturePoint object) => object.id,
|
|
setId: (CapturePoint object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (CapturePoint object, fb.Builder fbb) {
|
|
final typeOffset = fbb.writeString(object.type);
|
|
final uuidOffset = fbb.writeString(object.uuid);
|
|
fbb.startTable(29);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(1, typeOffset);
|
|
fbb.addOffset(11, uuidOffset);
|
|
fbb.addInt64(20, object.rotationX);
|
|
fbb.addInt64(21, object.rotationY);
|
|
fbb.addInt64(22, object.rotationZ);
|
|
fbb.addInt64(23, object.accelerationX);
|
|
fbb.addInt64(24, object.accelerationY);
|
|
fbb.addInt64(25, object.accelerationZ);
|
|
fbb.addInt64(26, object.millisecondsSinceEpochReceived);
|
|
fbb.addInt64(27, object.millisecondsSinceEpochSend);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final typeParam = const fb.StringReader(asciiOptimization: true)
|
|
.vTableGet(buffer, rootOffset, 6, '');
|
|
final uuidParam = const fb.StringReader(asciiOptimization: true)
|
|
.vTableGet(buffer, rootOffset, 26, '');
|
|
final rotationXParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 44, 0);
|
|
final rotationYParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 46, 0);
|
|
final rotationZParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 48, 0);
|
|
final accelerationXParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 50, 0);
|
|
final accelerationYParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 52, 0);
|
|
final accelerationZParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 54, 0);
|
|
final millisecondsSinceEpochReceivedParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 56, 0);
|
|
final millisecondsSinceEpochSendParam =
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 58, 0);
|
|
final object = CapturePoint(
|
|
type: typeParam,
|
|
uuid: uuidParam,
|
|
rotationX: rotationXParam,
|
|
rotationY: rotationYParam,
|
|
rotationZ: rotationZParam,
|
|
accelerationX: accelerationXParam,
|
|
accelerationY: accelerationYParam,
|
|
accelerationZ: accelerationZParam,
|
|
millisecondsSinceEpochReceived:
|
|
millisecondsSinceEpochReceivedParam,
|
|
millisecondsSinceEpochSend: millisecondsSinceEpochSendParam)
|
|
..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
|
|
|
|
return object;
|
|
}),
|
|
CaptureBox: obx_int.EntityDefinition<CaptureBox>(
|
|
model: _entities[1],
|
|
toOneRelations: (CaptureBox object) => [],
|
|
toManyRelations: (CaptureBox object) => {},
|
|
getId: (CaptureBox object) => object.id,
|
|
setId: (CaptureBox object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (CaptureBox object, fb.Builder fbb) {
|
|
final typeOffset = fbb.writeString(object.type);
|
|
final uuidOffset = fbb.writeString(object.uuid);
|
|
fbb.startTable(5);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(1, typeOffset);
|
|
fbb.addOffset(2, uuidOffset);
|
|
fbb.addInt64(3, object.startTime.millisecondsSinceEpoch);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final typeParam = const fb.StringReader(asciiOptimization: true)
|
|
.vTableGet(buffer, rootOffset, 6, '');
|
|
final uuidParam = const fb.StringReader(asciiOptimization: true)
|
|
.vTableGet(buffer, rootOffset, 8, '');
|
|
final startTimeParam = DateTime.fromMillisecondsSinceEpoch(
|
|
const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0));
|
|
final object = CaptureBox(
|
|
type: typeParam, uuid: uuidParam, startTime: startTimeParam)
|
|
..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
|
|
|
|
return object;
|
|
})
|
|
};
|
|
|
|
return obx_int.ModelDefinition(model, bindings);
|
|
}
|
|
|
|
/// [CapturePoint] entity fields to define ObjectBox queries.
|
|
class CapturePoint_ {
|
|
/// See [CapturePoint.id].
|
|
static final id =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[0]);
|
|
|
|
/// See [CapturePoint.type].
|
|
static final type =
|
|
obx.QueryStringProperty<CapturePoint>(_entities[0].properties[1]);
|
|
|
|
/// See [CapturePoint.uuid].
|
|
static final uuid =
|
|
obx.QueryStringProperty<CapturePoint>(_entities[0].properties[2]);
|
|
|
|
/// See [CapturePoint.rotationX].
|
|
static final rotationX =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[3]);
|
|
|
|
/// See [CapturePoint.rotationY].
|
|
static final rotationY =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[4]);
|
|
|
|
/// See [CapturePoint.rotationZ].
|
|
static final rotationZ =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[5]);
|
|
|
|
/// See [CapturePoint.accelerationX].
|
|
static final accelerationX =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[6]);
|
|
|
|
/// See [CapturePoint.accelerationY].
|
|
static final accelerationY =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[7]);
|
|
|
|
/// See [CapturePoint.accelerationZ].
|
|
static final accelerationZ =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[8]);
|
|
|
|
/// See [CapturePoint.millisecondsSinceEpochReceived].
|
|
static final millisecondsSinceEpochReceived =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[9]);
|
|
|
|
/// See [CapturePoint.millisecondsSinceEpochSend].
|
|
static final millisecondsSinceEpochSend =
|
|
obx.QueryIntegerProperty<CapturePoint>(_entities[0].properties[10]);
|
|
}
|
|
|
|
/// [CaptureBox] entity fields to define ObjectBox queries.
|
|
class CaptureBox_ {
|
|
/// See [CaptureBox.id].
|
|
static final id =
|
|
obx.QueryIntegerProperty<CaptureBox>(_entities[1].properties[0]);
|
|
|
|
/// See [CaptureBox.type].
|
|
static final type =
|
|
obx.QueryStringProperty<CaptureBox>(_entities[1].properties[1]);
|
|
|
|
/// See [CaptureBox.uuid].
|
|
static final uuid =
|
|
obx.QueryStringProperty<CaptureBox>(_entities[1].properties[2]);
|
|
|
|
/// See [CaptureBox.startTime].
|
|
static final startTime =
|
|
obx.QueryDateProperty<CaptureBox>(_entities[1].properties[3]);
|
|
}
|