/* * TextDialog.cpp * * Created on: Jan 5, 2010 * Author: crueger */ #include #include "TextDialog.hpp" #include "log.hpp" #include "verbose.hpp" using namespace std; TextDialog::TextDialog() { } TextDialog::~TextDialog() { } void TextDialog::queryInt(const char* title, int* target){ registerQuery(new IntTextQuery(title,target)); } void TextDialog::queryString(const char* title, string* target){ registerQuery(new StringTextQuery(title,target)); } TextDialog::IntTextQuery::IntTextQuery(string title,int *_target) : Dialog::IntQuery(title,_target) {} TextDialog::IntTextQuery::~IntTextQuery() {} bool TextDialog::IntTextQuery::handle() { Log() << Verbose(0) << IntQuery::getTitle(); cin >> tmp; return true; } TextDialog::StringTextQuery::StringTextQuery(string title,string *_target) : Dialog::StringQuery(title,_target) {} TextDialog::StringTextQuery::~StringTextQuery() {} bool TextDialog::StringTextQuery::handle() { Log() << Verbose(0) << StringQuery::getTitle(); cin >> tmp; return true; }