#include "ModuleAccess.h"Go to the source code of this file.
Functions | |
| bool | isNode (cModule *mod) |
| cModule * | findModuleWherever (const char *name, cModule *from) |
| cModule * | findModuleWhereverInNode (const char *name, 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.
Definition at line 61 of file ModuleAccess.cc.
{
cModule *mod = NULL;
for (cModule *curmod=from; !mod && curmod; curmod=curmod->getParentModule())
mod = curmod->getSubmodule(name);
return mod;
}
| cModule* findModuleWherever | ( | const char * | name, | |
| cModule * | from | |||
| ) |
Find a module with given name, and "closest" to module "from".
Operation: gradually rises in the module hierarchy, and searches recursively among all submodules at every level.
Definition at line 41 of file ModuleAccess.cc.
{
cModule *mod = NULL;
for (cModule *curmod=from; !mod && curmod; curmod=curmod->getParentModule())
mod = findSubmodRecursive(curmod, name);
return mod;
}
| cModule* findModuleWhereverInNode | ( | const char * | name, | |
| cModule * | from | |||
| ) |
Find a module with given name, and "closest" to module "from".
Operation: gradually rises in the module hierarchy up to the module, and searches recursively among all submodules at every level.
Definition at line 49 of file ModuleAccess.cc.
Referenced by ModuleAccess< ICMP >::get(), ModuleAccess< ICMP >::getIfExists(), and PPP::~PPP().
{
cModule *mod = NULL;
for (cModule *curmod=from; curmod; curmod=curmod->getParentModule())
{
mod = findSubmodRecursive(curmod, name);
if (mod || isNode(curmod))
break;
}
return mod;
}
| bool isNode | ( | cModule * | mod | ) | [inline] |
Definition at line 21 of file ModuleAccess.cc.
Referenced by findModuleWhereverInNode().
{
cProperties *props = mod->getProperties();
return props && props->getAsBool("node");
}
1.7.1