mirror of
https://github.com/cmosher01/v6502cpp.git
synced 2026-01-26 08:16:21 +00:00
more WIP on new pointer-based data structure
This commit is contained in:
28
TransNetwork.cpp
Normal file
28
TransNetwork.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* File: TransNetwork.cpp
|
||||
* Author: cmosher
|
||||
*
|
||||
* Created on December 11, 2013, 10:44 AM
|
||||
*/
|
||||
|
||||
#include "TransNetwork.h"
|
||||
#include "trans.h"
|
||||
#include "SegmentCache.h"
|
||||
#include <iostream>
|
||||
|
||||
TransNetwork::TransNetwork(std::istream& readFromHere) {
|
||||
SegmentCache segs;
|
||||
|
||||
std::string c1, gate, c2;
|
||||
readFromHere >> c1 >> gate >> c2;
|
||||
while (readFromHere.good()) {
|
||||
Trans trans(segs.getOrAdd(c1), segs.getOrAdd(gate), segs.getOrAdd(c2));
|
||||
std::cout << trans;
|
||||
|
||||
readFromHere >> c1 >> gate >> c2;
|
||||
}
|
||||
std::cout << std::endl << "done" << std::endl;
|
||||
}
|
||||
|
||||
TransNetwork::~TransNetwork() {
|
||||
}
|
||||
Reference in New Issue
Block a user