public static void PostGenerateCode(Behaviac.Design.MethodDef.Param param, StringWriter stream, string indent, string typename, string var, string caller, object parent, string setValue) { Behaviac.Design.ParInfo par = param.Value as Behaviac.Design.ParInfo; if (par != null) { ParInfoCsExporter.PostGenerateCode(par, null, stream, indent, typename, var, caller); return; } Behaviac.Design.VariableDef v = param.Value as Behaviac.Design.VariableDef; if (v != null) { VariableCsExporter.PostGenerateCode(v, stream, indent, typename, var, caller, parent, param.Name, setValue); return; } Type type = param.Value.GetType(); if (Plugin.IsCustomClassType(type) && !DesignerStruct.IsPureConstDatum(param.Value, parent, param.Name)) { StructCsExporter.PostGenerateCode(param.Value, stream, indent, var, parent, param.Name); } }
public static void PostGenerateCode(Behaviac.Design.RightValueDef rightValue, StreamWriter stream, string indent, string typename, string var, string caller, object parent = null, string paramName = "") { if (rightValue.IsMethod) { string className = rightValue.Method.ClassName.Replace("::", "."); MethodCsExporter.PostGenerateCode(rightValue.Method, stream, indent, rightValue.Method.NativeReturnType, var, string.Format("(({0}*)pAgent_{1})", className, var)); } else { VariableCsExporter.PostGenerateCode(rightValue.Var, stream, indent, typename, var, caller, parent, paramName); } }