//
// Created by rhetenor on 20.11.18.
//

#ifndef FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_EIGHTDIGITDISPLAY_H
#define FLIPPR_DRIVER_OUTPUT_ITEMS_IMPL_EIGHTDIGITDISPLAY_H

#include "output/items/detail/Display.h"

#include "output/items/EightDigitDisplay.h"

#include "utility/config.h"

namespace flippR_driver
{
namespace output
{
namespace items
{
namespace detail
{

class EightDigitDisplay : public virtual items::detail::Display, public virtual items::EightDigitDisplay
{
public:
  EightDigitDisplay(const uint8_t & address, const std::string & name) :
    detail::Display(address, name)
  {
    CLOG(DEBUG, OUTPUT_LOGGER) << "Created EightDigitDisplay " << name << " with address " << int{this->address};
  }

  ~EightDigitDisplay() override = default;

  void write_score(unsigned int score) override
  {
    detail::Display::write_score(score, 8);
  }

  void write_content(std::string content) override
  {
    detail::Display::write_content(content, 8);
  }

  std::string get_name() const override
  {
    return name;
  }

};

}
}
}
}
#endif //FLIPPR_DRIVER_EIGHTDIGITDISPLAY_H
