Anonymous | Login | 2021-03-04 09:50 UTC | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0000756 | OMNeT++ | simulation kernel | public | 2014-05-07 06:48 | 2014-05-07 06:48 | ||||||||
Reporter | till | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | feature | Reproducibility | N/A | ||||||||
Status | new | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000756: Missing feature in NED inheritance (submodule overwriting) | ||||||||||||
Description | I'm missing a feature in the NED inheritance functionality. I need to extend a module and overwrite a submodule with an extended submodule. Please see this example: module Foo { gates: input in; submodules: sub: Submodule; connections: in <--> sub.in; } module Bar extends Foo { gates: output out; submodules: sub: ExtendedSubmodule; // syntax could also be something like "sub: ExtendedSubmodule @override;" connections: out <--> sub.out; } simplemodule Submodule{ gates: input in; } simplemodule ExtendedSubmodule extends Submodule{ gates: input out; } In this example I have a compound module Foo that has a submodule Submodule with a gate in connected to the submodules in. Now I want an extended version of Foo, called Bar that has another gate out. Bar should use an extended version of Submodule called ExtendedSubmodule with a connection from gate out to the submodules gate out. The connection from in to sub.in should be kept. This situation would be totally legal but I think I currently cannot describe it with NED. The nededitor would have to check that ExtendedSubmodule is a subclass of Submodule to ensure that the redefinition of sub in Bar would not break Foo. Perhaps something like: "sub: <default("Submodule")> extends Submodule;" would be a possible way as well, but why not allow the definition of a module with the same name when it extends the overwritten module? Of cause it would require to collect the gate, connection and parameter definitions of the overwritten module as well. I think such a possibility has the potential to save a lot of (ned)code that would be otherwise defined in several modules, and thus reduce the maintenance effort significantly. I hope I'm not the only one who would require that feature :) The good part: that would not require changes in the NED syntax. Would love to see that feature in 5.0 | ||||||||||||
Additional Information | There is a discussion related to this feature request on the omnet list: https://groups.google.com/d/topic/omnetpp/P6Jj_ZXH64o/discussion [^] | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
![]() |
|||
Date Modified | Username | Field | Change |
2014-05-07 06:48 | till | New Issue |
Copyright © 2000 - 2021 MantisBT Team |