Add getName for wire
This commit is contained in:
parent
031fea3e0a
commit
d08c7cb919
@ -30,10 +30,15 @@ void Wire::setValue(int newValue, int setTime)
|
|||||||
|
|
||||||
int Wire::getNumber() const
|
int Wire::getNumber() const
|
||||||
{
|
{
|
||||||
return wireNumber;
|
return WireNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wire::addGate(Gate * newGate)
|
void Wire::addGate(Gate * newGate)
|
||||||
{
|
{
|
||||||
gates.push_back(newGate);
|
gates.push_back(newGate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string Wire::getName() const
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
12
src/Wire.h
12
src/Wire.h
@ -13,14 +13,16 @@ class Wire {
|
|||||||
public:
|
public:
|
||||||
Wire(int number, bool io, string inName = "");
|
Wire(int number, bool io, string inName = "");
|
||||||
|
|
||||||
int getValue(int time) const;
|
|
||||||
void setValue(int newValue, int setTime);
|
|
||||||
|
|
||||||
int getNumber() const;
|
|
||||||
void addGate(Gate* newGate);
|
void addGate(Gate* newGate);
|
||||||
|
|
||||||
|
int getValue(int time) const;
|
||||||
|
int getNumber() const;
|
||||||
|
string getName() const;
|
||||||
|
|
||||||
|
void setValue(int newValue, int setTime);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int wireNumber, value, lastEvent;
|
int WireNumber, value, lastEvent;
|
||||||
vector<int> history;
|
vector<int> history;
|
||||||
string name;
|
string name;
|
||||||
bool isPrint;
|
bool isPrint;
|
||||||
|
Loading…
Reference in New Issue
Block a user