2using System.Collections.Generic;
4using System.Threading.Tasks;
17 private IValue value =
null;
38 public string Name => this.name;
55 public override Task
FromXml(XmlElement Definition)
59 return base.FromXml(Definition);
68 if (this.value is
null)
71 throw new Exception(
"SetVariable node already has a value defined.");
101 string s = Index.ToString();
103 Output.Write(
"note \"");
104 Output.Write(this.name);
107 Output.Write(
"\" as N");
108 Output.Write(this.name);
113 Output.Write(
" .. N");
114 Output.Write(this.name);
Root node of a simulation model
Abstract base class for event preparation nodes (with children).
Sets a variable value when an event is triggered.
SetVariable(ISimulationNode Parent, Model Model)
Sets a variable value when an event is triggered.
string Name
Name of variable within the scope of the event.
override void ExportPlantUml(StreamWriter Output, string Name, int Index)
Exports the node to PlantUML script in a markdown document.
override string LocalName
Local name of XML element defining contents of class.
override async Task Prepare(Variables Variables, List< KeyValuePair< string, object > > Tags)
Prepares Variables for the execution of an event.
override ISimulationNode Create(ISimulationNode Parent, Model Model)
Creates a new instance of the node.
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
void Register(IValue Value)
Registers a value for the argument.
override void Release(Variables Variables)
Releases resources at the end of an event.
Abstract base class for values
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
virtual bool Remove(string VariableName)
Removes a varaiable from the collection.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.
void ExportPlantUml(StreamWriter Output, int Indentation, char QuoteChar)
Exports PlantUML
Task< object > EvaluateAsync(Variables Variables)
Evaluates the value.
Interface for nodes holding a value node