コード例 #1
0
ファイル: PSIVisitor.cpp プロジェクト: biswajitbiee/psi
void PSIVisitor::visit_graph(IGraphStmt *graph) {

	if (graph->getStmtType() == IGraphStmt::GraphStmt_Block) {
		IGraphBlockStmt *b = static_cast<IGraphBlockStmt *>(graph);
		for (std::vector<IGraphStmt *>::const_iterator it=b->getStmts().begin();
				it!=b->getStmts().end(); it++) {
			visit_graph_stmt(*it);
		}
	} else {
		visit_graph_stmt(graph);
	}
}
コード例 #2
0
ファイル: PSIVisitor.cpp プロジェクト: mballance/psi
void PSIVisitor::visit_graph(IGraphStmt *activity) {
	fprintf(stdout, "visit_graph: %d\n", activity->getStmtType());
	fflush(stdout);
	if (activity->getStmtType() == IGraphStmt::GraphStmt_Block) {
		IGraphBlockStmt *b = dynamic_cast<IGraphBlockStmt *>(activity);
		push_graph(b);
		for (std::vector<IGraphStmt *>::const_iterator it=b->getStmts().begin();
				it!=b->getStmts().end(); it++) {
			visit_graph_stmt(*it);
		}
		pop_graph();
	} else {
		visit_graph_stmt(activity);
	}
}