Options
All
  • Public
  • Public/Protected
  • All
Menu

A fuel break file.

author

"Travis Redpath"

Hierarchy

  • FuelBreak

Index

Constructors

constructor

Properties

Private _filename

_filename: string = ""

The filename associated with this fuel break. Only valid if type is FILE.

Private _id

_id: string

The name of the fuel break. The name must be unique amongst fuel break collections.

Private _width

_width: number = -1

The width of the fuel break (required if type is POLYLINE, otherwise ignored).

comments

comments: string = ""

Comments about the fuel break (optional).

feature

feature: LatLon[] = new Array<LatLon>()

An array of LatLon describing the fuel break. Only valid if type is POLYLINE or POLYGON.

type

type: FuelBreakType = -1

The type of fuelbreak (required).

Static Private Readonly PARAM_FUELBREAK

PARAM_FUELBREAK: "fuelbreakfile" = "fuelbreakfile"

Static Protected counter

counter: number = 0

Accessors

filename

  • get filename(): string
  • set filename(value: string): void

id

  • get id(): string
  • set id(value: string): void
  • Get the name of the fuel break.

    throws

    If SocketMsg.inlineThrowOnError is set a RangeError will be thrown if value is not valid.

    Returns string

  • Set the name of the fuel break. Must be unique amongst the fuel break collection. Cannot be null or empty.

    throws

    If SocketMsg.inlineThrowOnError is set a RangeError will be thrown if value is not valid.

    Parameters

    • value: string

    Returns void

width

  • get width(): number
  • set width(value: number): void

Methods

checkValid

  • Find any errors that may exist in the fuelbreak.

    Returns Array<ValidationError>

    A list of errors.

getId

  • getId(): string
  • Returns string

isValid

  • isValid(): boolean
  • Are all required values set.

    Returns boolean

    boolean

setName

  • setName(name: string): void
  • Set the name of the fuel break. This name must be unique within the simulation. The name will get a default value when the fuel break is constructed but can be overriden with this method.

    Parameters

    • name: string

    Returns void

stream

  • stream(builder: Socket): void
  • Streams the fuel break file to a socket.

    Parameters

    • builder: Socket

    Returns void