void MWorkFile::dump( WFile& fil ) { MRule* rule = _item->rule(); WString& mask = _component->mask(); fil.printf( "#%FP", this ); fil.printf( ", %s:%s", (const char*)mask, (const char*)rule->tag() ); fil.printf( ", %s", (const char*)*this ); WString n; int icount = _states.count(); if( icount > 0 ) { bool first = TRUE; for( int i=0; i<icount; i++ ) { MState* st = (MState*)_states[i]; WString temp; st->sw()->getText( temp, st ); if( temp.size() > 0 ) { if( first ) n.concat( " (" ); if( !first ) n.concat( ' ' ); n.concat( temp ); first = FALSE; } } if( !first ) n.concat( ')' ); } fil.printf( " %s\n", (const char*)n ); }
MRule* MConfig::findRule( WString& ruletag ) { int icount = _rules.count(); for( int i=0; i<icount; i++ ) { MRule* rule = (MRule*)_rules[i]; if( ruletag == rule->tag() ) { return( rule ); } } return( NULL ); }