mirror of
https://github.com/hanzoai/zap-es.git
synced 2026-11-02 11:30:48 +00:00
427 lines
15 KiB
TypeScript
427 lines
15 KiB
TypeScript
// This file has been automatically generated by zap-es.
|
|
import * as $ from "zap-es";
|
|
export const _zapFileId = 0xb4dbefd56457c333n;
|
|
export class ListMania extends $.Struct {
|
|
static readonly _zap = {
|
|
displayName: "ListMania",
|
|
id: "d0a988493b63e78b",
|
|
size: new $.ObjectSize(0, 16),
|
|
};
|
|
static _CompositeList: $.ListCtor<ListManiaStruct>;
|
|
_adoptBoolList(value: $.Orphan<$.List<boolean>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownBoolList(): $.Orphan<$.List<boolean>> {
|
|
return $.utils.disown(this.boolList);
|
|
}
|
|
get boolList(): $.List<boolean> {
|
|
return $.utils.getList(0, $.BoolList, this);
|
|
}
|
|
_hasBoolList(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initBoolList(length: number): $.List<boolean> {
|
|
return $.utils.initList(0, $.BoolList, length, this);
|
|
}
|
|
set boolList(value: $.List<boolean>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
_adoptCompositeList(value: $.Orphan<$.List<ListManiaStruct>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(1, this));
|
|
}
|
|
_disownCompositeList(): $.Orphan<$.List<ListManiaStruct>> {
|
|
return $.utils.disown(this.compositeList);
|
|
}
|
|
get compositeList(): $.List<ListManiaStruct> {
|
|
return $.utils.getList(1, ListMania._CompositeList, this);
|
|
}
|
|
_hasCompositeList(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(1, this));
|
|
}
|
|
_initCompositeList(length: number): $.List<ListManiaStruct> {
|
|
return $.utils.initList(1, ListMania._CompositeList, length, this);
|
|
}
|
|
set compositeList(value: $.List<ListManiaStruct>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(1, this));
|
|
}
|
|
_adoptDataList(value: $.Orphan<$.List<$.Data>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(2, this));
|
|
}
|
|
_disownDataList(): $.Orphan<$.List<$.Data>> {
|
|
return $.utils.disown(this.dataList);
|
|
}
|
|
get dataList(): $.List<$.Data> {
|
|
return $.utils.getList(2, $.DataList, this);
|
|
}
|
|
_hasDataList(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(2, this));
|
|
}
|
|
_initDataList(length: number): $.List<$.Data> {
|
|
return $.utils.initList(2, $.DataList, length, this);
|
|
}
|
|
set dataList(value: $.List<$.Data>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(2, this));
|
|
}
|
|
_adoptFloat32List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(3, this));
|
|
}
|
|
_disownFloat32List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.float32List);
|
|
}
|
|
get float32List(): $.List<number> {
|
|
return $.utils.getList(3, $.Float32List, this);
|
|
}
|
|
_hasFloat32List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(3, this));
|
|
}
|
|
_initFloat32List(length: number): $.List<number> {
|
|
return $.utils.initList(3, $.Float32List, length, this);
|
|
}
|
|
set float32List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(3, this));
|
|
}
|
|
_adoptFloat64List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(4, this));
|
|
}
|
|
_disownFloat64List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.float64List);
|
|
}
|
|
get float64List(): $.List<number> {
|
|
return $.utils.getList(4, $.Float64List, this);
|
|
}
|
|
_hasFloat64List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(4, this));
|
|
}
|
|
_initFloat64List(length: number): $.List<number> {
|
|
return $.utils.initList(4, $.Float64List, length, this);
|
|
}
|
|
set float64List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(4, this));
|
|
}
|
|
_adoptInt8List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(5, this));
|
|
}
|
|
_disownInt8List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.int8List);
|
|
}
|
|
get int8List(): $.List<number> {
|
|
return $.utils.getList(5, $.Int8List, this);
|
|
}
|
|
_hasInt8List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(5, this));
|
|
}
|
|
_initInt8List(length: number): $.List<number> {
|
|
return $.utils.initList(5, $.Int8List, length, this);
|
|
}
|
|
set int8List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(5, this));
|
|
}
|
|
_adoptInt16List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(6, this));
|
|
}
|
|
_disownInt16List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.int16List);
|
|
}
|
|
get int16List(): $.List<number> {
|
|
return $.utils.getList(6, $.Int16List, this);
|
|
}
|
|
_hasInt16List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(6, this));
|
|
}
|
|
_initInt16List(length: number): $.List<number> {
|
|
return $.utils.initList(6, $.Int16List, length, this);
|
|
}
|
|
set int16List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(6, this));
|
|
}
|
|
_adoptInt32List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(7, this));
|
|
}
|
|
_disownInt32List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.int32List);
|
|
}
|
|
get int32List(): $.List<number> {
|
|
return $.utils.getList(7, $.Int32List, this);
|
|
}
|
|
_hasInt32List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(7, this));
|
|
}
|
|
_initInt32List(length: number): $.List<number> {
|
|
return $.utils.initList(7, $.Int32List, length, this);
|
|
}
|
|
set int32List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(7, this));
|
|
}
|
|
_adoptInt64List(value: $.Orphan<$.List<bigint>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(8, this));
|
|
}
|
|
_disownInt64List(): $.Orphan<$.List<bigint>> {
|
|
return $.utils.disown(this.int64List);
|
|
}
|
|
get int64List(): $.List<bigint> {
|
|
return $.utils.getList(8, $.Int64List, this);
|
|
}
|
|
_hasInt64List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(8, this));
|
|
}
|
|
_initInt64List(length: number): $.List<bigint> {
|
|
return $.utils.initList(8, $.Int64List, length, this);
|
|
}
|
|
set int64List(value: $.List<bigint>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(8, this));
|
|
}
|
|
_adoptInterfaceList(value: $.Orphan<$.List<ListManiaInterface>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(9, this));
|
|
}
|
|
_disownInterfaceList(): $.Orphan<$.List<ListManiaInterface>> {
|
|
return $.utils.disown(this.interfaceList);
|
|
}
|
|
get interfaceList(): $.List<ListManiaInterface> {
|
|
return $.utils.getList(9, $.InterfaceList, this);
|
|
}
|
|
_hasInterfaceList(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(9, this));
|
|
}
|
|
_initInterfaceList(length: number): $.List<ListManiaInterface> {
|
|
return $.utils.initList(9, $.InterfaceList, length, this);
|
|
}
|
|
set interfaceList(value: $.List<ListManiaInterface>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(9, this));
|
|
}
|
|
_adoptTextList(value: $.Orphan<$.List<string>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(10, this));
|
|
}
|
|
_disownTextList(): $.Orphan<$.List<string>> {
|
|
return $.utils.disown(this.textList);
|
|
}
|
|
get textList(): $.List<string> {
|
|
return $.utils.getList(10, $.TextList, this);
|
|
}
|
|
_hasTextList(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(10, this));
|
|
}
|
|
_initTextList(length: number): $.List<string> {
|
|
return $.utils.initList(10, $.TextList, length, this);
|
|
}
|
|
set textList(value: $.List<string>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(10, this));
|
|
}
|
|
_adoptUint8List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(11, this));
|
|
}
|
|
_disownUint8List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.uint8List);
|
|
}
|
|
get uint8List(): $.List<number> {
|
|
return $.utils.getList(11, $.Uint8List, this);
|
|
}
|
|
_hasUint8List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(11, this));
|
|
}
|
|
_initUint8List(length: number): $.List<number> {
|
|
return $.utils.initList(11, $.Uint8List, length, this);
|
|
}
|
|
set uint8List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(11, this));
|
|
}
|
|
_adoptUint16List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(12, this));
|
|
}
|
|
_disownUint16List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.uint16List);
|
|
}
|
|
get uint16List(): $.List<number> {
|
|
return $.utils.getList(12, $.Uint16List, this);
|
|
}
|
|
_hasUint16List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(12, this));
|
|
}
|
|
_initUint16List(length: number): $.List<number> {
|
|
return $.utils.initList(12, $.Uint16List, length, this);
|
|
}
|
|
set uint16List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(12, this));
|
|
}
|
|
_adoptUint32List(value: $.Orphan<$.List<number>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(13, this));
|
|
}
|
|
_disownUint32List(): $.Orphan<$.List<number>> {
|
|
return $.utils.disown(this.uint32List);
|
|
}
|
|
get uint32List(): $.List<number> {
|
|
return $.utils.getList(13, $.Uint32List, this);
|
|
}
|
|
_hasUint32List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(13, this));
|
|
}
|
|
_initUint32List(length: number): $.List<number> {
|
|
return $.utils.initList(13, $.Uint32List, length, this);
|
|
}
|
|
set uint32List(value: $.List<number>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(13, this));
|
|
}
|
|
_adoptUint64List(value: $.Orphan<$.List<bigint>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(14, this));
|
|
}
|
|
_disownUint64List(): $.Orphan<$.List<bigint>> {
|
|
return $.utils.disown(this.uint64List);
|
|
}
|
|
get uint64List(): $.List<bigint> {
|
|
return $.utils.getList(14, $.Uint64List, this);
|
|
}
|
|
_hasUint64List(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(14, this));
|
|
}
|
|
_initUint64List(length: number): $.List<bigint> {
|
|
return $.utils.initList(14, $.Uint64List, length, this);
|
|
}
|
|
set uint64List(value: $.List<bigint>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(14, this));
|
|
}
|
|
_adoptVoidList(value: $.Orphan<$.List<$.Void>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(15, this));
|
|
}
|
|
_disownVoidList(): $.Orphan<$.List<$.Void>> {
|
|
return $.utils.disown(this.voidList);
|
|
}
|
|
get voidList(): $.List<$.Void> {
|
|
return $.utils.getList(15, $.VoidList, this);
|
|
}
|
|
_hasVoidList(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(15, this));
|
|
}
|
|
_initVoidList(length: number): $.List<$.Void> {
|
|
return $.utils.initList(15, $.VoidList, length, this);
|
|
}
|
|
set voidList(value: $.List<$.Void>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(15, this));
|
|
}
|
|
toString(): string { return "ListMania_" + super.toString(); }
|
|
}
|
|
export class ListManiaInterface_GetListMania$Params extends $.Struct {
|
|
static readonly _zap = {
|
|
displayName: "getListMania$Params",
|
|
id: "f7bf50e8ad110566",
|
|
size: new $.ObjectSize(0, 0),
|
|
};
|
|
toString(): string { return "ListManiaInterface_GetListMania$Params_" + super.toString(); }
|
|
}
|
|
export class ListManiaInterface_GetListMania$Results extends $.Struct {
|
|
static readonly _zap = {
|
|
displayName: "getListMania$Results",
|
|
id: "e89af40dc5417fee",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
_adoptResult(value: $.Orphan<$.List<ListManiaInterface>>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownResult(): $.Orphan<$.List<ListManiaInterface>> {
|
|
return $.utils.disown(this.result);
|
|
}
|
|
get result(): $.List<ListManiaInterface> {
|
|
return $.utils.getList(0, $.InterfaceList, this);
|
|
}
|
|
_hasResult(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initResult(length: number): $.List<ListManiaInterface> {
|
|
return $.utils.initList(0, $.InterfaceList, length, this);
|
|
}
|
|
set result(value: $.List<ListManiaInterface>) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString(): string { return "ListManiaInterface_GetListMania$Results_" + super.toString(); }
|
|
}
|
|
export class ListManiaInterface_GetListMania$Results$Promise {
|
|
pipeline: $.Pipeline<any, any, ListManiaInterface_GetListMania$Results>;
|
|
constructor(pipeline: $.Pipeline<any, any, ListManiaInterface_GetListMania$Results>) {
|
|
this.pipeline = pipeline;
|
|
}
|
|
async promise(): Promise<ListManiaInterface_GetListMania$Results> {
|
|
return await this.pipeline.struct();
|
|
}
|
|
}
|
|
export class ListManiaInterface$Client {
|
|
client: $.Client;
|
|
static readonly interfaceId: bigint = 0x8a94079c3c57204fn;
|
|
constructor(client: $.Client) {
|
|
this.client = client;
|
|
}
|
|
static readonly methods: [
|
|
$.Method<ListManiaInterface_GetListMania$Params, ListManiaInterface_GetListMania$Results>
|
|
] = [
|
|
{
|
|
ParamsClass: ListManiaInterface_GetListMania$Params,
|
|
ResultsClass: ListManiaInterface_GetListMania$Results,
|
|
interfaceId: ListManiaInterface$Client.interfaceId,
|
|
methodId: 0,
|
|
interfaceName: "test/fixtures/list-mania.zap:ListManiaInterface",
|
|
methodName: "getListMania"
|
|
}
|
|
];
|
|
getListMania(paramsFunc?: (params: ListManiaInterface_GetListMania$Params) => void): ListManiaInterface_GetListMania$Results$Promise {
|
|
const answer = this.client.call({
|
|
method: ListManiaInterface$Client.methods[0],
|
|
paramsFunc: paramsFunc
|
|
});
|
|
const pipeline = new $.Pipeline(ListManiaInterface_GetListMania$Results, answer);
|
|
return new ListManiaInterface_GetListMania$Results$Promise(pipeline);
|
|
}
|
|
}
|
|
$.Registry.register(ListManiaInterface$Client.interfaceId, ListManiaInterface$Client);
|
|
export interface ListManiaInterface$Server$Target {
|
|
getListMania(params: ListManiaInterface_GetListMania$Params, results: ListManiaInterface_GetListMania$Results): Promise<void>;
|
|
}
|
|
export class ListManiaInterface$Server extends $.Server {
|
|
readonly target: ListManiaInterface$Server$Target;
|
|
constructor(target: ListManiaInterface$Server$Target) {
|
|
super(target, [
|
|
{
|
|
...ListManiaInterface$Client.methods[0],
|
|
impl: target.getListMania
|
|
}
|
|
]);
|
|
this.target = target;
|
|
}
|
|
client(): ListManiaInterface$Client {
|
|
return new ListManiaInterface$Client(this);
|
|
}
|
|
}
|
|
export class ListManiaInterface extends $.Interface {
|
|
static readonly Client = ListManiaInterface$Client;
|
|
static readonly Server = ListManiaInterface$Server;
|
|
static readonly _zap = {
|
|
displayName: "ListManiaInterface",
|
|
id: "8a94079c3c57204f",
|
|
size: new $.ObjectSize(0, 0),
|
|
};
|
|
toString(): string { return "ListManiaInterface_" + super.toString(); }
|
|
}
|
|
export class ListManiaStruct extends $.Struct {
|
|
static readonly _zap = {
|
|
displayName: "ListManiaStruct",
|
|
id: "9e1eb66286605522",
|
|
size: new $.ObjectSize(0, 1),
|
|
};
|
|
_adoptSelf(value: $.Orphan<ListMania>): void {
|
|
$.utils.adopt(value, $.utils.getPointer(0, this));
|
|
}
|
|
_disownSelf(): $.Orphan<ListMania> {
|
|
return $.utils.disown(this.self);
|
|
}
|
|
get self(): ListMania {
|
|
return $.utils.getStruct(0, ListMania, this);
|
|
}
|
|
_hasSelf(): boolean {
|
|
return !$.utils.isNull($.utils.getPointer(0, this));
|
|
}
|
|
_initSelf(): ListMania {
|
|
return $.utils.initStructAt(0, ListMania, this);
|
|
}
|
|
set self(value: ListMania) {
|
|
$.utils.copyFrom(value, $.utils.getPointer(0, this));
|
|
}
|
|
toString(): string { return "ListManiaStruct_" + super.toString(); }
|
|
}
|
|
ListMania._CompositeList = $.CompositeList(ListManiaStruct);
|