NodeFactory class
Factory for creating ElectricalNode instances with standard REBT defaults.
Purpose: Encapsulates business rules for default electrical component values. Removes hardcoded engineering specs from UI layer.
Standards: Spanish REBT (ITC-BT-15, ITC-BT-24)
- Default breaker: 16A (common residential circuit)
- Default differential: 40A, 30mA (Type A, general use)
- Default source: 230V, 10kA short-circuit
Usage:
final factory = NodeFactory();
final breaker = factory.createDefaultBreaker();
final rcd = factory.createDefaultDifferential();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createDefaultBreaker(
{required String id, String name = 'PIA'}) → ElectricalNode - Creates a default circuit breaker (ITC-BT-15)
-
createDefaultDifferential(
{required String id, String name = 'Dif'}) → ElectricalNode - Creates a default differential (RCD) (ITC-BT-24)
-
createDefaultLoad(
{required String id, String name = 'Carga', LoadType type = LoadType.power}) → ElectricalNode - Creates a default load
-
createDefaultPanel(
{required String id, String name = 'Cuadro'}) → ElectricalNode - Creates a default panel (switchboard)
-
createDefaultSource(
{required String id, String name = 'Acometida'}) → ElectricalNode - Creates a default electrical source
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited