|
| 1 | +/*************************** |
| 2 | +@Author: Chunel |
| 3 | +@Contact: chunel@foxmail.com |
| 4 | +@File: PywGAspect.h |
| 5 | +@Time: 2025/3/5 23:06 |
| 6 | +@Desc: |
| 7 | +***************************/ |
| 8 | + |
| 9 | +#ifndef CGRAPH_PYWGASPECT_H |
| 10 | +#define CGRAPH_PYWGASPECT_H |
| 11 | + |
| 12 | +#include <pybind11/pybind11.h> |
| 13 | + |
| 14 | +#include "CGraph.h" |
| 15 | + |
| 16 | +namespace py = pybind11; |
| 17 | + |
| 18 | +class PywGAspect : public CGraph::GAspect { |
| 19 | +public: |
| 20 | + explicit PywGAspect() {}; |
| 21 | + ~PywGAspect() override {}; |
| 22 | + |
| 23 | + CStatus beginInit() override { |
| 24 | + PYBIND11_OVERLOAD(CStatus, GAspect, beginInit); |
| 25 | + } |
| 26 | + |
| 27 | + CVoid finishInit(const CStatus& curStatus) override { |
| 28 | + PYBIND11_OVERLOAD(CVoid, GAspect, finishInit, curStatus); |
| 29 | + } |
| 30 | + |
| 31 | + CStatus beginRun() override { |
| 32 | + PYBIND11_OVERLOAD(CStatus, GAspect, beginRun); |
| 33 | + } |
| 34 | + |
| 35 | + CVoid finishRun(const CStatus& curStatus) override { |
| 36 | + PYBIND11_OVERLOAD(CVoid, GAspect, finishRun, curStatus); |
| 37 | + } |
| 38 | + |
| 39 | + CStatus beginDestroy() override { |
| 40 | + PYBIND11_OVERLOAD(CStatus, GAspect, beginDestroy); |
| 41 | + } |
| 42 | + |
| 43 | + CVoid finishDestroy(const CStatus& curStatus) override { |
| 44 | + PYBIND11_OVERLOAD(CVoid, GAspect, finishDestroy, curStatus); |
| 45 | + } |
| 46 | + |
| 47 | + CVoid enterCrashed() override { |
| 48 | + PYBIND11_OVERLOAD(CVoid, GAspect, enterCrashed); |
| 49 | + } |
| 50 | +}; |
| 51 | + |
| 52 | +#endif //CGRAPH_PYWGASPECT_H |
0 commit comments