comparison host/libcdl/transact.cxx @ 208:e0c0827131d1 ecos

Merge from eCos master repository on 2002-05-20-20:11:54-BST
author jlarmour
date Mon, 20 May 2002 22:19:26 +0000
parents 42f843b391aa
children 74dbf4c3f2e1
comparison
equal deleted inserted replaced
207:74c807ddde34 208:e0c0827131d1
8 // 8 //
9 //============================================================================ 9 //============================================================================
10 //####COPYRIGHTBEGIN#### 10 //####COPYRIGHTBEGIN####
11 // 11 //
12 // ---------------------------------------------------------------------------- 12 // ----------------------------------------------------------------------------
13 // Copyright (C) 1999, 2000, 2001 Red Hat, Inc. 13 // Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
14 // 14 //
15 // This file is part of the eCos host tools. 15 // This file is part of the eCos host tools.
16 // 16 //
17 // This program is free software; you can redistribute it and/or modify it 17 // This program is free software; you can redistribute it and/or modify it
18 // under the terms of the GNU General Public License as published by the Free 18 // under the terms of the GNU General Public License as published by the Free
2265 } 2265 }
2266 2266
2267 // ---------------------------------------------------------------------------- 2267 // ----------------------------------------------------------------------------
2268 // Can a solution be applied without e.g. overwriting a user value with 2268 // Can a solution be applied without e.g. overwriting a user value with
2269 // an inferred value. There is a setting inference_override which controls 2269 // an inferred value. There is a setting inference_override which controls
2270 // this. 2270 // this. Making a previously enabled option inactive also requires
2271 // user confirmation, thus preventing the inference engine from disabling
2272 // entire components.
2271 bool 2273 bool
2272 CdlTransactionBody::user_confirmation_required() const 2274 CdlTransactionBody::user_confirmation_required() const
2273 { 2275 {
2274 CYG_REPORT_FUNCNAMETYPE("CdlTransaction::user_confirmation_required", "result %d"); 2276 CYG_REPORT_FUNCNAMETYPE("CdlTransaction::user_confirmation_required", "result %d");
2275 CYG_REPORT_FUNCARG1XV(this); 2277 CYG_REPORT_FUNCARG1XV(this);
2282 for (val_i = changes.begin(); val_i != changes.end(); val_i++) { 2284 for (val_i = changes.begin(); val_i != changes.end(); val_i++) {
2283 const CdlValue& old_value = parent->get_whole_value(val_i->first); 2285 const CdlValue& old_value = parent->get_whole_value(val_i->first);
2284 if (old_value.get_source() > CdlTransactionBody::inference_override) { 2286 if (old_value.get_source() > CdlTransactionBody::inference_override) {
2285 result = true; 2287 result = true;
2286 break; 2288 break;
2289 }
2290 }
2291 std::set<CdlNode>::const_iterator val_j;
2292 for (val_j = deactivated.begin(); val_j != deactivated.end(); val_j++) {
2293 CdlValuable valuable = dynamic_cast<CdlValuable>(*val_j);
2294 if (0 != valuable) {
2295 const CdlValue& old_value = parent->get_whole_value(valuable);
2296 if ((old_value.get_source() > CdlTransactionBody::inference_override) && old_value.is_enabled()) {
2297 result = true;
2298 break;
2299 }
2287 } 2300 }
2288 } 2301 }
2289 2302
2290 CYG_REPORT_RETVAL(result); 2303 CYG_REPORT_RETVAL(result);
2291 return result; 2304 return result;