Class: ConfigBuilder<T, D>
A base for FMS config builder classes.
Type parameters
Name | Type |
---|---|
T | T |
D | extends boolean = true |
Constructors
constructor
• new ConfigBuilder<T
, D
>(baseConfigElement
, baseInstrument
, errorsMap?
): ConfigBuilder
<T
, D
>
Constructor
Type parameters
Name | Type |
---|---|
T | T |
D | extends boolean = true |
Parameters
Name | Type | Description |
---|---|---|
baseConfigElement | Element | XML config element to parse |
baseInstrument | BaseInstrument | the base instrument class |
errorsMap | Map <string , boolean > | Whether there were any errors encountered while parsing the config. |
Returns
ConfigBuilder
<T
, D
>
Defined in
src/sdk/utils/config/ConfigUtils.ts:196
Properties
CONFIG_TAG_NAME
• Protected
Readonly
Abstract
CONFIG_TAG_NAME: string
Defined in
src/sdk/utils/config/ConfigUtils.ts:203
baseConfigElement
• Protected
baseConfigElement: Element
XML config element to parse
Defined in
src/sdk/utils/config/ConfigUtils.ts:197
baseInstrument
• Protected
baseInstrument: BaseInstrument
the base instrument class
Defined in
src/sdk/utils/config/ConfigUtils.ts:198
errorsMap
• Protected
errorsMap: Map
<string
, boolean
>
Whether there were any errors encountered while parsing the config.
Defined in
src/sdk/utils/config/ConfigUtils.ts:199
Accessors
configElement
• get
configElement(): Element
Gets the config element.
Returns
Element
The config element.
Defined in
src/sdk/utils/config/ConfigUtils.ts:209
Methods
defaultConfig
▸ defaultConfig(): D
extends false
? undefined
| T
: T
The default config object to use if this.parseConfig encounters an error.
Returns
D
extends false
? undefined
| T
: T
Defined in
src/sdk/utils/config/ConfigUtils.ts:217
getConfig
▸ getConfig(): D
extends false
? undefined
| T
: T
Returns a config object.
Returns
D
extends false
? undefined
| T
: T
A parsed config, or its default value if parsing errors were encountered.
Defined in
src/sdk/utils/config/ConfigUtils.ts:223
getErrors
▸ getErrors(): ReadonlyMap
<string
, boolean
>
Returns a map of which configs encountered parsing errors and which did not.
Returns
ReadonlyMap
<string
, boolean
>
A map with config name keys and boolean values indicating whether a parsing error was encountered.
Defined in
src/sdk/utils/config/ConfigUtils.ts:241
parseConfig
▸ parseConfig(): T
Attempts to parse the XML into a config object of type T.
Returns
T
Defined in
src/sdk/utils/config/ConfigUtils.ts:214