29 wxString GetNextComponent(
const wxString&
str, wxString::size_type& cursor )
31 if( str.size() <= cursor )
34 wxString::size_type begin = cursor;
36 wxUniChar c = str[cursor];
38 if( isdigit( c ) || c ==
'+' || c ==
'-' )
41 while( ++cursor < str.size() )
45 if( isdigit( c ) || c ==
'v' || c ==
'V' )
53 while( ++cursor < str.size() )
64 return str.substr( begin, cursor - begin );
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 )
112 wxString::size_type cursor1 = 0;
113 wxString::size_type cursor2 = 0;
115 wxString comp1, comp2;
119 comp1 = GetNextComponent( lhs, cursor1 );
120 comp2 = GetNextComponent( rhs, cursor2 );
122 if( comp1.empty() && comp2.empty() )
131 wxUniChar c1 = comp1[0];
132 wxUniChar c2 = comp2[0];
134 if( isdigit( c1 ) || c1 ==
'-' || c1 ==
'+' )
136 if( isdigit( c2 ) || c2 ==
'-' || c2 ==
'+' )
139 wxString::size_type v1 = comp1.find_first_of(
"vV" );
141 if( v1 != wxString::npos )
144 wxString::size_type v2 = comp2.find_first_of(
"vV" );
146 if( v2 != wxString::npos )
151 comp1.ToDouble( &val1 );
152 comp2.ToDouble( &val2 );
156 if( val1 == val2 - 1 )
164 if( val1 == val2 + 1 )
175 if( isdigit( c2 ) || c2 ==
'-' || c2 ==
'+' )
178 int res = comp1.Cmp( comp2 );
static int Compare(PinNumber const &lhs, PinNumber const &rhs)
container_type::const_iterator const_iterator
wxString GetSummary() const