#include <omnetpp.h>
#include "INETDefs.h"
Classes | |
class | ModuleAccess< T > |
Functions | |
cModule * | findModuleWherever (const char *name, const char *classname, cModule *from) |
cModule * | findModuleSomewhereUp (const char *name, cModule *from) |
cModule* findModuleSomewhereUp | ( | const char * | name, | |
cModule * | from | |||
) |
Find a module with given name, and "closest" to module "from".
Operation: gradually rises in the module hierarchy, and looks for a submodule of the given name.
00045 { 00046 cModule *mod = NULL; 00047 for (cModule *curmod=from; !mod && curmod; curmod=curmod->parentModule()) 00048 mod = curmod->submodule(name); 00049 return mod; 00050 }
cModule* findModuleWherever | ( | const char * | name, | |
const char * | classname, | |||
cModule * | from | |||
) |
Find a module with given name and type "closest" to module "from".
Operation: gradually rises in the module hierarchy, and searches recursively among all submodules at every level.
00037 { 00038 cModule *mod = NULL; 00039 for (cModule *curmod=from; !mod && curmod; curmod=curmod->parentModule()) 00040 mod = findSubmodRecursive(curmod, name, classname); 00041 return mod; 00042 }