void showInstantiateAlgorithmError(const char* szMessage, GArgReader& args) { cerr << "_________________________________\n"; cerr << szMessage << "\n\n"; const char* szAlgName = args.peek(); UsageNode* pAlgTree = makeCollaborativeFilterUsageTree(); Holder<UsageNode> hAlgTree(pAlgTree); if(szAlgName) { UsageNode* pUsageAlg = pAlgTree->choice(szAlgName); if(pUsageAlg) { cerr << "Partial Usage Information:\n\n"; pUsageAlg->print(cerr, 0, 3, 76, 1000, true); } else { cerr << "\"" << szAlgName << "\" is not a recognized algorithm. Try one of these:\n\n"; pAlgTree->print(cerr, 0, 3, 76, 1, false); } } else { cerr << "Expected an algorithm. Here are some choices:\n"; pAlgTree->print(cerr, 0, 3, 76, 1, false); } cerr << "\nTo see full usage information, run:\n waffles_learn usage\n\n"; cerr << "For a graphical tool that will help you to build a command, run:\n waffles_wizard\n"; cerr.flush(); }
void showError(GArgReader& args, const char* szAppName, const char* szMessage) { cerr << "_________________________________\n"; cerr << szMessage << "\n\n"; args.set_pos(1); const char* szCommand = args.peek(); UsageNode* pUsageTree = makeClusterUsageTree(); std::unique_ptr<UsageNode> hUsageTree(pUsageTree); if(szCommand) { UsageNode* pUsageCommand = pUsageTree->choice(szCommand); if(pUsageCommand) { cerr << "Brief Usage Information:\n\n"; cerr << szAppName << " "; pUsageCommand->print(cerr, 0, 3, 76, 1000, true); } else { cerr << "Brief Usage Information:\n\n"; pUsageTree->print(cerr, 0, 3, 76, 1, false); } } else { pUsageTree->print(cerr, 0, 3, 76, 1, false); cerr << "\nFor more specific usage information, enter as much of the command as you know.\n"; } cerr << "\nTo see full usage information, run:\n " << szAppName << " usage\n\n"; cerr << "For a graphical tool that will help you to build a command, run:\n waffles_wizard\n"; cerr.flush(); }
void showInstantiateNeighborFinderError(const char* szMessage, GArgReader& args) { cerr << "_________________________________\n"; cerr << szMessage << "\n\n"; const char* szNFName = args.peek(); UsageNode* pNFTree = makeNeighborUsageTree(); Holder<UsageNode> hNFTree(pNFTree); if(szNFName) { UsageNode* pUsageAlg = pNFTree->choice(szNFName); if(pUsageAlg) { cerr << "Partial Usage Information:\n\n"; pUsageAlg->print(cerr, 0, 3, 76, 1000, true); } else { cerr << "\"" << szNFName << "\" is not a recognized neighbor-finding techniqie. Try one of these:\n\n"; pNFTree->print(cerr, 0, 3, 76, 1, false); } } else { cerr << "Expected a neighbor-finding technique. Here are some choices:\n"; pNFTree->print(cerr, 0, 3, 76, 1, false); } cerr << "\nTo see full usage information, run:\n waffles_transform usage\n\n"; cerr << "For a graphical tool that will help you to build a command, run:\n waffles_wizard\n"; cerr.flush(); }