00001 // ======================================================================== // 00002 // // 00003 // File : user.h // 00004 // Purpose : // 00005 // Time-stamp: <Wed Nov/13/2002 06:08 MET Coder@ReallySoft.de> // 00006 // // 00007 // (C) February 2002 by Ralf Westram // 00008 // // 00009 // Permission to use, copy, modify, distribute and sell this software // 00010 // and its documentation for any purpose is hereby granted without fee, // 00011 // provided that the above copyright notice appear in all copies and // 00012 // that both that copyright notice and this permission notice appear // 00013 // in supporting documentation. // 00014 // // 00015 // Ralf Westram makes no representations about the suitability of this // 00016 // software for any purpose. It is provided "as is" without express or // 00017 // implied warranty. // 00018 // // 00019 // ======================================================================== // 00020 00021 #ifndef USER_H 00022 #define USER_H 00023 00024 #ifndef STRING 00025 #include <string> 00026 #endif 00027 #ifndef VECTOR 00028 #include <vector> 00029 #endif 00030 00031 00032 namespace rs { 00034 namespace user { 00035 00038 void pause(const std::string& message); 00039 00045 std::string ask(const std::string& question, bool allow_empty = false); 00046 00053 bool ask_yn(std::string question, const char *default_answer = 0); 00054 00056 int ask_number(std::string question, int low = INT_MIN, int high = INT_MAX); 00057 00070 size_t choose(const std::string& title, const std::string& answers, char separator = ','); 00071 00077 size_t choose(const std::string& title, const std::vector<std::string>& answers); 00078 00079 }; 00080 }; // end of namespace rs 00081 00082 #else 00083 #error user.h included twice 00084 #endif // USER_H 00085
Contact me in case of errors or questions. This documentation is powered by ![]() |
(C) 2000-2002 ![]() |