UNPKG

jspurefix

Version:
55 lines (54 loc) 2.68 kB
/// <reference types="node" /> import { TagPos } from './tag/tag-pos'; import { SegmentDescription } from './segment/segment-description'; import { Structure } from './structure'; import { ILooseObject } from '../collections/collection'; import { FixDefinitions, SimpleFieldDefinition } from '../dictionary/definition'; export declare abstract class MsgView { readonly definitions: FixDefinitions; readonly segment: SegmentDescription; readonly structure: Structure | null; protected sortedTagPosForwards: TagPos[]; protected sortedTagPosBackwards: TagPos[]; private readonly reducer; protected constructor(definitions: FixDefinitions, segment: SegmentDescription, structure: Structure | null); protected static asVerbose: (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos) => string; protected static asToken: (field: SimpleFieldDefinition, val: string, i: number, count: number, tp: TagPos) => string; invalid(): number[]; missing(): number[]; contains(tagOrName: number | string): boolean; getGroupInstance(i: number): MsgView | null; getUndefined(): SegmentDescription | SegmentDescription[] | null; undefinedForMsg(): string | null; groupCount(): number; getString(tagOrName: number | string): string | null; getStrings(tagOrName?: number | string | null): Array<(string | null)> | null; getTyped(tagOrName: number | string): (boolean | string | number | Date | Buffer | null); getTypedList(...tagOrNames: Array<number | string>): Array<boolean | string | number | Date | Buffer | null>; getTypedTags(tagOrName: Array<string | number>): Array<boolean | string | number | Date | Buffer | null>; toObject(): ILooseObject | ILooseObject[] | null; toString(): string; toVerbose(): string; toJson(): string; getView(name: string): MsgView | null; abstract checksum(): number; abstract clone(): MsgView; protected abstract create(singleton: SegmentDescription): MsgView; protected abstract stringAtPosition(position: number): string | null; protected abstract toTyped(field: SimpleFieldDefinition): boolean | string | number | Date | Buffer | null; protected resolveTag(tagOrName: number | string): number; protected getPositions(tag: number): number[]; protected getPosition(tag: number): number; private allStrings; private asInstances; private asLoose; private missingRequired; private missingSimple; private missingComponent; private missingGroup; private asLooseComponent; private asLooseSimple; private asLooseGroup; private binarySearch; private stringify; }