Timeline now passed via constructor
[Mograsim.git] / era.mi / src / era / mi / logic / components / Component.java
1 package era.mi.logic.components;
2
3 import java.util.List;
4
5 import era.mi.logic.timeline.Timeline;
6 import era.mi.logic.wires.Wire.ReadEnd;
7 import era.mi.logic.wires.Wire.ReadWriteEnd;
8
9 public abstract class Component
10 {
11         protected Timeline timeline;
12
13         public Component(Timeline timeline)
14         {
15                 this.timeline = timeline;
16         }
17
18         /**
19          * Returns immutable list of all inputs to the {@link Component} (including e.g. the select bits to a MUX). Intended for visualization
20          * in the UI.
21          */
22         public abstract List<ReadEnd> getAllInputs();
23
24         /**
25          * Returns immutable list of all outputs to the {@link Component}. Intended for visualization in the UI.
26          */
27         public abstract List<ReadWriteEnd> getAllOutputs();
28 }