- File:
-
- 1 edited
-
src/UIElements/TextUI/Query/MoleculeTextQuery.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/TextUI/Query/MoleculeTextQuery.cpp
r8df74d rd754bb 24 24 #include <Descriptors/MoleculeDescriptor.hpp> 25 25 #include <Descriptors/MoleculeIdDescriptor.hpp> 26 #include "TextUI/ TextDialog.hpp"26 #include "TextUI/Query/TextQuery.hpp" 27 27 28 28 #include "Helpers/Log.hpp" … … 42 42 do{ 43 43 badInput = false; 44 Log() << Verbose(0) << getTitle();45 cin >> idxOfMol;46 if( cin.fail()){44 std::cout << getDescription() << ": "; 45 std::cin >> idxOfMol; 46 if(std::cin.fail()){ 47 47 badInput = true; 48 cin.clear();49 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');50 Log() << Verbose(0) << "Input was not a number!" <<endl;48 std::cin.clear(); 49 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); 50 std::cout << "Input was not a number!" << std::endl; 51 51 continue; 52 52 } … … 54 54 tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol)); 55 55 if(!tmp && idxOfMol!=-1){ 56 Log() << Verbose(0) << "Invalid Molecule Index" <<endl;56 std::cout << "Invalid Molecule Index" << std::endl; 57 57 badInput = true; 58 58 } 59 59 60 60 } while(badInput); 61 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');61 std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n'); 62 62 return (idxOfMol!=-1); 63 63 }
Note:
See TracChangeset
for help on using the changeset viewer.
