Example #1
0
bool SCH_SHEET::IsDangling() const
{
    // If any hierarchical label in the sheet is dangling, then the sheet is dangling.
    for( size_t i = 0; i < GetPins().size(); i++ )
    {
        if( GetPins()[i].IsDangling() )
            return true;
    }

    return false;
}
Example #2
0
void SCH_SHEET::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
{
    for( unsigned ii = 0; ii < GetPins().size(); ii++ )
    {
        SCH_SHEET_PIN &pinsheet = GetPins()[ii];

        wxCHECK2_MSG( pinsheet.Type() == SCH_SHEET_PIN_T, continue,
                      wxT( "Invalid item in schematic sheet pin list.  Bad programmer!" ) );

        pinsheet.GetEndPoints( aItemList );
    }
}
//===============================================================================
//		
//===============================================================================
HRESULT DetectionModule_touchLib::DetectionModuleInit(WCHAR* videoFilename, WCHAR* saveGraphFileName, WCHAR* loadGraphFilename)
{
	HRESULT hr = S_OK;

	GSGraphBase::CreateGraph();


	hr = AddSourceFilter(videoFilename);
	hr = CreateFilters(); //or using loading graph 
	//hr = LoadGraphFile(graphFilename);
	hr = GetFiltersAndInterfaces();
	hr = GetPins();
	hr = ConnectGraph();


	m_paramSet = GetDefaultParameters();

	// Set call back function in FindBlobFilter
	void* myDM[]={this};
	m_pIFindBlobFilter->SetCallbackFunction(DetectionModule_touchLib::FingerResultCallBack,1,myDM);

	//--- Save current graph ---
	if(saveGraphFileName != NULL)
	{
		hr = SaveGraphFile(saveGraphFileName);
	}


	return hr;
}
Example #4
0
bool SCH_SHEET::IsDanglingStateChanged( std::vector< DANGLING_END_ITEM >& aItemList )
{
    bool currentState = IsDangling();

    for( SCH_SHEET_PIN& pinsheet : GetPins() )
    {
        pinsheet.IsDanglingStateChanged( aItemList );
    }

    return currentState != IsDangling();
}
Example #5
0
void SCH_SHEET::GetConnectionPoints( std::vector< wxPoint >& aPoints ) const
{
    for( size_t i = 0; i < GetPins().size(); i++ )
        aPoints.push_back( GetPins()[i].GetPosition() );
}