@@ -15,11 +15,7 @@ CStatus GCondition::init() {
1515
1616 for (GElementPtr element : this ->condition_elements_ ) {
1717 /* * init和destroy的时候,切面全部执行。run的时候,仅执行被执行的切面 */
18- status = element->doAspect (GAspectType::BEGIN_INIT);
19- CGRAPH_FUNCTION_CHECK_STATUS
20-
21- status = element->init ();
22- element->doAspect (GAspectType::FINISH_INIT, status);
18+ status = element->fatInit ();
2319 CGRAPH_FUNCTION_CHECK_STATUS
2420 }
2521
@@ -31,11 +27,7 @@ CStatus GCondition::destroy() {
3127 CGRAPH_FUNCTION_BEGIN
3228
3329 for (GElementPtr element : this ->condition_elements_ ) {
34- status = element->doAspect (GAspectType::BEGIN_INIT);
35- CGRAPH_FUNCTION_CHECK_STATUS
36-
37- status = element->destroy ();
38- element->doAspect (GAspectType::FINISH_INIT, status);
30+ status = element->fatDestroy ();
3931 CGRAPH_FUNCTION_CHECK_STATUS
4032 }
4133
@@ -63,23 +55,15 @@ CStatus GCondition::run() {
6355 loop = condition_elements_.back ()->loop_ ;
6456 while (loop-- > 0 ) {
6557 auto element = condition_elements_.back ();
66- status = element->doAspect (GAspectType::BEGIN_RUN);
67- CGRAPH_FUNCTION_CHECK_STATUS
68-
69- status = element->run ();
70- element->doAspect (GAspectType::FINISH_RUN, status);
58+ status = element->fatRun ();
7159 CGRAPH_FUNCTION_CHECK_STATUS
7260 }
7361 } else if (0 <= index && index < condition_elements_.size ()) {
7462 // 如果返回的内容,在元素范围之内,则直接执行元素的内容。不在的话,则不执行任何操作,直接返回正确状态
7563 loop = condition_elements_[index]->loop_ ;
7664 while (loop-- > 0 ) {
7765 auto element = condition_elements_[index];
78- status = element->doAspect (GAspectType::BEGIN_RUN);
79- CGRAPH_FUNCTION_CHECK_STATUS
80-
81- status = element->run ();
82- element->doAspect (GAspectType::FINISH_RUN, status);
66+ status = element->fatRun ();
8367 CGRAPH_FUNCTION_CHECK_STATUS
8468 }
8569 }
0 commit comments