MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / run

Method run

tutorial/MyGNode/MyReadParamNode.h:17–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15class MyReadParamNode : public CGraph::GNode {
16public:
17 CStatus run() override {
18 auto myParam = CGRAPH_GET_GPARAM_WITH_NO_EMPTY(MyParam, "param1") // 获取类型为MyParam且名为"param1"的参数
19 int val = 0;
20 {
21 /* 对需要使用(读或写)参数的位置,加括号{}范围限定,以减少互斥等待时间 */
22 CGRAPH_PARAM_READ_CODE_BLOCK(myParam)
23 val = myParam->iValue;
24 }
25 CGraph::CGRAPH_ECHO("[%s], iValue is : [%d] ... ", this->getName().c_str(), val);
26
27 return CStatus();
28 }
29};
30
31#endif //CGRAPH_MYREADPARAMNODE_H

Callers

nothing calls this directly

Calls 1

CGRAPH_ECHOFunction · 0.85

Tested by

no test coverage detected