GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — SEDA-framework/seda.cpp at master · sl950313/SEDA-framework

Expand file tree

/

seda.cpp

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
48 lines (43 loc) · 1.47 KB
/

seda.cpp

Copy path

File metadata and controls

48 lines (43 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "seda.h"
#include "log.h"
stage *SEDA::create_stage(string stage_name) {
stage *sg = new stage(stage_name);
map<string, stage *>::iterator it = stages.find(stage_name);
if (it != stages.end()) {
LogUtil::debug("The stage : %s is already existed", stage_name.c_str());
return NULL;
}
stages[stage_name] = sg;
stages_v.push_back(sg);
return sg;
}
bool SEDA::add_msg_edge(stage *from, stage *to, string msg) {
stage_message *sm = new stage_message(msg);
if (msgExist2Stages(from, to, sm)) {
LogUtil::debug("The msg : %s is already exsited from the stage : %s to stage : %s", msg.c_str(), from->get_stage_name().c_str(), to->get_stage_name().c_str());
return false;
}
addSM(from, to, sm);
return true;
}
bool SEDA::msgExist2Stages(stage *from, stage *to, stage_message *sm) {
map<stage_message *, pair<stage *, stage *> >::iterator it = msg_relat.find(sm);
if (it != msg_relat.end()) {
if ((it->second.first == from) && it->second.second == to) {
return false;
}
}
return true;
}
void SEDA::addSM(stage *from, stage *to, stage_message *sm) {
msg_relat.insert(pair<stage_message *, pair<stage *, stage *> >(sm, pair<stage *, stage *>(from, to)));
}
bool SEDA::run() {
for (size_t i = 0; i < stages_v.size(); ++i) {
if (!stages_v[i]->run()) {
LogUtil::debug("stage : %s run fail", stages_v[i]->get_stage_name().c_str());
return false;
}
}
return true;
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.