public static void PostGenerateCode(Behaviac.Design.MethodDef.Param param, StringWriter stream, string indent, string typename, string var, string caller, object parent)
        {
            Behaviac.Design.ParInfo par = param.Value as Behaviac.Design.ParInfo;

            if (par != null)
            {
                ParInfoCppExporter.PostGenerateCode(par, stream, indent, typename, var, caller);
                return;
            }

            Behaviac.Design.VariableDef v = param.Value as Behaviac.Design.VariableDef;

            if (v != null)
            {
                VariableCppExporter.PostGenerateCode(v, stream, indent, typename, var, caller, parent, param.Name, var);
                return;
            }

            Type type = param.Value.GetType();

            if (Plugin.IsCustomClassType(type) && !DesignerStruct.IsPureConstDatum(param.Value, parent, param.Name))
            {
                StructCppExporter.PostGenerateCode(param.Value, stream, indent, var, parent, param.Name);
            }
        }
示例#2
0
 public static void PostGenerateCode(Behaviac.Design.VariableDef variable, StreamWriter stream, string indent, string typename, string var, string caller, object parent = null, string paramName = "", string setValue = null)
 {
     if (variable.ValueClass == Behaviac.Design.VariableDef.kConst)
     {
         Type type = variable.Value.GetType();
         if (Plugin.IsCustomClassType(type) && !DesignerStruct.IsPureConstDatum(variable.Value, parent, paramName))
         {
             StructCppExporter.PostGenerateCode(variable.Value, stream, indent, var, parent, paramName);
         }
     }
     else if (variable.Property != null)
     {
         PropertyCppExporter.PostGenerateCode(variable.Property, stream, indent, typename, var, caller, setValue);
     }
 }