v6502cpp/TransNetwork.cpp

26 lines
552 B
C++
Raw Normal View History

/*
* File: TransNetwork.cpp
* Author: cmosher
*
* Created on December 11, 2013, 10:44 AM
*/
#include "TransNetwork.h"
#include "trans.h"
2013-12-12 13:37:45 +00:00
#include <memory>
#include <iostream>
2013-12-12 13:37:45 +00:00
TransNetwork::TransNetwork(std::istream& in) {
std::string c1, gate, c2;
2013-12-12 13:37:45 +00:00
in >> c1 >> gate >> c2;
while (in.good()) {
this->transes.insert(std::make_shared<Trans>(this->segs.getOrAdd(c1), this->segs.getOrAdd(gate), this->segs.getOrAdd(c2)));
in >> c1 >> gate >> c2;
}
2013-12-12 22:05:33 +00:00
this->segs.initCommon();
}
TransNetwork::~TransNetwork() {
}