ui_Confirm Class Reference
[Command line interface]

#include <ui_helpers.h>

List of all members.


Detailed Description

Definition at line 101 of file ui_helpers.h.


Static Public Member Functions

static bool Confirm ()

Member Function Documentation

bool ui_Confirm::Confirm (  )  [static]

Definition at line 193 of file ui_helpers.cpp.

References cmn_StrUpperCase(), dbg_DETAIL, dbg_LOW, ipc_Corba::IsInShutdown(), log_DBG_m, and log_FUNC_m.

Referenced by _tmain(), and main().

00193                         {
00194     log_FUNC_m(Confirm);
00195 
00196     string cmd;
00197     while (!ipc_Corba::IsInShutdown()) {
00198         cmd.clear();
00199         cout << "Are you sure? [yes/No] ";
00200         cin >> noskipws >> cmd;
00201 
00202         log_DBG_m(dbg_LOW,"Confirmation invoked with >" << cmd << "<");
00203         if( cmd.empty() ) {
00204             return false;
00205         }
00206 
00207         cmn_StrUpperCase(cmd);
00208 
00209         log_DBG_m(dbg_DETAIL, "after toupper >" << cmd << "<");
00210 
00211         if ( cmd.compare("YES") == 0 ) {
00212             return true;
00213         }
00214         else if( cmd.empty() || cmd.compare("NO") == 0) {
00215             return false;
00216         }
00217     }
00218     return false;
00219 
00220 }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:51:02 2012 for OPENARCHIVE by  doxygen 1.5.6