return
string() +
"import org.apache.thrift.Set;\n" +
+ "import flash.utils.ByteArray;\n" +
"import flash.utils.Dictionary;\n\n";
}
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
if ((*f_iter)->get_req() == t_field::T_REQUIRED && !type_can_be_null((*f_iter)->get_type())) {
out <<
- indent() << "if (!__isset." << (*f_iter)->get_name() << ") {" << endl <<
+ indent() << "if (!__isset_" << (*f_iter)->get_name() << ") {" << endl <<
indent() << " throw new TProtocolError(TProtocolError.UNKNOWN, \"Required field '" << (*f_iter)->get_name() << "' was not found in serialized data! Struct: \" + toString());" << endl <<
indent() << "}" << endl;
}
}
/**
- * Returns the C++ type that corresponds to the thrift type.
+ * Returns the AS3 type that corresponds to the thrift type.
*
* @param tbase The base type
* @param container Is it going in a As3 container?
return "void";
case t_base_type::TYPE_STRING:
if (type->is_binary()) {
- return "byte[]";
+ return "ByteArray";
} else {
return "String";
}