Add getName for wire

This commit is contained in:
daniel 2017-04-23 19:59:57 -04:00
parent 031fea3e0a
commit d08c7cb919
2 changed files with 13 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;