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

Method dataType

QtNodeEditor/src/Connection.cpp:356–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354
355
356NodeDataType
357Connection::
358dataType(PortType portType) const
359{
360 if (_inNode && _outNode)
361 {
362 auto const & model = (portType == PortType::In) ?
363 _inNode->nodeDataModel() :
364 _outNode->nodeDataModel();
365 PortIndex index = (portType == PortType::In) ?
366 _inPortIndex :
367 _outPortIndex;
368
369 return model->dataType(portType, index);
370 }
371 else
372 {
373 Node* validNode;
374 PortIndex index = INVALID;
375
376 if ((validNode = _inNode))
377 {
378 index = _inPortIndex;
379 portType = PortType::In;
380 }
381 else if ((validNode = _outNode))
382 {
383 index = _outPortIndex;
384 portType = PortType::Out;
385 }
386
387 if (validNode)
388 {
389 auto const &model = validNode->nodeDataModel();
390
391 return model->dataType(portType, index);
392 }
393 }
394
395 Q_UNREACHABLE();
396}
397
398
399void

Callers

nothing calls this directly

Calls 1

dataTypeMethod · 0.80

Tested by

no test coverage detected