ui.h

Go to the documentation of this file.
00001 // Copyright (C) 2006 Bryan Jacobson <bryanjacobson@users.sourceforge.net>
00002 // This program is licensed under the terms of the GNU General Public License
00003 // version 2, as published by the Free Software Foundation.
00004 // This program is distributed in the hope that it will be useful,
00005 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00006 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007 
00008 #ifndef UI_h
00009 #define UI_h
00010 
00011 // =============================================================
00013 // Class UI implements a command line user interface.
00014 
00015 // Responsibilities:
00016 //   <li> Print output text.
00017 //   <li> Receive input text.
00018 
00019 // Collaborator classes:
00020 //   <li> ArchiveDialog??
00021 
00022 
00023 // @author Bryan Jacobson
00024 // @version 0.1
00026 // =============================================================
00027 class UI
00028 {
00029   public:
00031       // Object constructor
00033     UI(); // Constructor
00035       // Handles all initialization.
00037     void Init();
00039       // Output text (print text to stdout)
00041     void OutputText(char *text); 
00043       // Prompt then get input text from stdin.
00044       // Note: 1. If EOF is encountered, return NULL. 2. The pointer
00045       // returned refers to a buffer that is overwritten on each successive
00046       // call to InputText().
00048     char *InputText();
00049   private:
00051     void CleanInput(char *buf);
00052 };
00053 
00054 #endif // UI_h

Generated on Sun Oct 8 09:32:09 2006 for gabbie by  doxygen 1.4.6