UNPKG

ducjs

Version:

The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.

49 lines (48 loc) 1.96 kB
// automatically generated by the FlatBuffers compiler, do not modify /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ import * as flatbuffers from 'flatbuffers'; export class VersionGraphMetadata { constructor() { this.bb = null; this.bb_pos = 0; } __init(i, bb) { this.bb_pos = i; this.bb = bb; return this; } static getRootAsVersionGraphMetadata(bb, obj) { return (obj || new VersionGraphMetadata()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsVersionGraphMetadata(bb, obj) { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new VersionGraphMetadata()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } lastPruned() { const offset = this.bb.__offset(this.bb_pos, 4); return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0'); } totalSize() { const offset = this.bb.__offset(this.bb_pos, 6); return offset ? this.bb.readInt64(this.bb_pos + offset) : BigInt('0'); } static startVersionGraphMetadata(builder) { builder.startObject(2); } static addLastPruned(builder, lastPruned) { builder.addFieldInt64(0, lastPruned, BigInt('0')); } static addTotalSize(builder, totalSize) { builder.addFieldInt64(1, totalSize, BigInt('0')); } static endVersionGraphMetadata(builder) { const offset = builder.endObject(); return offset; } static createVersionGraphMetadata(builder, lastPruned, totalSize) { VersionGraphMetadata.startVersionGraphMetadata(builder); VersionGraphMetadata.addLastPruned(builder, lastPruned); VersionGraphMetadata.addTotalSize(builder, totalSize); return VersionGraphMetadata.endVersionGraphMetadata(builder); } }