Abstract Class: ConfigBuilder<T, D>
Defined in: src/sdk/utils/config/ConfigUtils.ts:189
A base for FMS config builder classes.
Type Parameters
Type Parameter | Default type |
---|---|
T | - |
D extends boolean | true |
Constructors
Constructor
new ConfigBuilder<
T
,D
>(baseConfigElement
,baseInstrument
,errorsMap
):ConfigBuilder
<T
,D
>
Defined in: src/sdk/utils/config/ConfigUtils.ts:196
Constructor
Parameters
Parameter | 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
>
Properties
baseConfigElement
protected
baseConfigElement:Element
Defined in: src/sdk/utils/config/ConfigUtils.ts:197
XML config element to parse
baseInstrument
protected
baseInstrument:BaseInstrument
Defined in: src/sdk/utils/config/ConfigUtils.ts:198
the base instrument class
CONFIG_TAG_NAME
abstract
protected
readonly
CONFIG_TAG_NAME:string
Defined in: src/sdk/utils/config/ConfigUtils.ts:203
errorsMap
protected
errorsMap:Map
<string
,boolean
>
Defined in: src/sdk/utils/config/ConfigUtils.ts:199
Whether there were any errors encountered while parsing the config.
Accessors
configElement
Get Signature
get
protected
configElement():Element
Defined in: src/sdk/utils/config/ConfigUtils.ts:209
Gets the config element.
Returns
Element
The config element.
Methods
defaultConfig()
abstract
protected
defaultConfig():D
extendsfalse
?undefined
|T
:T
Defined in: src/sdk/utils/config/ConfigUtils.ts:217
The default config object to use if this.parseConfig encounters an error.
Returns
D
extends false
? undefined
| T
: T
getConfig()
getConfig():
D
extendsfalse
?undefined
|T
:T
Defined in: src/sdk/utils/config/ConfigUtils.ts:223
Returns a config object.
Returns
D
extends false
? undefined
| T
: T
A parsed config, or its default value if parsing errors were encountered.
getErrors()
getErrors():
ReadonlyMap
<string
,boolean
>
Defined in: src/sdk/utils/config/ConfigUtils.ts:241
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.
parseConfig()
abstract
protected
parseConfig():T
Defined in: src/sdk/utils/config/ConfigUtils.ts:214
Attempts to parse the XML into a config object of type T.
Returns
T