本文整理汇总了C++中Param::getDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ Param::getDescription方法的具体用法?C++ Param::getDescription怎么用?C++ Param::getDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Param
的用法示例。
在下文中一共展示了Param::getDescription方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: registerOptionsAndFlags_
void registerOptionsAndFlags_()
{
registerInputFile_("in", "<file>", "", "featureXML or consensusXML file");
setValidFormats_("in", ListUtils::create<String>("featureXML,consensusXML"));
registerOutputFile_("out", "<file>", "", "mzTab file");
setValidFormats_("out", ListUtils::create<String>("csv"));
registerOutputFile_("out_annotation", "<file>", "", "A copy of the input file, annotated with matching hits from the database.", false);
setValidFormats_("out_annotation", ListUtils::create<String>("featureXML,consensusXML"));
// move some params from algorithm section to top level (to support input file functionality)
Param p = AccurateMassSearchEngine().getDefaults();
registerTOPPSubsection_("db", "Database files which contain the identifications");
registerInputFile_("db:mapping", "<file>", p.getValue("db:mapping"), p.getDescription("db:mapping"), true, false, ListUtils::create<String>("skipexists"));
setValidFormats_("db:mapping", ListUtils::create<String>("tsv"));
registerInputFile_("db:struct", "<file>", p.getValue("db:struct"), p.getDescription("db:struct"), true, false, ListUtils::create<String>("skipexists"));
setValidFormats_("db:struct", ListUtils::create<String>("tsv"));
registerInputFile_("positive_adducts_file", "<file>", p.getValue("positive_adducts_file"), p.getDescription("positive_adducts_file"), true, false, ListUtils::create<String>("skipexists"));
setValidFormats_("positive_adducts_file", ListUtils::create<String>("tsv"));
registerInputFile_("negative_adducts_file", "<file>", p.getValue("negative_adducts_file"), p.getDescription("negative_adducts_file"), true, false, ListUtils::create<String>("skipexists"));
setValidFormats_("negative_adducts_file", ListUtils::create<String>("tsv"));
// addEmptyLine_();
// addText_("Parameters for the accurate mass search can be given in the 'algorithm' part of INI file.");
registerSubsection_("algorithm", "Algorithm parameters section");
}
示例2: float
Param p300;
TEST_EXCEPTION(Exception::UnableToCreateFile, paramFile.store("/does/not/exist/FileDoesNotExist.xml",p300))
String filename;
NEW_TMP_FILE(filename);
paramFile.store(filename,p2);
Param p3;
paramFile.load(filename,p3);
TEST_REAL_SIMILAR(float(p2.getValue("test:float")), float(p3.getValue("test:float")))
TEST_EQUAL(p2.getValue("test:string"), p3.getValue("test:string"))
TEST_EQUAL(p2.getValue("test:int"), p3.getValue("test:int"))
TEST_REAL_SIMILAR(float(p2.getValue("test2:float")), float(p3.getValue("test2:float")))
TEST_EQUAL(p2.getValue("test2:string"), p3.getValue("test2:string"))
TEST_EQUAL(p2.getValue("test2:int"), p3.getValue("test2:int"))
TEST_STRING_EQUAL(p2.getDescription("test:float"), p3.getDescription("test:float"))
TEST_STRING_EQUAL(p2.getDescription("test:string"), p3.getDescription("test:string"))
TEST_STRING_EQUAL(p2.getDescription("test:int"), p3.getDescription("test:int"))
TEST_EQUAL(p3.getSectionDescription("test"),"sectiondesc")
TEST_EQUAL(p3.getDescription("test:a:a1"),"a1desc\"<>\nnewline")
TEST_EQUAL(p3.getSectionDescription("test:b"),"bdesc\"<>\nnewline")
TEST_EQUAL(p3.getSectionDescription("test2:a"),"adesc")
TEST_EQUAL(p3.hasTag("test2:b:b1","advanced"),true)
TEST_EQUAL(p3.hasTag("test2:a:a1","advanced"),false)
TEST_EQUAL(ParamXMLFile().isValid(filename, std::cerr),true)
//advanced
NEW_TMP_FILE(filename);
Param p7;
p7.setValue("true",5,"",ListUtils::create<String>("advanced"));
p7.setValue("false",5,"");