mirror of
https://github.com/denoland/deno.git
synced 2025-01-11 08:33:43 -05:00
162 lines
3.8 KiB
TypeScript
162 lines
3.8 KiB
TypeScript
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||
|
|
||
|
/**
|
||
|
* @enum
|
||
|
*/
|
||
|
export namespace deno{
|
||
|
export enum Command{
|
||
|
START= 0
|
||
|
}};
|
||
|
|
||
|
/**
|
||
|
* @constructor
|
||
|
*/
|
||
|
export namespace deno{
|
||
|
export class Msg {
|
||
|
/**
|
||
|
* @type {flatbuffers.ByteBuffer}
|
||
|
*/
|
||
|
bb: flatbuffers.ByteBuffer|null = null;
|
||
|
|
||
|
/**
|
||
|
* @type {number}
|
||
|
*/
|
||
|
bb_pos:number = 0;
|
||
|
/**
|
||
|
* @param {number} i
|
||
|
* @param {flatbuffers.ByteBuffer} bb
|
||
|
* @returns {Msg}
|
||
|
*/
|
||
|
__init(i:number, bb:flatbuffers.ByteBuffer):Msg {
|
||
|
this.bb_pos = i;
|
||
|
this.bb = bb;
|
||
|
return this;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.ByteBuffer} bb
|
||
|
* @param {Msg=} obj
|
||
|
* @returns {Msg}
|
||
|
*/
|
||
|
static getRootAsMsg(bb:flatbuffers.ByteBuffer, obj?:Msg):Msg {
|
||
|
return (obj || new Msg).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @returns {deno.Command}
|
||
|
*/
|
||
|
command():deno.Command {
|
||
|
var offset = this.bb!.__offset(this.bb_pos, 4);
|
||
|
return offset ? /** @type {deno.Command} */ (this.bb!.readInt8(this.bb_pos + offset)) : deno.Command.START;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {deno.Command} value
|
||
|
* @returns {boolean}
|
||
|
*/
|
||
|
mutate_command(value:deno.Command):boolean {
|
||
|
var offset = this.bb!.__offset(this.bb_pos, 4);
|
||
|
|
||
|
if (offset === 0) {
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
this.bb!.writeInt8(this.bb_pos + offset, value);
|
||
|
return true;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Encoding=} optionalEncoding
|
||
|
* @returns {string|Uint8Array|null}
|
||
|
*/
|
||
|
startCwd():string|null
|
||
|
startCwd(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||
|
startCwd(optionalEncoding?:any):string|Uint8Array|null {
|
||
|
var offset = this.bb!.__offset(this.bb_pos, 6);
|
||
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {number} index
|
||
|
* @param {flatbuffers.Encoding=} optionalEncoding
|
||
|
* @returns {string|Uint8Array}
|
||
|
*/
|
||
|
startArgv(index: number):string
|
||
|
startArgv(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array
|
||
|
startArgv(index: number,optionalEncoding?:any):string|Uint8Array|null {
|
||
|
var offset = this.bb!.__offset(this.bb_pos, 8);
|
||
|
return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @returns {number}
|
||
|
*/
|
||
|
startArgvLength():number {
|
||
|
var offset = this.bb!.__offset(this.bb_pos, 8);
|
||
|
return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
*/
|
||
|
static startMsg(builder:flatbuffers.Builder) {
|
||
|
builder.startObject(3);
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
* @param {deno.Command} command
|
||
|
*/
|
||
|
static addCommand(builder:flatbuffers.Builder, command:deno.Command) {
|
||
|
builder.addFieldInt8(0, command, deno.Command.START);
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
* @param {flatbuffers.Offset} startCwdOffset
|
||
|
*/
|
||
|
static addStartCwd(builder:flatbuffers.Builder, startCwdOffset:flatbuffers.Offset) {
|
||
|
builder.addFieldOffset(1, startCwdOffset, 0);
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
* @param {flatbuffers.Offset} startArgvOffset
|
||
|
*/
|
||
|
static addStartArgv(builder:flatbuffers.Builder, startArgvOffset:flatbuffers.Offset) {
|
||
|
builder.addFieldOffset(2, startArgvOffset, 0);
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
* @param {Array.<flatbuffers.Offset>} data
|
||
|
* @returns {flatbuffers.Offset}
|
||
|
*/
|
||
|
static createStartArgvVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset {
|
||
|
builder.startVector(4, data.length, 4);
|
||
|
for (var i = data.length - 1; i >= 0; i--) {
|
||
|
builder.addOffset(data[i]);
|
||
|
}
|
||
|
return builder.endVector();
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
* @param {number} numElems
|
||
|
*/
|
||
|
static startStartArgvVector(builder:flatbuffers.Builder, numElems:number) {
|
||
|
builder.startVector(4, numElems, 4);
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param {flatbuffers.Builder} builder
|
||
|
* @returns {flatbuffers.Offset}
|
||
|
*/
|
||
|
static endMsg(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||
|
var offset = builder.endObject();
|
||
|
return offset;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|