fixparser
Version:
FIX.Latest / 5.0 SP2 Parser / AI Agent Trading
44 lines (43 loc) • 1.63 kB
TypeScript
import type { Field } from '../fields/Field.ts';
import { type ISpecEnums } from '../spec/SpecEnums.ts';
import type { FIXValue } from '../util/util.ts';
/**
* Class for managing FIX enumerations.
* Provides functionality to process and look up FIX field enumerations
* using both tag-value pairs and tag-only lookups.
*/
export declare class Enums {
/** Array of all available enumeration specifications */
enums: ISpecEnums[];
/** Cache map for looking up enumerations by tag and value */
cacheMap: Map<string, ISpecEnums>;
/** Cache map for looking up enumerations by tag only */
cacheMapTag: Map<string, ISpecEnums>;
/**
* Creates a new Enums instance and initializes the cache maps
* with all available enumeration specifications.
*/
constructor();
/**
* Gets an enumeration by its tag and value.
*
* @param {string} tag - The tag number
* @param {FIXValue} value - The enumeration value
* @returns {ISpecEnums | undefined} The found enumeration, or undefined if not found
*/
getEnum(tag: string, value: FIXValue): ISpecEnums | undefined;
/**
* Gets an enumeration by its tag only.
*
* @param {string} tag - The tag number
* @returns {ISpecEnums | undefined} The found enumeration, or undefined if not found
*/
getEnumByTag(tag: string): ISpecEnums | undefined;
/**
* Processes a field's enumeration, setting the appropriate enumeration type
* if a matching enumeration is found.
*
* @param {Field} field - The field to process
*/
processEnum(field: Field): void;
}