OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000415OMNeT++simulation kernelpublic2011-10-03 16:182011-10-03 16:50
Assigned To 
PlatformOSOS Version
Product Version4.2rc1 
Target VersionFixed in Version 
Summary0000415: cModule initialization status - optimisation
DescriptionThe function cModule::initializeModules(int stage) sets FL_INITIALIZED flag when initialization of this module finished, and its all submodules initialized, too.

When stage larger than 0 and this module is already initialized, the call of submod()->initializeModules(stage) is unnecessary.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
zbojthe (developer)
2011-10-03 16:50

The patch for

bool cModule::initializeModules(int stage)
    if (simulation.getContextType()!=CTX_INITIALIZE)
        throw cRuntimeError("internal function initializeModules() may only be called via callInitialize()");

    if (stage==0)
        if (initialized())
            throw cRuntimeError(this, "initialize() already called for this module");

        // call buildInside() if user has forgotten to do it; this is needed
        // to make dynamic module creation more robust
        if (!buildInsideCalled())

+ if (initialized())
+ return false;
    // first call initialize(stage) for this module...
    int numStages = numInitStages();

- Issue History
Date Modified Username Field Change
2011-10-03 16:18 zbojthe New Issue
2011-10-03 16:50 zbojthe Note Added: 0000569

Copyright © 2000 - 2022 MantisBT Team
Powered by Mantis Bugtracker