#pragma once

#include "LogicGate.h"

class AndLogicGate : public TwoInOneOutLogicGate
{
public:
    AndLogicGate(Wire* input0 = nullptr, Wire* input1 = nullptr, Wire* output = nullptr);

    virtual ~AndLogicGate() = default;

    const TruthTable& getTruthTable()
    {
        return mTable;
    }

    GateType getGateType() const
    {
        return GateType::AND;
    }

private:
    TruthTable mTable{ TruthTable(2, 1) };
};

class OrLogicGate : public TwoInOneOutLogicGate
{
public:
    OrLogicGate(Wire* input0 = nullptr, Wire* input1 = nullptr, Wire* output = nullptr);

    virtual ~OrLogicGate() = default;

    const TruthTable& getTruthTable()
    {
        return mTable;
    }

    GateType getGateType() const
    {
        return GateType::OR;
    }

private:
    TruthTable mTable{ TruthTable(2, 1) };
};