YamlManager
io.github.srs.config.yaml.YamlManager
object YamlManager
A parser for YAML configuration files.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
YamlManager.type
Members list
Value members
Concrete methods
Parses a YAML configuration string into a SimulationConfig
.
Parses a YAML configuration string into a SimulationConfig
.
Value parameters
- content
-
the YAML configuration content as a string
Attributes
- Returns
-
a
ConfigResult
containing the parsedSimulationConfig
- Example
-
The following example shows the structure of a YAML configuration:
simulation: duration: 1000 seed: 42 environment: width: 10 height: 10 entities: - obstacle: position: [5, 5] orientation: 0.0 width: 1.0 height: 1.0 - light: position: [2, 2] illuminationRadius: 5.0 intensity: 1.0 attenuation: 1.0 - robot: position: [3, 1] orientation: 90.0 radius: 0.5 speed: 1.0 withProximitySensors: true withLightSensors: false
Converts a SimulationConfig
to a YAML string.
Converts a SimulationConfig
to a YAML string.
Type parameters
- F
-
the effect type
Value parameters
- config
-
the
SimulationConfig
to convert
Attributes
- Returns
-
a
F[String]
containing the YAML representation of the configuration
In this article