当前位置: 首页>>代码示例>>C++>>正文


C++ SequenceTree::GetStatus方法代码示例

本文整理汇总了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;
}
开发者ID:welcheb,项目名称:jemris,代码行数:60,代码来源:jemris.cpp


注:本文中的SequenceTree::GetStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。