compiler/cpp/src/generate/t_go_generator.cc
/**
 * Generates code to deserialize a map
 */
Generates code to deserialize a map
Generates code to deserialize a map
void t_go_generator::generate_deserialize_map_element(ofstream &out,
                                                       t_map* tmap,
                                                       bool   declare,
                                                       string prefix,
                                                       string err) {
  (void) declare;
  (void) err;
  string key = tmp("_key");
  string val = tmp("_val");
  t_field fkey(tmap->get_key_type(), key);
  t_field fval(tmap->get_val_type(), val);
  generate_deserialize_field(out, &fkey, true);
  generate_deserialize_field(out, &fval, true);
  indent(out) <<
    prefix << ".Set(" << key << ", " << val << ")" << endl;
}
void t_go_generator :: generate_deserialize_map_element ( ofstream & out , t_map * tmap , bool declare , string prefix , string err ) { ( void ) declare ; ( void ) err ; string key = tmp ( " " ) ; string val = tmp ( " " ) ; t_field fkey ( tmap -> get_key_type ( ) , key ) ; t_field fval ( tmap -> get_val_type ( ) , val ) ; generate_deserialize_field ( out , & fkey , true ) ; generate_deserialize_field ( out , & fval , true ) ; indent ( out ) << prefix << " " << key << " " << val << " " << endl ; }
Generates code to deserialize a map
Generates code to deserialize a map