Essentia
2.1-beta6-dev
|
#include <asciidag.h>
Public Member Functions | |
template<typename NetworkType > | |
AsciiCanvas (const NetworkType &network) | |
AsciiCanvas & | operator= (const std::vector< std::string > &other) |
int | height () const |
int | width () const |
void | addBorder () |
void | fill (char c) |
const std::string & | at (int i) const |
std::string & | at (int i) |
char | at (const Position &pos) const |
char & | at (const Position &pos) |
This class represents an ASCII canvas which can contain anything. It is represented as a matrix of chars
. The only restriction (guarantee?) is that every row (line) has the same number of columns (same length).
|
inlineexplicit |
References ARRAY_SIZE, and essentia::makeRectangle().
void addBorder | ( | ) |
Add an empty border en each of the 4 sides. This might be useful for having to deal with less bounds-checking.
Referenced by AsciiDAGParser::AsciiDAGParser().
|
inline |
References Position::x, and Position::y.
|
inline |
References Position::x, and Position::y.
|
inline |
|
inline |
Referenced by essentia::operator<<(), and AsciiCanvas::width().
void fill | ( | char | c | ) |
Fill the canvas with the given char
|
inline |
Referenced by essentia::operator<<(), and AsciiCanvas::width().
AsciiCanvas& operator= | ( | const std::vector< std::string > & | other | ) |
|
inline |
References AsciiCanvas::at(), and AsciiCanvas::height().