MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / SetData

Method SetData

src/widgets.cpp:435–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.80
SortMethod · 0.80
ResizeGridMethod · 0.80
findMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected