- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
if ( (_gen_statP==tm_Manual) ||
(_gen_statP==tm_OK) && (_cur_statP!=tm_Manual) ||
(_gen_statP==tm_ValidTM) && (_cur_statP!=tm_Manual) && (_cur_statP!=tm_OK) ||
(_gen_statP==tm_Rejected) && (_cur_statP!=tm_Manual) && (_cur_statP!=tm_OK) && (_cur_statP!=tm_ValidTM) ||
(_gen_statP==tm_Bad) && (_cur_statP!=tm_Manual) && (_cur_statP!=tm_OK) && (_cur_statP!=tm_ValidTM) && (_cur_statP!=tm_Rejected) ||
(_gen_statP==tm_Statistic) && (_cur_statP!=tm_Manual) && (_cur_statP!=tm_OK) && (_cur_statP!=tm_ValidTM) && (_cur_statP!=tm_Rejected) && (_cur_statP!=tm_Bad)
) {
_cur_statP = _gen_statP;
}
if ( (_gen_statQ==tm_Manual) ||
(_gen_statQ==tm_OK) && (_cur_statQ!=tm_Manual) ||
(_gen_statQ==tm_ValidTM) && (_cur_statQ!=tm_Manual) && (_cur_statQ!=tm_OK) ||
(_gen_statQ==tm_Rejected) && (_cur_statQ!=tm_Manual) && (_cur_statQ!=tm_OK) && (_cur_statQ!=tm_ValidTM) ||
(_gen_statQ==tm_Bad) && (_cur_statQ!=tm_Manual) && (_cur_statQ!=tm_OK) && (_cur_statQ!=tm_ValidTM) && (_cur_statQ!=tm_Rejected) ||
(_gen_statQ==tm_Statistic) && (_cur_statQ!=tm_Manual) && (_cur_statQ!=tm_OK) && (_cur_statQ!=tm_ValidTM) && (_cur_statQ!=tm_Rejected) && (_cur_statQ!=tm_Bad)
) {
_cur_statQ = _gen_statQ;
}
Вроде работает, но уж больно некрасиво) по идее вычисляет новый статус в соответствии с "приоритетом"
dwarf_with_beer 06.08.2013 09:22 # 0
guest 20.08.2013 19:13 # −1