Logo Search packages:      
Sourcecode: ktechlab version File versions

int FPNode::numCon ( bool  includeParentItem,
bool  includeHiddenConnectors 
) const [virtual, inherited]

Returns the total number of connections to the node. This is the number of input connectors, the number of output connectors, and the parent item connector if it exists and is requested.

includeParentItem Count the parent item as a connector if it exists
includeHiddenConnectors hidden connectors are those as e.g. part of a subcircuit

Implements Node.

Definition at line 163 of file fpnode.cpp.

References Node::isChildNode().

Referenced by FlowICNDocument::canConnect(), and FPNode::findConnectorDivergePoint().

      unsigned count = 0;
      ConnectorList connectors = m_inputConnectorList;
      if ( m_outputConnector )
            connectors.append ( m_outputConnector );
      ConnectorList::const_iterator end = connectors.end();
      for ( ConnectorList::const_iterator it = connectors.begin(); it != end; ++it )
            if ( *it && ( includeHiddenConnectors || ( *it )->canvas() ) )
      if ( isChildNode() && includeParentItem )

      return count;

Generated by  Doxygen 1.6.0   Back to index