blob: 4f9020a6169c77588b0c58eef1621864fb0b51f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Renderer.h
*
* Created on: Nov 23, 2017
* Author: naopross
*/
#ifndef SRC_UI_ASCIIRENDERER_H_
#define SRC_UI_ASCIIRENDERER_H_
#include "../diagram/Structogram.h"
namespace samb {
class AsciiRenderer {
private:
Structogram m_structogram;
const unsigned int m_width;
void drawPadding(unsigned int amt);
void drawLine() const;
void drawText(std::string text, unsigned int width = 0, std::string before = "|", std::string after = "|") const;
void drawDecision(std::string condition, std::string trueText, std::string falseText, unsigned int width = 0) const;
public:
AsciiRenderer(Structogram& structogram, unsigned int width);
~AsciiRenderer();
void render();
};
} /* namespace samb */
#endif /* SRC_UI_ASCIIRENDERER_H_ */
|