| 13 | #include "../MyParams/MyParam.h" |
| 14 | |
| 15 | class MyShowAddressNode : public CGraph::GNode { |
| 16 | public: |
| 17 | CStatus init() override { |
| 18 | CStatus status = CGRAPH_CREATE_GPARAM(MyParam, "param2") |
| 19 | return status; |
| 20 | } |
| 21 | |
| 22 | CStatus run() override { |
| 23 | auto myParam = CGRAPH_GET_GPARAM(MyParam, "param2") |
| 24 | if (nullptr == myParam) { |
| 25 | return CStatus("get param2 failed"); |
| 26 | } |
| 27 | |
| 28 | int cnt = 0; |
| 29 | { |
| 30 | CGRAPH_PARAM_WRITE_CODE_BLOCK(myParam) |
| 31 | cnt = ++myParam->iCount; |
| 32 | } |
| 33 | |
| 34 | CGraph::CGRAPH_ECHO("singleton node run, name is [%s], this address is [0x%x], cnt is [%d].", |
| 35 | this->getName().c_str(), (unsigned int*)this, cnt); |
| 36 | return CStatus(); |
| 37 | } |
| 38 | }; |
| 39 | |
| 40 | #endif //CGRAPH_MYSHOWADDRESSNODE_H |
nothing calls this directly
no outgoing calls
no test coverage detected