#pragma once
#include <memory>
#include "rfid.h"

class RfIdLogDecorator :
    public IRfId
{
private:
    std::unique_ptr<IRfId> m_base;
    std::string            m_text;
public:
    RfIdLogDecorator(const std::string &text, IRfId *base);
    virtual ~RfIdLogDecorator(void);

    virtual bool    WriteID(const CString &strID);
    virtual bool    ReadID(CString *pResult);
    virtual bool    TestComm();
    virtual CString GetErrorMessage() const;
    void            Log(const char *format, ...);
};
