MCPcopy Create free account
hub / github.com/chigraph/chigraph / NodeInstance

Method NodeInstance

libchigraph/src/NodeInstance.cpp:14–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13namespace chi {
14NodeInstance::NodeInstance(GraphFunction* func, std::unique_ptr<NodeType> nodeType, float posX,
15 float posY, boost::uuids::uuid nodeID)
16 : mType{std::move(nodeType)},
17 mX{posX},
18 mY{posY},
19 mId{nodeID},
20 mContext{&mType->context()},
21 mFunction{func},
22 mGraphModule{&func->module()} {
23 assert(mType != nullptr && mFunction != nullptr);
24
25 mType->mNodeInstance = this;
26
27 inputDataConnections.resize(type().dataInputs().size(), {nullptr, ~0ull});
28 outputDataConnections.resize(type().dataOutputs().size(), {});
29
30 if (!type().pure()) {
31 inputExecConnections.resize(type().execInputs().size(), {});
32 outputExecConnections.resize(type().execOutputs().size(), {nullptr, ~0ull});
33 }
34}
35
36NodeInstance::NodeInstance(const NodeInstance& other, boost::uuids::uuid id)
37 : mType(other.type().clone()),

Callers

nothing calls this directly

Calls 5

pureMethod · 0.80
typeMethod · 0.80
xMethod · 0.80
yMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected