| 433 | } |
| 434 | |
| 435 | void SetData( const KeyValueMap &map ) |
| 436 | { |
| 437 | if ( map.size() == 0 ) return; |
| 438 | |
| 439 | wxArrayString keys; |
| 440 | for( KeyValueMap::const_iterator it = map.begin(); |
| 441 | it != map.end(); |
| 442 | ++it ) |
| 443 | keys.Add( it->first ); |
| 444 | |
| 445 | keys.Sort(); |
| 446 | |
| 447 | m_grid->ResizeGrid( map.size(), 2 ); |
| 448 | for( size_t i=0;i<keys.size();i++ ) |
| 449 | { |
| 450 | m_grid->SetCellValue( i, 0, keys[i] ); |
| 451 | KeyValueMap::const_iterator it = map.find( keys[i] ); |
| 452 | if ( it != map.end() ) |
| 453 | m_grid->SetCellValue( i, 1, wxString::Format("%lg", it->second ) ); |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | void GetData( KeyValueMap &map ) |
| 458 | { |
nothing calls this directly
no test coverage detected