32 lines
594 B
C++
32 lines
594 B
C++
#pragma once
|
|
|
|
#include <map>
|
|
#include <vector>
|
|
|
|
class TruthTable
|
|
{
|
|
public:
|
|
using TableData = std::map<std::vector<bool>, std::vector<bool> >;
|
|
|
|
TruthTable(std::size_t, std::size_t)
|
|
//: mNumInputColumns(numInputColumns),
|
|
// mNumOutputColumns(numOutputColumns)
|
|
{
|
|
|
|
}
|
|
|
|
void setTable(const TableData& data)
|
|
{
|
|
mTable = data;
|
|
}
|
|
|
|
static TruthTable getAndTruthTable();
|
|
|
|
static const TruthTable::TableData AND_TRUTH_TABLE;
|
|
|
|
private:
|
|
//std::size_t mNumInputColumns{ 0 };
|
|
//std::size_t mNumOutputColumns{ 0 };
|
|
|
|
TableData mTable;
|
|
};
|