27#include <wx/translation.h>
40 if( ( wxIsdigit( c ) || ( ( c ==
'+' || c ==
'-' ) && (
cursor < str.size() - 1 ) && wxIsdigit( str[
cursor + 1] ) ) ) )
43 while( ++
cursor < str.size() )
47 if( wxIsdigit( c ) || c ==
'v' || c ==
'V' || c ==
'.' )
55 while( ++
cursor < str.size() )
86 int rc = ( i !=
end() ) ?
Compare( *last, *i ) : -2;
88 assert( rc == -1 || rc == -2 );
94 ret += *begin_of_range;
95 if( begin_of_range != last )
132 wxString::size_type cursor1 = 0;
133 wxString::size_type cursor2 = 0;
135 wxString symbol1, symbol2;
142 if( symbol1.empty() && symbol2.empty() )
145 if( symbol1.empty() )
148 if( symbol2.empty() )
151 bool sym1_isnumeric = symbol1.find_first_of( wxS(
"0123456789" ) ) != wxString::npos;
152 bool sym2_isnumeric = symbol2.find_first_of( wxS(
"0123456789" ) ) != wxString::npos;
159 wxString::size_type
v1 = symbol1.find_first_of( wxS(
"vV" ) );
161 if(
v1 != wxString::npos )
164 wxString::size_type
v2 = symbol2.find_first_of( wxS(
"vV" ) );
166 if(
v2 != wxString::npos )
171 symbol1.ToCDouble( &val1 );
172 symbol2.ToCDouble( &val2 );
176 if( val1 == val2 - 1 )
184 if( val1 == val2 + 1 )
198 int res = symbol1.Cmp( symbol2 );
wxString GetDuplicates() const
Gets a formatted string of all the pins that have duplicate numbers.
static wxString getNextSymbol(const wxString &str, wxString::size_type &cursor)
static int Compare(const wxString &lhs, const wxString &rhs)
wxString GetSummary() const
container_type::const_iterator const_iterator
std::set< wxString > duplicate_pins