本文整理汇总了C++中Display::displayTextSearchFiles方法的典型用法代码示例。如果您正苦于以下问题:C++ Display::displayTextSearchFiles方法的具体用法?C++ Display::displayTextSearchFiles怎么用?C++ Display::displayTextSearchFiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::displayTextSearchFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv [])
{
try{
std::cout << "\n Testing Executive Package::";
std::cout << "\n" << std::string(75, '*');
std::cout << "\n";
std::cout << "\nParsing Command line arguments: " << std::endl;
//----< Parsing the command line >--------------------
//int argc = 7;
//char *argv[] = { "C:\\jimFawcett", "*.cpp", "*.h", "*.txt", "/s", "/d", "/f<main>" };
FileMgr fm;
fm.parseCmdLine(argc, argv);
//----< Searching for files and directories >--------------------
fm.search();
//int argc = 7;
Cataloger Ctg(fm);
using vecofObjects = std::vector <DisplayObject>;
Display disp;
std::string condition;
vecofObjects obj= fm.DisplayStore();
disp.DisplayAllFilesandPaths(obj);
if (fm.func_numberofFilesandDirectories())
{
vecofObjects obj1 = Ctg.numberofFilesandDirectories();
disp.numberofFilesandDirectories(obj1);
}
if (fm.func_hasDuplicates())
{
vecofObjects obj = Ctg.FindingDuplicateFiles();
disp.findingDuplicates(obj);
}
bool textSearch = false;
std::string inputforTextSearch;
if (fm.func_textSearch()){
textSearch = true;
}
do
{
std::cout << "\n\n -----< Demonstration of Requirement 8 >----------------" << std::endl;
std::getline(std::cin, inputforTextSearch);
bool textSearch = false;
inputforTextSearch += " ";
condition = inputforTextSearch;
if ((condition != " ") && !fm.parseUserCommand(inputforTextSearch)){
std::cout << "\nInvalid Input!:";
std::cout<<"\nPlease enter in this format: \"INPUTTEXT\"patterns" << std::endl;
}
if (fm.func_textSearch())
{
vecofObjects obj = Ctg.searchInputText(fm.getPatterns(), fm.getSearchtext());
disp.displayTextSearchFiles(obj);
}
} while (inputforTextSearch != " ");
}
catch (std::exception ex)
{
std::cout << ex.what()<<"\n\n";
}
}