-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathICLoader.h
More file actions
31 lines (24 loc) · 814 Bytes
/
ICLoader.h
File metadata and controls
31 lines (24 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Created by liam on 11/04/16.
//
#ifndef COMPUTER_ICLOADER_H
#define COMPUTER_ICLOADER_H
#include "logic.h"
#include <deque>
class Component {
private:
std::map<std::string, Gate*> gates;
std::string name;
public:
std::map<std::string, Input*> inputs; //TODO Make inputs and outputs private again
std::map<std::string, Output*> outputs;
Component(std::string name, std::string filename);
void set(std::string inputName, bool state);
Output* getOutput(std::string outputName);
static void update(Gate* startNode);
static void BFSUpdate(Gate* node, std::deque<Gate*> *queue);
friend std::ostream& operator<< (std::ostream& os, const Component& component);
void printGraph();
std::map<std::string, bool> getOutputs();
};
#endif //COMPUTER_ICLOADER_H