| 536 | } |
| 537 | |
| 538 | bool Module::addEnumeration ( const EnumerationPtr & en, bool canFail ) { |
| 539 | if ( enumerations.insert(en->name, en) ) { |
| 540 | en->module = this; |
| 541 | return true; |
| 542 | } else { |
| 543 | if ( !canFail ) { |
| 544 | DAS_FATAL_ERROR("can't add duplicate enumeration %s to module %s\n", en->name.c_str(), name.c_str() ); |
| 545 | } |
| 546 | return false; |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | bool Module::removeStructure ( const StructurePtr & st ) { |
| 551 | return structures.remove(st->name); |
no test coverage detected