/* * Dialog.cpp * * Created on: Jan 5, 2010 * Author: crueger */ #include #include "UIElements/Dialog.hpp" using namespace std; Dialog::Dialog() { // TODO Auto-generated constructor stub } Dialog::~Dialog() { // TODO Auto-generated destructor stub } void Dialog::queryInt(const char *_title, int *_target) { Query q; q.title = _title; q.type = Int; q.target = (void*) _target; queries.push_back(q); } void Dialog::queryString(const char *_title, string *_target) { Query q; q.title = _title; q.type = String; q.target = (void*) _target; queries.push_back(q); } void Dialog::display(){ list::iterator iter; for(iter=queries.begin(); iter!=queries.end(); iter++){ switch((*iter).type) { case Int: handleInt((*iter).title,(int*)((*iter).target)); break; case String: handleString((*iter).title,(string*)((*iter).target)); break; default: assert(0 && "This type of query does not seem to exist... Something is seriously wrong"); break; } } }