capnp-js-plugin
Version:
Capnproto implementation for Javascript
998 lines • 80.9 kB
JavaScript
var Allocator = require('capnp-js/builder/Allocator');
var reader = require('capnp-js/reader/index');
var scope = require('./rScope');
var readers = {};
var allocator = new Allocator();
(function(types, parentScope, allocator) {
var Structure = types["0xe682ab4cf923a417"];
Structure._PARENT = parentScope;
(function(types, parentScope, allocator) {
var Structure = types["0xb9521bccf10fa3b1"];
Structure._PARENT = parentScope;
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* name */ var f0 = reader.Text._FIELD;
parentScope.prototype.getName = f0.get(0, 0);
parentScope.prototype.hasName = f0.has(0);
defaults[0] = function() {
var Reader = reader.Text;
var arena = allocator._fromBase64("AQAAAAoAAAAAAAAAAAAAAA==").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.Parameter = Structure;
})(types, Structure, allocator);
(function(types, parentScope, allocator) {
var Structure = types["0xdebf55bbfa0fc242"];
Structure._PARENT = parentScope;
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* name */ var f0 = reader.Text._FIELD;
parentScope.prototype.getName = f0.get(0, 0);
parentScope.prototype.hasName = f0.has(0);
/* id */ parentScope.prototype.getId = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
defaults[0] = function() {
var Reader = reader.Text;
var arena = allocator._fromBase64("AQAAAAoAAAAAAAAAAAAAAA==").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.NestedNode = Structure;
})(types, Structure, allocator);
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
parentScope.prototype.which = function() {
var position = this._dataSection + 12;
if (position < this._pointersSection) {
return reader.primitives.uint16(this._segment, position);
} else {
return 0;
}
};
var defaults = parentScope.prototype._pointerDefaults;
/* id */ parentScope.prototype.getId = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* displayName */ var f1 = reader.Text._FIELD;
parentScope.prototype.getDisplayName = f1.get(0, 0);
parentScope.prototype.hasDisplayName = f1.has(0);
/* displayNamePrefixLength */ parentScope.prototype.getDisplayNamePrefixLength = function() {
var position = this._dataSection + 8;
if (position < this._pointersSection) {
return reader.fields.uint32(0, this._segment, position);
} else {
return 0;
}
};
/* scopeId */ parentScope.prototype.getScopeId = function() {
var position = this._dataSection + 16;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* nestedNodes */ var f4 = reader.lists.struct(types["0xdebf55bbfa0fc242"])._FIELD;
parentScope.prototype.getNestedNodes = f4.get(8, 1);
parentScope.prototype.hasNestedNodes = f4.has(8);
/* annotations */ var f5 = reader.lists.struct(types["0xf1c8950dab257542"])._FIELD;
parentScope.prototype.getAnnotations = f5.get(16, 2);
parentScope.prototype.hasAnnotations = f5.has(16);
/* file */ parentScope.prototype.isFile = function() {
return this.which() === 0;
};
parentScope.FILE = parentScope.prototype.FILE = 0;
parentScope.prototype.getFile = function() {
if (!this.isFile()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* struct */ parentScope.prototype.isStruct = function() {
return this.which() === 1;
};
parentScope.STRUCT = parentScope.prototype.STRUCT = 1;
var G7 = reader.group(parentScope);
parentScope.struct = G7;
G7.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* dataWordCount */ parentScope.prototype.getDataWordCount = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* pointerCount */ parentScope.prototype.getPointerCount = function() {
var position = this._dataSection + 24;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* preferredListEncoding */ parentScope.prototype.getPreferredListEncoding = function() {
var position = this._dataSection + 26;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* isGroup */ parentScope.prototype.getIsGroup = function() {
var position = this._dataSection + 28;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 0);
} else {
return !!0;
}
};
/* discriminantCount */ parentScope.prototype.getDiscriminantCount = function() {
var position = this._dataSection + 30;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* discriminantOffset */ parentScope.prototype.getDiscriminantOffset = function() {
var position = this._dataSection + 32;
if (position < this._pointersSection) {
return reader.fields.uint32(0, this._segment, position);
} else {
return 0;
}
};
/* fields */ var f6 = reader.lists.struct(types["0x9aad50a41f4af45f"])._FIELD;
parentScope.prototype.getFields = f6.get(24, 3);
parentScope.prototype.hasFields = f6.has(24);
defaults[3] = function() {
var Reader = reader.lists.struct(types["0x9aad50a41f4af45f"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G7, allocator);
parentScope.prototype.getStruct = function() {
if (!this.isStruct()) {
throw new Error("Attempted to access an inactive union member");
}
return new G7(this);
};
/* enum */ parentScope.prototype.isEnum = function() {
return this.which() === 2;
};
parentScope.ENUM = parentScope.prototype.ENUM = 2;
var G8 = reader.group(parentScope);
parentScope.enum = G8;
G8.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* enumerants */ var f0 = reader.lists.struct(types["0x978a7cebdc549a4d"])._FIELD;
parentScope.prototype.getEnumerants = f0.get(24, 3);
parentScope.prototype.hasEnumerants = f0.has(24);
defaults[3] = function() {
var Reader = reader.lists.struct(types["0x978a7cebdc549a4d"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G8, allocator);
parentScope.prototype.getEnum = function() {
if (!this.isEnum()) {
throw new Error("Attempted to access an inactive union member");
}
return new G8(this);
};
/* interface */ parentScope.prototype.isInterface = function() {
return this.which() === 3;
};
parentScope.INTERFACE = parentScope.prototype.INTERFACE = 3;
var G9 = reader.group(parentScope);
parentScope.interface = G9;
G9.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* methods */ var f0 = reader.lists.struct(types["0x9500cce23b334d80"])._FIELD;
parentScope.prototype.getMethods = f0.get(24, 3);
parentScope.prototype.hasMethods = f0.has(24);
/* superclasses */ var f1 = reader.lists.struct(types["0xa9962a9ed0a4d7f8"])._FIELD;
parentScope.prototype.getSuperclasses = f1.get(32, 4);
parentScope.prototype.hasSuperclasses = f1.has(32);
defaults[3] = function() {
var Reader = reader.lists.struct(types["0x9500cce23b334d80"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[4] = function() {
var Reader = reader.lists.struct(types["0xa9962a9ed0a4d7f8"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G9, allocator);
parentScope.prototype.getInterface = function() {
if (!this.isInterface()) {
throw new Error("Attempted to access an inactive union member");
}
return new G9(this);
};
/* const */ parentScope.prototype.isConst = function() {
return this.which() === 4;
};
parentScope.CONST = parentScope.prototype.CONST = 4;
var G10 = reader.group(parentScope);
parentScope.const = G10;
G10.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* type */ var f0 = types["0xd07378ede1f9cc60"]._FIELD;
parentScope.prototype.getType = f0.get(24, 3);
parentScope.prototype.hasType = f0.has(24);
/* value */ var f1 = types["0xce23dcd2d7b00c9b"]._FIELD;
parentScope.prototype.getValue = f1.get(32, 4);
parentScope.prototype.hasValue = f1.has(32);
defaults[3] = function() {
var Reader = types["0xd07378ede1f9cc60"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[4] = function() {
var Reader = types["0xce23dcd2d7b00c9b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G10, allocator);
parentScope.prototype.getConst = function() {
if (!this.isConst()) {
throw new Error("Attempted to access an inactive union member");
}
return new G10(this);
};
/* annotation */ parentScope.prototype.isAnnotation = function() {
return this.which() === 5;
};
parentScope.ANNOTATION = parentScope.prototype.ANNOTATION = 5;
var G11 = reader.group(parentScope);
parentScope.annotation = G11;
G11.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* type */ var f0 = types["0xd07378ede1f9cc60"]._FIELD;
parentScope.prototype.getType = f0.get(24, 3);
parentScope.prototype.hasType = f0.has(24);
/* targetsFile */ parentScope.prototype.getTargetsFile = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 0);
} else {
return !!0;
}
};
/* targetsConst */ parentScope.prototype.getTargetsConst = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 1);
} else {
return !!0;
}
};
/* targetsEnum */ parentScope.prototype.getTargetsEnum = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 2);
} else {
return !!0;
}
};
/* targetsEnumerant */ parentScope.prototype.getTargetsEnumerant = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 3);
} else {
return !!0;
}
};
/* targetsStruct */ parentScope.prototype.getTargetsStruct = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 4);
} else {
return !!0;
}
};
/* targetsField */ parentScope.prototype.getTargetsField = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 5);
} else {
return !!0;
}
};
/* targetsUnion */ parentScope.prototype.getTargetsUnion = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 6);
} else {
return !!0;
}
};
/* targetsGroup */ parentScope.prototype.getTargetsGroup = function() {
var position = this._dataSection + 14;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 7);
} else {
return !!0;
}
};
/* targetsInterface */ parentScope.prototype.getTargetsInterface = function() {
var position = this._dataSection + 15;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 0);
} else {
return !!0;
}
};
/* targetsMethod */ parentScope.prototype.getTargetsMethod = function() {
var position = this._dataSection + 15;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 1);
} else {
return !!0;
}
};
/* targetsParam */ parentScope.prototype.getTargetsParam = function() {
var position = this._dataSection + 15;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 2);
} else {
return !!0;
}
};
/* targetsAnnotation */ parentScope.prototype.getTargetsAnnotation = function() {
var position = this._dataSection + 15;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 3);
} else {
return !!0;
}
};
defaults[3] = function() {
var Reader = types["0xd07378ede1f9cc60"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G11, allocator);
parentScope.prototype.getAnnotation = function() {
if (!this.isAnnotation()) {
throw new Error("Attempted to access an inactive union member");
}
return new G11(this);
};
/* parameters */ var f12 = reader.lists.struct(types["0xb9521bccf10fa3b1"])._FIELD;
parentScope.prototype.getParameters = f12.get(40, 5);
parentScope.prototype.hasParameters = f12.has(40);
/* isGeneric */ parentScope.prototype.getIsGeneric = function() {
var position = this._dataSection + 36;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 0);
} else {
return !!0;
}
};
defaults[0] = function() {
var Reader = reader.Text;
var arena = allocator._fromBase64("AQAAAAoAAAAAAAAAAAAAAA==").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[1] = function() {
var Reader = reader.lists.struct(types["0xdebf55bbfa0fc242"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[2] = function() {
var Reader = reader.lists.struct(types["0xf1c8950dab257542"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[5] = function() {
var Reader = reader.lists.struct(types["0xb9521bccf10fa3b1"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.Node = Structure;
})(scope, readers, allocator);
(function(types, parentScope, allocator) {
var Structure = types["0x9aad50a41f4af45f"];
Structure._PARENT = parentScope;
(function(types, parentScope, allocator) {
parentScope.NO_DISCRIMINANT = parentScope.prototype.NO_DISCRIMINANT = 65535;
})(types, Structure, allocator);
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
parentScope.prototype.which = function() {
var position = this._dataSection + 8;
if (position < this._pointersSection) {
return reader.primitives.uint16(this._segment, position);
} else {
return 0;
}
};
var defaults = parentScope.prototype._pointerDefaults;
/* name */ var f0 = reader.Text._FIELD;
parentScope.prototype.getName = f0.get(0, 0);
parentScope.prototype.hasName = f0.has(0);
/* codeOrder */ parentScope.prototype.getCodeOrder = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* annotations */ var f2 = reader.lists.struct(types["0xf1c8950dab257542"])._FIELD;
parentScope.prototype.getAnnotations = f2.get(8, 1);
parentScope.prototype.hasAnnotations = f2.has(8);
/* discriminantValue */ parentScope.prototype.getDiscriminantValue = function() {
var position = this._dataSection + 2;
if (position < this._pointersSection) {
return reader.fields.uint16(65535, this._segment, position);
} else {
return 65535;
}
};
/* slot */ parentScope.prototype.isSlot = function() {
return this.which() === 0;
};
parentScope.SLOT = parentScope.prototype.SLOT = 0;
var G4 = reader.group(parentScope);
parentScope.slot = G4;
G4.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* offset */ parentScope.prototype.getOffset = function() {
var position = this._dataSection + 4;
if (position < this._pointersSection) {
return reader.fields.uint32(0, this._segment, position);
} else {
return 0;
}
};
/* type */ var f1 = types["0xd07378ede1f9cc60"]._FIELD;
parentScope.prototype.getType = f1.get(16, 2);
parentScope.prototype.hasType = f1.has(16);
/* defaultValue */ var f2 = types["0xce23dcd2d7b00c9b"]._FIELD;
parentScope.prototype.getDefaultValue = f2.get(24, 3);
parentScope.prototype.hasDefaultValue = f2.has(24);
/* hadExplicitDefault */ parentScope.prototype.getHadExplicitDefault = function() {
var position = this._dataSection + 16;
if (position < this._pointersSection) {
return reader.fields.bool(0, this._segment, position, 0);
} else {
return !!0;
}
};
defaults[2] = function() {
var Reader = types["0xd07378ede1f9cc60"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[3] = function() {
var Reader = types["0xce23dcd2d7b00c9b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G4, allocator);
parentScope.prototype.getSlot = function() {
if (!this.isSlot()) {
throw new Error("Attempted to access an inactive union member");
}
return new G4(this);
};
/* group */ parentScope.prototype.isGroup = function() {
return this.which() === 1;
};
parentScope.GROUP = parentScope.prototype.GROUP = 1;
var G5 = reader.group(parentScope);
parentScope.group = G5;
G5.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* typeId */ parentScope.prototype.getTypeId = function() {
var position = this._dataSection + 16;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
parentScope.prototype._floatDefaults = {};
})(types, G5, allocator);
parentScope.prototype.getGroup = function() {
if (!this.isGroup()) {
throw new Error("Attempted to access an inactive union member");
}
return new G5(this);
};
/* ordinal */ var G6 = reader.group(parentScope);
parentScope.ordinal = G6;
G6.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
parentScope.prototype.which = function() {
var position = this._dataSection + 10;
if (position < this._pointersSection) {
return reader.primitives.uint16(this._segment, position);
} else {
return 0;
}
};
var defaults = parentScope.prototype._pointerDefaults;
/* implicit */ parentScope.prototype.isImplicit = function() {
return this.which() === 0;
};
parentScope.IMPLICIT = parentScope.prototype.IMPLICIT = 0;
parentScope.prototype.getImplicit = function() {
if (!this.isImplicit()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* explicit */ parentScope.prototype.isExplicit = function() {
return this.which() === 1;
};
parentScope.EXPLICIT = parentScope.prototype.EXPLICIT = 1;
parentScope.prototype.getExplicit = function() {
if (!this.isExplicit()) {
throw new Error("Attempted to access an inactive union member");
}
var position = this._dataSection + 12;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
parentScope.prototype._floatDefaults = {};
})(types, G6, allocator);
parentScope.prototype.getOrdinal = function() {
return new G6(this);
};
defaults[0] = function() {
var Reader = reader.Text;
var arena = allocator._fromBase64("AQAAAAoAAAAAAAAAAAAAAA==").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[1] = function() {
var Reader = reader.lists.struct(types["0xf1c8950dab257542"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.Field = Structure;
})(scope, readers, allocator);
(function(types, parentScope, allocator) {
var Structure = types["0x978a7cebdc549a4d"];
Structure._PARENT = parentScope;
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* name */ var f0 = reader.Text._FIELD;
parentScope.prototype.getName = f0.get(0, 0);
parentScope.prototype.hasName = f0.has(0);
/* codeOrder */ parentScope.prototype.getCodeOrder = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* annotations */ var f2 = reader.lists.struct(types["0xf1c8950dab257542"])._FIELD;
parentScope.prototype.getAnnotations = f2.get(8, 1);
parentScope.prototype.hasAnnotations = f2.has(8);
defaults[0] = function() {
var Reader = reader.Text;
var arena = allocator._fromBase64("AQAAAAoAAAAAAAAAAAAAAA==").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[1] = function() {
var Reader = reader.lists.struct(types["0xf1c8950dab257542"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.Enumerant = Structure;
})(scope, readers, allocator);
(function(types, parentScope, allocator) {
var Structure = types["0xa9962a9ed0a4d7f8"];
Structure._PARENT = parentScope;
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* id */ parentScope.prototype.getId = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* brand */ var f1 = types["0x903455f06065422b"]._FIELD;
parentScope.prototype.getBrand = f1.get(0, 0);
parentScope.prototype.hasBrand = f1.has(0);
defaults[0] = function() {
var Reader = types["0x903455f06065422b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.Superclass = Structure;
})(scope, readers, allocator);
(function(types, parentScope, allocator) {
var Structure = types["0x9500cce23b334d80"];
Structure._PARENT = parentScope;
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* name */ var f0 = reader.Text._FIELD;
parentScope.prototype.getName = f0.get(0, 0);
parentScope.prototype.hasName = f0.has(0);
/* codeOrder */ parentScope.prototype.getCodeOrder = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.fields.uint16(0, this._segment, position);
} else {
return 0;
}
};
/* paramStructType */ parentScope.prototype.getParamStructType = function() {
var position = this._dataSection + 8;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* resultStructType */ parentScope.prototype.getResultStructType = function() {
var position = this._dataSection + 16;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* annotations */ var f4 = reader.lists.struct(types["0xf1c8950dab257542"])._FIELD;
parentScope.prototype.getAnnotations = f4.get(8, 1);
parentScope.prototype.hasAnnotations = f4.has(8);
/* paramBrand */ var f5 = types["0x903455f06065422b"]._FIELD;
parentScope.prototype.getParamBrand = f5.get(16, 2);
parentScope.prototype.hasParamBrand = f5.has(16);
/* resultBrand */ var f6 = types["0x903455f06065422b"]._FIELD;
parentScope.prototype.getResultBrand = f6.get(24, 3);
parentScope.prototype.hasResultBrand = f6.has(24);
/* implicitParameters */ var f7 = reader.lists.struct(types["0xb9521bccf10fa3b1"])._FIELD;
parentScope.prototype.getImplicitParameters = f7.get(32, 4);
parentScope.prototype.hasImplicitParameters = f7.has(32);
defaults[0] = function() {
var Reader = reader.Text;
var arena = allocator._fromBase64("AQAAAAoAAAAAAAAAAAAAAA==").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[1] = function() {
var Reader = reader.lists.struct(types["0xf1c8950dab257542"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[2] = function() {
var Reader = types["0x903455f06065422b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[3] = function() {
var Reader = types["0x903455f06065422b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
defaults[4] = function() {
var Reader = reader.lists.struct(types["0xb9521bccf10fa3b1"]);
var arena = allocator._fromBase64("AQAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, Structure, allocator);
parentScope.Method = Structure;
})(scope, readers, allocator);
(function(types, parentScope, allocator) {
var Structure = types["0xd07378ede1f9cc60"];
Structure._PARENT = parentScope;
Structure.prototype._pointerDefaults = [];
(function(types, parentScope, allocator) {
parentScope.prototype.which = function() {
var position = this._dataSection + 0;
if (position < this._pointersSection) {
return reader.primitives.uint16(this._segment, position);
} else {
return 0;
}
};
var defaults = parentScope.prototype._pointerDefaults;
/* void */ parentScope.prototype.isVoid = function() {
return this.which() === 0;
};
parentScope.VOID = parentScope.prototype.VOID = 0;
parentScope.prototype.getVoid = function() {
if (!this.isVoid()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* bool */ parentScope.prototype.isBool = function() {
return this.which() === 1;
};
parentScope.BOOL = parentScope.prototype.BOOL = 1;
parentScope.prototype.getBool = function() {
if (!this.isBool()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* int8 */ parentScope.prototype.isInt8 = function() {
return this.which() === 2;
};
parentScope.INT8 = parentScope.prototype.INT8 = 2;
parentScope.prototype.getInt8 = function() {
if (!this.isInt8()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* int16 */ parentScope.prototype.isInt16 = function() {
return this.which() === 3;
};
parentScope.INT16 = parentScope.prototype.INT16 = 3;
parentScope.prototype.getInt16 = function() {
if (!this.isInt16()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* int32 */ parentScope.prototype.isInt32 = function() {
return this.which() === 4;
};
parentScope.INT32 = parentScope.prototype.INT32 = 4;
parentScope.prototype.getInt32 = function() {
if (!this.isInt32()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* int64 */ parentScope.prototype.isInt64 = function() {
return this.which() === 5;
};
parentScope.INT64 = parentScope.prototype.INT64 = 5;
parentScope.prototype.getInt64 = function() {
if (!this.isInt64()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* uint8 */ parentScope.prototype.isUint8 = function() {
return this.which() === 6;
};
parentScope.UINT8 = parentScope.prototype.UINT8 = 6;
parentScope.prototype.getUint8 = function() {
if (!this.isUint8()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* uint16 */ parentScope.prototype.isUint16 = function() {
return this.which() === 7;
};
parentScope.UINT16 = parentScope.prototype.UINT16 = 7;
parentScope.prototype.getUint16 = function() {
if (!this.isUint16()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* uint32 */ parentScope.prototype.isUint32 = function() {
return this.which() === 8;
};
parentScope.UINT32 = parentScope.prototype.UINT32 = 8;
parentScope.prototype.getUint32 = function() {
if (!this.isUint32()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* uint64 */ parentScope.prototype.isUint64 = function() {
return this.which() === 9;
};
parentScope.UINT64 = parentScope.prototype.UINT64 = 9;
parentScope.prototype.getUint64 = function() {
if (!this.isUint64()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* float32 */ parentScope.prototype.isFloat32 = function() {
return this.which() === 10;
};
parentScope.FLOAT32 = parentScope.prototype.FLOAT32 = 10;
parentScope.prototype.getFloat32 = function() {
if (!this.isFloat32()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* float64 */ parentScope.prototype.isFloat64 = function() {
return this.which() === 11;
};
parentScope.FLOAT64 = parentScope.prototype.FLOAT64 = 11;
parentScope.prototype.getFloat64 = function() {
if (!this.isFloat64()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* text */ parentScope.prototype.isText = function() {
return this.which() === 12;
};
parentScope.TEXT = parentScope.prototype.TEXT = 12;
parentScope.prototype.getText = function() {
if (!this.isText()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* data */ parentScope.prototype.isData = function() {
return this.which() === 13;
};
parentScope.DATA = parentScope.prototype.DATA = 13;
parentScope.prototype.getData = function() {
if (!this.isData()) {
throw new Error("Attempted to access an inactive union member");
}
return null;
};
/* list */ parentScope.prototype.isList = function() {
return this.which() === 14;
};
parentScope.LIST = parentScope.prototype.LIST = 14;
var G14 = reader.group(parentScope);
parentScope.list = G14;
G14.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* elementType */ var f0 = types["0xd07378ede1f9cc60"]._FIELD;
parentScope.prototype.getElementType = f0.get(0, 0);
parentScope.prototype.hasElementType = f0.has(0);
defaults[0] = function() {
var Reader = types["0xd07378ede1f9cc60"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G14, allocator);
parentScope.prototype.getList = function() {
if (!this.isList()) {
throw new Error("Attempted to access an inactive union member");
}
return new G14(this);
};
/* enum */ parentScope.prototype.isEnum = function() {
return this.which() === 15;
};
parentScope.ENUM = parentScope.prototype.ENUM = 15;
var G15 = reader.group(parentScope);
parentScope.enum = G15;
G15.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* typeId */ parentScope.prototype.getTypeId = function() {
var position = this._dataSection + 8;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* brand */ var f1 = types["0x903455f06065422b"]._FIELD;
parentScope.prototype.getBrand = f1.get(0, 0);
parentScope.prototype.hasBrand = f1.has(0);
defaults[0] = function() {
var Reader = types["0x903455f06065422b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G15, allocator);
parentScope.prototype.getEnum = function() {
if (!this.isEnum()) {
throw new Error("Attempted to access an inactive union member");
}
return new G15(this);
};
/* struct */ parentScope.prototype.isStruct = function() {
return this.which() === 16;
};
parentScope.STRUCT = parentScope.prototype.STRUCT = 16;
var G16 = reader.group(parentScope);
parentScope.struct = G16;
G16.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* typeId */ parentScope.prototype.getTypeId = function() {
var position = this._dataSection + 8;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* brand */ var f1 = types["0x903455f06065422b"]._FIELD;
parentScope.prototype.getBrand = f1.get(0, 0);
parentScope.prototype.hasBrand = f1.has(0);
defaults[0] = function() {
var Reader = types["0x903455f06065422b"];
var arena = allocator._fromBase64("AAAAAAAAAAA=").asReader();
return Reader._deref(arena, arena._root(), 0);
}();
parentScope.prototype._floatDefaults = {};
})(types, G16, allocator);
parentScope.prototype.getStruct = function() {
if (!this.isStruct()) {
throw new Error("Attempted to access an inactive union member");
}
return new G16(this);
};
/* interface */ parentScope.prototype.isInterface = function() {
return this.which() === 17;
};
parentScope.INTERFACE = parentScope.prototype.INTERFACE = 17;
var G17 = reader.group(parentScope);
parentScope.interface = G17;
G17.prototype._pointerDefaults = defaults;
(function(types, parentScope, allocator) {
var defaults = parentScope.prototype._pointerDefaults;
/* typeId */ parentScope.prototype.getTypeId = function() {
var position = this._dataSection + 8;
if (position < this._pointersSection) {
return reader.fields.uint64([ 0, 0 ], this._segment, position);
} else {
return [ 0, 0 ];
}
};
/* brand */ var f1 = types["0x903455f06065422b"]._FIELD;
parentScope.prototype.getBrand = f1.get(0, 0);
parentScope.prototype.hasBrand = f1.has(0);
defaults[0] = function() {
var Reader = types["0x903455f06065422b"];
var arena