void Scanner::Perform_Timed_Scan(Program_Options const& program_options, std::time_t const& last_run_time){ //start recording the time it takes to perform the scan stats.Start_Timer(); std::cout << colorize_forground("Scan Process",220) << std::endl; //an object that will count the errors, //and help quit the scan early if there are too many of them. Warn_Machine warn_machine(program_options.Warn_Amount()); //there are two main things to scan. the pseudo library, and library resources if (!Pseudo_Library_Scanner::Scan(program_options, warn_machine, last_run_time)) {Stop_Scan(program_options, warn_machine);} if (!Pseudo_Library_Resource_Scanner::Scan(program_options, warn_machine, last_run_time)) {Stop_Scan(program_options, warn_machine);} std::cout << std::endl; //scan is done. stop the timer stats.End_Timer(); //possibly fix warnings [the warnings may already get fixed in the middle of the scan when the program halts.] if (program_options.Fix_Warnings()){ warn_machine.Fix_Warnings(program_options.Prompt_Automatic_Warning_Fixes()); } return; }
std::string Black_String(std::string const& str){ return colorize_forground(str, 16); }
std::string White_String(std::string const& str){ return colorize_forground(str, 7); }
std::string Teal_String(std::string const& str){ return colorize_forground(str, 6); }
std::string Blue_String(std::string const& str){ return colorize_forground(str, 4); }
std::wstring Gold_String(std::wstring const& str){ return colorize_forground(str, 3); }
std::wstring Red_String(std::wstring const& str){ return colorize_forground(str, 1); }
//specific colorizing wstring functions std::wstring Green_String(std::wstring const& str){ return colorize_forground(str, 118); }
void Red_Message(std::string const& str){ std::cerr << colorize_forground(str, 1); return; }
void Green_Message(std::string const& str){ std::cout << colorize_forground(str, 118); return; }