3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class Pong extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.Pong_free(this.ptr);
21 public number get_byteslen() {
22 number ret = bindings.Pong_get_byteslen(this.ptr);
26 public void set_byteslen(number val) {
27 bindings.Pong_set_byteslen(this.ptr, val);
30 public static Pong constructor_new(number byteslen_arg) {
31 number ret = bindings.Pong_new(byteslen_arg);
32 const ret_hu_conv: Pong = new Pong(null, ret);
33 ret_hu_conv.ptrs_to.add(ret_hu_conv);
38 number ret = bindings.Pong_clone(this.ptr);
39 const ret_hu_conv: Pong = new Pong(null, ret);
40 ret_hu_conv.ptrs_to.add(this);
44 public Uint8Array write() {
45 Uint8Array ret = bindings.Pong_write(this.ptr);
49 public static Result_PongDecodeErrorZ constructor_read(Uint8Array ser) {
50 number ret = bindings.Pong_read(ser);
51 Result_PongDecodeErrorZ ret_hu_conv = Result_PongDecodeErrorZ.constr_from_ptr(ret);