#include <InitStageRegistry.h>
◆ addInitStage()
| void inet::InitStageRegistry::addInitStage |
( |
InitStage & |
initStage | ) |
|
26 stages.push_back(&initStage);
◆ addInitStageDependency()
| void inet::InitStageRegistry::addInitStageDependency |
( |
const char * |
source, |
|
|
const char * |
target |
|
) |
| |
◆ assignInitStageNumbers()
| void inet::InitStageRegistry::assignInitStageNumbers |
( |
| ) |
|
|
protected |
44 EV_DEBUG <<
"Assigning initialization stage numbers" <<
EV_ENDL;
45 for (
auto stage :
stages) {
47 stage->followingStages.clear();
48 stage->precedingStages.clear();
53 preceding->followingStages.push_back(following);
54 following->precedingStages.push_back(preceding);
58 bool assigned =
false;
59 for (
auto stage :
stages) {
60 if (stage->number == -1) {
61 for (
auto precedingStage : stage->precedingStages)
62 if (precedingStage->number == -1)
70 throw cRuntimeError(
"Circle detected in initialization stage dependency graph");
73 return s1->number < s2->number;
77 EV_DEBUG <<
"Initialization stage: " << stage->name <<
" = " << stage->number << std::endl;
78 EV_DEBUG <<
"Total number of initialization stages: " <<
numInitStages << std::endl;
◆ ensureInitStageNumbersAssigned()
| void inet::InitStageRegistry::ensureInitStageNumbersAssigned |
( |
| ) |
|
|
inline |
◆ getInitStage()
| inet::InitStage * inet::InitStageRegistry::getInitStage |
( |
const char * |
name | ) |
|
|
protected |
19 if (!strcmp(stage->name, name))
21 throw cRuntimeError(
"Cannot find initialization stage: %s", name);
Referenced by assignInitStageNumbers().
◆ getNumInitStages()
| int inet::InitStageRegistry::getNumInitStages |
( |
| ) |
|
◆ dependencies
| std::vector<std::pair<const char *, const char *> > inet::InitStageRegistry::dependencies |
|
protected |
◆ numInitStages
| int inet::InitStageRegistry::numInitStages = -1 |
|
protected |
◆ stages
| std::vector<InitStage *> inet::InitStageRegistry::stages |
|
protected |
The documentation for this class was generated from the following files: