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

Method clone

tutorial/MyParams/MyVersionParam.h:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16struct MyVersionParam : public CGraph::GElementParam {
17 CVoid clone(CGraph::GPassedParamPtr param) override {
18 auto* ptr = dynamic_cast<MyVersionParam *>(param);
19 if (nullptr == ptr) {
20 return; // 理论不存在的情况
21 }
22
23 this->priority_ = ptr->priority_;
24 this->secondary_ = ptr->secondary_;
25 }
26
27 int priority_ = 0; // 表示 主版本号
28 int secondary_ = 0; // 表示 辅版本号

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected