jspurefix
Version:
pure node js fix engine
50 lines (49 loc) • 2.11 kB
TypeScript
import { TagPos } from './tag-pos';
import { SimpleFieldDefinition } from '../dictionary/definition';
import { SegmentDescription } from './segment-description';
import { Structure } from './structure';
export declare abstract class MsgView {
readonly segment: SegmentDescription;
readonly structure: Structure;
protected sortedTagPosForwards: TagPos[];
protected sortedTagPosBackwards: TagPos[];
protected constructor(segment: SegmentDescription, structure: Structure);
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;
getUndefined(): SegmentDescription | SegmentDescription[];
undefinedForMsg(): string;
groupCount(): number;
getString(tagOrName: number | string): string;
getStrings(tagOrName?: number | string): string[];
getTyped(tagOrName: number | string): any;
getTypedTags(tagOrName: any[]): any[];
toObject(): any;
toString(): string;
toVerbose(): string;
toJson(): string;
getView(name: string): MsgView;
abstract checksum(): number;
abstract clone(): MsgView;
protected abstract create(singleton: SegmentDescription): MsgView;
protected abstract stringAtPosition(position: number): string;
protected abstract toTyped(field: SimpleFieldDefinition): any;
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;
}