{"char", "byte"}, {"int", "int"}, {"short", "short"},
{"long", "long"}, {"string", "string"}, {"bool", "bool"},
{"list", "LinkedList"}, {"array", "List"}, {"float", "float"},
- {"double", "double"}, {"bundle", "Bundle"}, {"void", "void"}
+ {"double", "double"}, {"bundle", "Bundle"}, {"void", "void"},
+ {"file", "string"}
};
parcel_type_map_ = {
{"float", "Float"},
{"double", "Double"},
{"bundle", "Bundle"},
+ {"file", "String"}
};
}
GenTemplate(CB_INVOCATION_PRE, stream,
[&]()->std::string {
std::string st;
+ for (auto& i : decl.GetParameters().GetParams()) {
+ auto& pt = i->GetParameterType();
+ if (pt.GetDirection() == ParameterType::Direction::OUT)
+ continue;
+
+ if (pt.GetBaseType().ToString() == "file" ||
+ (pt.GetBaseType().GetMetaType() != nullptr &&
+ pt.GetBaseType().GetMetaType()->ToString() == "file")) {
+ st += GenTemplateString(CB_SHARE_FILE, [&]()->std::string {
+ std::string str = "";
+ if (pt.GetBaseType().GetMetaType() != nullptr) {
+ str += Tab(6) + "foreach (var i in myFile)" + NLine(1);
+ str += Tab(6) + "{" + NLine(1);
+ str += Tab(6) + " p.ShareFile(Port, i);" + NLine(1);
+ str += Tab(6) + "}";
+ } else {
+ str += Tab(6) + "p.ShareFile(Port, myFile);";
+ }
+ return str;
+ });
+ }
+ std::cout << "name : " << pt.GetBaseType().GetFullName() << std::endl;
+ std::cout << "name : " << pt.GetBaseType().ToString() << std::endl;
+ std::cout << "id : " << i->GetID() << std::endl;
+ }
+
st += Tab(5)
+ "p.WriteInt((int)MethodId." + decl.GetID() + ");" + NLine(1);
std::string m;
using (Parcel p = new Parcel())
{
$$
- }
+ }
+)__cs_cb";
+
+
+const char CB_SHARE_FILE[] =
+R"__cs_cb(
+ try
+ {
+$$
+ }
+ catch (InvalidIOException)
+ {
+ throw new InvalidIOException();
+ }
)__cs_cb";
const char CB_INVOCATION_MID[] =