void InvokeCommand::fillTableArg(Table & tableArg, const mArray &tableArray) { for (mArray::const_iterator i = tableArray.begin(); i != tableArray.end(); ++i) { const mArray rowArray = i->get_array(); if (i == tableArray.begin()) { // the first row are the columns for (mArray::const_iterator j = rowArray.begin(); j != rowArray.end(); ++j) { tableArg.addColumn(j->get_str()); } } else { Table::row_type row; for (mArray::const_iterator j = rowArray.begin(); j != rowArray.end(); ++j) { row.push_back(j->get_str()); } tableArg.addRow(row); } } }
void write_address( mArray& a, const Address& addr ) { mObject addr_obj; addr_obj[ "house_number" ] = addr.house_number_; addr_obj[ "road" ] = addr.road_; addr_obj[ "town" ] = addr.town_; addr_obj[ "county" ] = addr.county_; addr_obj[ "country" ] = addr.country_; a.push_back( addr_obj ); }
void FakeExtVM::push(mArray& a, u256 _v) { a.push_back(toString(_v)); }