mirror of
https://github.com/cmosher01/Epple-II.git
synced 2024-09-27 07:54:58 +00:00
28 lines
691 B
C++
28 lines
691 B
C++
/*
|
|
* File: TransNetwork.cpp
|
|
* Author: cmosher
|
|
*
|
|
* Created on December 11, 2013, 10:44 AM
|
|
*/
|
|
|
|
#include "TransNetwork.h"
|
|
#include "TransCache.h"
|
|
#include "SegmentCache.h"
|
|
#include "StateCalculator.h"
|
|
#include "trans.h"
|
|
#include <iostream>
|
|
#include <set>
|
|
#include <string>
|
|
#include <memory>
|
|
|
|
TransNetwork::TransNetwork(std::istream& in, SegmentCache& segs, TransCache& transes) : segs(segs), transes(transes) {
|
|
std::string c1, gate, c2;
|
|
in >> c1 >> gate >> c2;
|
|
while (in.good()) {
|
|
this->transes.add(this->segs.getOrAdd(c1), this->segs.getOrAdd(gate), this->segs.getOrAdd(c2));
|
|
in >> c1 >> gate >> c2;
|
|
}
|
|
|
|
StateCalculator::recalc(this->segs.all());
|
|
}
|