projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Timeline now passed via constructor
[Mograsim.git]
/
era.mi
/
src
/
era
/
mi
/
logic
/
components
/
gates
/
NotGate.java
diff --git
a/era.mi/src/era/mi/logic/components/gates/NotGate.java
b/era.mi/src/era/mi/logic/components/gates/NotGate.java
index
1c0d833
..
685bc22
100644
(file)
--- a/
era.mi/src/era/mi/logic/components/gates/NotGate.java
+++ b/
era.mi/src/era/mi/logic/components/gates/NotGate.java
@@
-3,16
+3,18
@@
package era.mi.logic.components.gates;
import java.util.List;
import era.mi.logic.components.BasicComponent;
import java.util.List;
import era.mi.logic.components.BasicComponent;
-import era.mi.logic.wires.Wire.WireEnd;
+import era.mi.logic.timeline.Timeline;
+import era.mi.logic.wires.Wire.ReadEnd;
+import era.mi.logic.wires.Wire.ReadWriteEnd;
public class NotGate extends BasicComponent
{
public class NotGate extends BasicComponent
{
- private
Wire
End in;
- private
Wir
eEnd out;
+ private
Read
End in;
+ private
ReadWrit
eEnd out;
- public NotGate(
int processTime, WireEnd in, Wir
eEnd out)
+ public NotGate(
Timeline timeline, int processTime, ReadEnd in, ReadWrit
eEnd out)
{
{
- super(processTime);
+ super(
timeline,
processTime);
this.in = in;
in.addObserver(this);
this.out = out;
this.in = in;
in.addObserver(this);
this.out = out;
@@
-24,24
+26,24
@@
public class NotGate extends BasicComponent
out.feedSignals(in.getValues().not());
}
out.feedSignals(in.getValues().not());
}
- public
Wire
End getIn()
+ public
Read
End getIn()
{
return in;
}
{
return in;
}
- public
Wire
End getOut()
+ public
Read
End getOut()
{
return out;
}
@Override
{
return out;
}
@Override
- public List<
Wire
End> getAllInputs()
+ public List<
Read
End> getAllInputs()
{
return List.of(in);
}
@Override
{
return List.of(in);
}
@Override
- public List<
Wir
eEnd> getAllOutputs()
+ public List<
ReadWrit
eEnd> getAllOutputs()
{
return List.of(out);
}
{
return List.of(out);
}