本帖最后由 wqqjs1 于 2010-7-7 16:35 编辑 ) h7 E; R+ g H) y
" |4 j3 E/ O* j. d& h- {$ P( g& n/ L下面的程序如何修改可以实现?
7 l5 V/ t5 d' A, q9 W6 _C:\Documents and Settings\in_qq_wang\桌面\未命名.JPG
: V& }0 ? t; Ttreenode item = parnode(1);6 [# {$ H+ n% n, W+ I
treenode current = ownerobject(c);
: }% V' a0 I8 T+ v3 ]) B7 x0 w# ~0 w/**Conditional Port*/: r% D o6 `( y, K/ Z3 h, q
/** \nIf some condition is true (equal to 1), send to a given port. Otherwise, send to a different port.*/
# f2 `, V K+ |& t+ Q/ n* _/ ~/** \nCondition: */. x D4 j# e# k( h3 m, L! X# ]
int condition = /**/1/**/;/** \nPort if Condition is true: */* k9 {4 Z* U+ g6 y e G+ a
int port1 = /**/1/**/;/** \nPort if Condition is false: */; X' ~/ j5 C0 J- c8 y- M/ d. k; u' D
int port2 = /**/2/**/;
; z4 X) m1 s3 B$ I) B' c! Q2 k: cif (condition) |6 G' W, J: l! k8 s2 V; o6 m% ]" U
return port1;3 o6 y- N0 ~2 D( `
- ?6 C! N& k1 m- d7 v: g7 I- Ureturn port2; |