From cff4e580902a74b199ca93292fabac377ba428e4 Mon Sep 17 00:00:00 2001 From: Jonny007-MKD <1-23-4-5@web.de> Date: Tue, 12 Nov 2013 21:57:56 +0100 Subject: [PATCH] Added header of class Cell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Repräsentiert eine Zelle in einem KV-Diagramm und einer Wertetabelle. --- Hazard/Hazard/Cell.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Hazard/Hazard/Cell.h diff --git a/Hazard/Hazard/Cell.h b/Hazard/Hazard/Cell.h new file mode 100644 index 0000000..67e0c30 --- /dev/null +++ b/Hazard/Hazard/Cell.h @@ -0,0 +1,29 @@ +#include +#include +#include "PrimImplikantCollection.h" + +using namespace std; + +#ifndef CELL +#define CELL + +class Cell { +public: + bool value; + + vector GetNeighbours(); + bool HasHazard(); + + Cell(int index, PrimImplikantCollection* &globalPIC) + { + this->index = index; + this->primImplikanten = globalPIC->primImplikantenAt(index); + this->value = this->primImplikanten.size() > 0; + } + +private: + PrimImplikantCollection primImplikanten; + int index; +}; + +#endif \ No newline at end of file