<commit_before>/*
 * console.cpp
 *
 *  Created on: May 2, 2016
 *      Author: Tumblr
 */

#include <vector>
#include <string>
#include <iostream>
#include "console.h"

using namespace std;

Console::Console() {
	// TODO Auto-generated constructor stub

	clear();
}

Console::~Console() {
	// TODO Auto-generated destructor stub
}

bool Console::add_image(ImageMap* image) {
    images.push_back(image);
    update();
    return true;
}

bool Console::add_image(string image_str) {
    ImageMap* image = new ImageMap(image_str);
    add_image(image);
    return true;
}

bool Console::add_image(string image_str, int x, int y) {
    ImageMap* image = new ImageMap(image_str, x, y);
    add_image(image);
    return true;
}

void Console::print() {
	clear_console();
	for(vector<char> row : console) {
		for(char col : row)
			cout << col;
		cout << endl;
	}
	cout << "Input: ";
}

void Console::clear() { 
    console.clear();
    images.clear();

    // Fills our screen with empty space
    for(size_t i = 0; i < get_height()-1; i++) {
        vector<char> row;
        for(size_t j = 0; j < get_width(); j++)
            row.push_back(' ');
        console.push_back(row);
    }<commit_msg>Started adding function documentation<commit_after>/*
 * console.cpp
 *
 *  Created on: May 2, 2016
 *      Author: Tumblr
 */

#include <vector>
#include <string>
#include <iostream>
#include "console.h"

using namespace std;

/*
 * Default constructor of Console class
 */
Console::Console() {
	clear();
}

/*
 * Default destructor of Console class
 */
Console::~Console() {
	// TODO Auto-generated destructor stub
}

bool Console::add_image(ImageMap* image) {
    images.push_back(image);
    update();

    return true;
}

bool Console::add_image(string image_str) {
    ImageMap* image = new ImageMap(image_str);
    add_image(image);

    return true;
}

bool Console::add_image(string image_str, int x, int y) {
    ImageMap* image = new ImageMap(image_str, x, y);
    add_image(image);

    return true;
}

void Console::print() {
	clear_console();

	for(vector<char> row : console) {
		for(char col : row)
			cout << col;
		cout << endl;
	}

	cout << "Input: ";
}

void Console::clear() { 
    console.clear();
    images.clear();

    // Fills our screen with empty space
    for(size_t i = 0; i < get_height()-1; i++) {
        vector<char> row;
        for(size_t j = 0; j < get_width(); j++)
            row.push_back(' ');
        console.push_back(row);
    }
{'fraction_non_alphanumeric': 0.15032414910858996, 'fraction_numerical': 0.006482982171799027, 'mean_word_length': 3.108153078202995, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3675892', 'n_tokens_mistral': 875, 'n_tokens_neox': 839, 'n_words': 219}