int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { Filter events; if (events.parse_args (argc, argv) == -1) { return 1; } try { events.init (argc, argv); events.run_test (); } catch (const CORBA::Exception& se) { se._tao_print_exception ("Error: "); return 1; } return 0; }
bool diaos_init() { bool status = true; filter.init( util.get_apk_dir() ); status &= opcodeTracer.init( util.get_apk_dir() ); status &= regTracer.init( util.get_apk_dir() ); status &= funcTracer.init( util.get_apk_dir() ); status &= objTracer.init( util.get_apk_dir() ); status &= pareTracer.init(); return status; }
// Split graph in two branches by acyclic edge (its vertices are in different branches) void MoleculeLayoutGraph::_makeBranches (Array<int> &branches, int edge, Filter &filter) const { branches.clear_resize(vertexEnd()); branches.zerofill(); QS_DEF(Array<int>, dfs_stack); dfs_stack.clear(); dfs_stack.push(_first_vertex_idx); int i, v, u; // DFS: find paths from v avoiding given edge while (dfs_stack.size() > 0) { v = dfs_stack.top(); branches[v] = 1; const Vertex &vert = getVertex(v); bool no_push = true; for (i = vert.neiBegin(); i < vert.neiEnd(); i = vert.neiNext(i)) { if (vert.neiEdge(i) == edge) continue; u = vert.neiVertex(i); if (!branches[u]) { dfs_stack.push(u); no_push = false; break; } } if (no_push) dfs_stack.pop(); } filter.init(branches.ptr(), Filter::EQ, 1); }
void on_add_effect(char *name) { gtk_menu_set_active(menu_effect,0); Layer *laysel = (Layer*) env->layers.selected(); Filter *filt; if(!laysel) { error("no layer selected for effect %s",name); return; } /* TODO plugin selection by name inside plugger i don't do this now, will develop LiViDO and come back later */ for(int c=0; (filt = (Filter*)env->plugger.plugs[c]) ; c++) { if(filt->list) continue; if(strcasecmp(filt->getname(),name)==0) { if(!filt->init(&laysel->geo)) { error("Filter %s can't initialize",filt->getname()); continue; } laysel->filters.append(filt); /* filter is automatically selected */ laysel->filters.sel(0); filt->sel(true); } } }
void BiconnectedDecomposer::getComponent (int idx, Filter &filter) const { filter.init(_components[idx]->ptr(), Filter::EQ, 1); }