22 lines
523 B
C++
22 lines
523 B
C++
#ifndef __CONSOLE_OUTPUT_H__
|
|
#define __CONSOLE_OUTPUT_H__
|
|
|
|
#include <iostream>
|
|
#include "display.h"
|
|
|
|
class console_output final : public display {
|
|
private:
|
|
std::ostream &out;
|
|
std::string get_code(const int attrs);
|
|
public:
|
|
console_output(std::ostream &cout);
|
|
|
|
void render() override;
|
|
void print_char(const position &pos,
|
|
const char ch, const int attrs) override;
|
|
void print_str(const position &pos,
|
|
const std::string &str, const int attrs) override;
|
|
};
|
|
|
|
#endif
|