2using System.Collections.Generic;
30 public abstract string Id
43 if (this.externalEvents is
null)
44 this.externalEvents =
new Dictionary<string, IExternalEvent>();
46 if (this.externalEvents.ContainsKey(Name))
47 throw new Exception(
"External event named " + Name +
" already registered.");
60 if (this.externalEvents is
null)
66 return this.externalEvents.TryGetValue(Name, out
ExternalEvent);
Root node of a simulation model
Handles an incoming event raised from an external source
string Name
Name of external event
Abstract base class for nodes that registers external events.
ExternalEventsNode(ISimulationNode Parent, Model Model)
Abstract base class for nodes that registers external events.
Dictionary< string, IExternalEvent > externalEvents
Registered external events.
void Register(IExternalEvent ExternalEvent)
Registers an external event on the actor.
bool TryGetExternalEvent(string Name, out IExternalEvent ExternalEvent)
Tries to get an external event, given its name.
abstract string Id
ID of collection node.
virtual void AnnotateActorUseCaseUml(StreamWriter Output, string Id)
Allows the actor to add notes related to the actor in use case diagrams.
Abstract base class for simulation nodes with children
ISimulationNode Parent
Parent node in the simulation model.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
Interface for external events.
Interface for nodes that can register external events.