2007-06-05 12:10:51 +00:00
|
|
|
/*******************/
|
|
|
|
/* class_cvpcb.cpp */
|
|
|
|
/*******************/
|
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
#include "fctsys.h"
|
|
|
|
#include "kicad_string.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
#include "cvpcb.h"
|
2011-02-21 18:27:47 +00:00
|
|
|
#include "footprint_info.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
PIN::PIN()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-11-05 19:26:52 +00:00
|
|
|
m_Index = 0; /* Variable used by types of netlists. */
|
|
|
|
m_Type = 0; /* Electrical type. */
|
2009-05-06 11:55:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool operator<( const PIN& item1, const PIN& item2 )
|
|
|
|
{
|
|
|
|
return ( StrLenNumICmp( item1.m_Number.GetData(),
|
|
|
|
item2.m_Number.GetData(), 4 ) < 0 );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-05-06 11:55:36 +00:00
|
|
|
bool operator==( const PIN& item1, const PIN& item2 )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-05-06 11:55:36 +00:00
|
|
|
return ( item1.m_Number == item2.m_Number );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
bool same_pin_number( const PIN* item1, const PIN* item2 )
|
|
|
|
{
|
|
|
|
wxASSERT( item1 != NULL && item2 != NULL );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-05-06 11:55:36 +00:00
|
|
|
return ( item1->m_Number == item2->m_Number );
|
2009-04-23 15:02:18 +00:00
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
bool same_pin_net( const PIN* item1, const PIN* item2 )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2009-04-23 15:02:18 +00:00
|
|
|
wxASSERT( item1 != NULL && item2 != NULL );
|
|
|
|
|
2009-05-06 11:55:36 +00:00
|
|
|
return ( item1->m_Net == item2->m_Net );
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-23 15:02:18 +00:00
|
|
|
COMPONENT::COMPONENT()
|
|
|
|
{
|
|
|
|
m_Num = 0;
|
|
|
|
m_Multi = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
COMPONENT::~COMPONENT()
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-05-06 11:55:36 +00:00
|
|
|
bool operator<( const COMPONENT& item1, const COMPONENT& item2 )
|
2009-04-23 15:02:18 +00:00
|
|
|
{
|
2009-05-06 11:55:36 +00:00
|
|
|
return ( StrNumICmp( item1.m_Reference.GetData(),
|
|
|
|
item2.m_Reference.GetData() ) < 0 );
|
2009-04-23 15:02:18 +00:00
|
|
|
}
|
|
|
|
|