本文整理汇总了C++中SequenceTree::GetStatus方法的典型用法代码示例。如果您正苦于以下问题:C++ SequenceTree::GetStatus方法的具体用法?C++ SequenceTree::GetStatus怎么用?C++ SequenceTree::GetStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SequenceTree
的用法示例。
在下文中一共展示了SequenceTree::GetStatus方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main (int argc, char *argv[]) {
//print usage
cout << "\njemris " << VERSION;
#ifdef GIT_COMMIT
cout << " (" << GIT_COMMIT << ")";
#endif
cout << "\n" << endl;
if (argc==1) {
usage();
return 0;
}
string input (argv[1]);
//CASE 1: Dump list of modules in xml file
if (input == "modlist") {
SequenceTree* seqTree = SequenceTree::instance();
seqTree->SerializeModules("mod.xml");
//delete seqTree;
return 0;
}
//CASE 2: try Dump of seq-diagram from Sequence xml-file
SequenceTree* seqTree = SequenceTree::instance();
seqTree->Initialize(input);
if (seqTree->GetStatus()) {
seqTree->Populate();
ConcatSequence* seq = seqTree->GetRootConcatSequence();
seq->SeqDiag("seq.h5");
seq->DumpTree();
if (argc==3) seq->WriteStaticXML("jemris_seq.xml");
//delete seqTree;
return 0;
}
//CASE 3: try simulation from Simulator xml-file
Simulator sim (input);
if (sim.GetStatus()) {
static clock_t runtime = clock();
do_simu(&sim);
runtime = clock() - runtime;
printf ("Actual simulation took %.2f seconds.\n", runtime / 1000000.0);
return 0;
}
//CASE 4: try Dump of sensitivities from CoilArray xml-file
CoilArray* coils = new CoilArray();
cout << "dumping sensitivity maps to sensmaps.h5 ...\n";
coils->Initialize(input);
if (coils->Populate() == OK) {
coils->DumpSensMaps(true);
cout << "done!\n";
return 0;
}
//OTHERWISE: not a valid input
cout << input << " is not a valid input.\n";
return 0;
}