MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / nPorts

Method nPorts

bt_editor/models/BehaviorTreeNodeModel.cpp:220–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220unsigned int BehaviorTreeDataModel::nPorts(QtNodes::PortType portType) const
221{
222 if( portType == QtNodes::PortType::Out)
223 {
224 if( nodeType() == NodeType::ACTION || nodeType() == NodeType::CONDITION )
225 {
226 return 0;
227 }
228 else{
229 return 1;
230 }
231 }
232 else if( portType == QtNodes::PortType::In )
233 {
234 return (_model.registration_ID == "Root") ? 0 : 1;
235 }
236 return 0;
237}
238
239NodeDataModel::ConnectionPolicy BehaviorTreeDataModel::portOutConnectionPolicy(QtNodes::PortIndex) const
240{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected