GridDSL

floodsim.model.dsl.GridDSL
object GridDSL

Domain Specific Language for constructing flood grids. Provides a convenient syntax for defining grid layouts using a textual DSL.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GridDSL.type

Members list

Type members

Classlikes

enum CellValue

Represents the percentage of flooding of a cell.

Represents the percentage of flooding of a cell.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class GridBuilder(cells: Vector[Vector[CellValue]])

Builder class for constructing grids from DSL expressions.

Builder class for constructing grids from DSL expressions.

Value parameters

cells

the 2D vector of cell values representing the grid layout

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class GridStarter(value: CellValue)

Wrapper class for grid starting values.

Wrapper class for grid starting values.

Value parameters

value

the initial cell value

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

Creates an empty cell to start grid construction.

Creates an empty cell to start grid construction.

Attributes

Givens

Givens

Implicit conversion from GridBuilder to DistanceGrid. Allows GridBuilder instances to be used where DistanceGrid is expected, automatically calling the build method.

Implicit conversion from GridBuilder to DistanceGrid. Allows GridBuilder instances to be used where DistanceGrid is expected, automatically calling the build method.

Attributes

Extensions

Extensions

extension (left: GridStarter | String | GridBuilder)
infix def |(right: GridStarter | String): GridBuilder

Horizontal composition operator. Adds a cell to the right of the current grid/row.

Horizontal composition operator. Adds a cell to the right of the current grid/row.

Attributes

infix def ||(right: GridStarter | String): GridBuilder

Vertical composition operator. Starts a new row below the current grid.

Vertical composition operator. Starts a new row below the current grid.

Attributes