Beispiel #1
0
CConnectionPoint::~CConnectionPoint()
{
	POSITION pos = GetStartPosition();
	while (pos != NULL)
	{
		LPUNKNOWN pUnk = GetNextConnection(pos);
		ASSERT(pUnk != NULL);
		pUnk->Release();
	}

	if (m_pConnections != NULL)
		delete m_pConnections;
}
Beispiel #2
0
int CIntGraph::GetNodeForwardConnections (DWORD dwID, TArray<int> *retConnections)

//	GetNodeForwardConnections
//
//	Fills in a list of forward connections from the given node.

	{
	ASSERT(dwID >= 0 && dwID < (DWORD)m_Nodes.GetCount());

	SNode *pNode = GetNode(dwID);
	SConnection *pConnection = GetForwardConnection(pNode);
	while (pConnection)
		{
		retConnections->Insert(pConnection->iTo);
		pConnection = GetNextConnection(pConnection);
		}

	return retConnections->GetCount();
	}