#pragma once

#include "AbstractChecksumCalculator.h"

#include <vector>

class BitStream;

class AbstractEncoder
{
public:
    AbstractEncoder(BitStream* inputStream, BitStream* outputStream)
        : mInputStream(inputStream),
          mOutputStream(outputStream)
    {

    }

    virtual ~AbstractEncoder() = default;

    void addChecksumCalculator(AbstractChecksumCalculator* calculator)
    {
        mChecksumCalculators.push_back(calculator);
    }

    virtual bool encode() = 0;
    virtual bool decode() = 0;

protected:

    std::vector<AbstractChecksumCalculator*> mChecksumCalculators;
    BitStream* mInputStream{nullptr};
    BitStream* mOutputStream{nullptr};
};
