OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000090OMNeT++simulation kernelpublic2009-07-24 17:112009-07-25 12:37
Reporterypsilon 
Assigned Toandras 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version4.0 
Target VersionFixed in Version 
Summary0000090: simple module inheritance does not work - parent class is used instead of child
Descriptiongiven:
child module with class/name Child, parent module with class/name Parent
network:
using child module
expected:
class Child is used
observed:
class Parent is used

see test file and results below:
Additional Information*** cSimpleModule_inheritance.test: FAIL (stdout fails %contains(1) rule)
expected substring:
>>>>Initializing...
Initializing module Test, stage 0
Initializing module Test.child, stage 0
child Test.child<<<<
actual output:
>>>>OMNeT++ Discrete Event Simulation (C) 1992-2008 Andras Varga, OpenSim Ltd.
Version: 4.0, build: 090310-10709, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
Setting up Cmdenv...
Loading NED files from .: 2
Loading NED files from ../lib: 4

Preparing for running configuration General, run #0...
Scenario: $repetition=0
Assigned runID=General-0-20090724-18:09:43-8533
Setting up network `Test'...
Initializing...
Initializing module Test, stage 0
Initializing module Test.child, stage 0
parent Test.child

Running simulation...

<!> No more events -- simulation ended.


Calling finish() at end of Run #0...

End.
<<<<
========================================
PASS: 0 FAIL: 1 UNRESOLVED: 0
TagsNo tags attached.
Attached Files? file icon cSimpleModule_inheritance.test [^] (817 bytes) 2009-07-24 17:11

- Relationships

-  Notes
(0000159)
andras (administrator)
2009-07-25 12:36

This is the expected behavior. The class is inherited from the parent; to override it, use @class(ClassName).

This is described at several places in the manual: NED chapter "3.3 Simple modules", "3.13 Inheritance"; Appendix NED Reference "17.4.7 Resolving the implementation C++ class"

- Issue History
Date Modified Username Field Change
2009-07-24 17:11 ypsilon New Issue
2009-07-24 17:11 ypsilon File Added: cSimpleModule_inheritance.test
2009-07-25 12:36 andras Note Added: 0000159
2009-07-25 12:37 andras Status new => resolved
2009-07-25 12:37 andras Resolution open => no change required
2009-07-25 12:37 andras Assigned To => andras


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker