//Clone public WrapType clone() { WrapType clone = new WrapType(); clone.name = name; clone.wrapClass = wrapClass; clone.parentContext = parentContext; clone.cppName = cppName; clone.cppType = cppType; clone.cppInclude = cppInclude; //Marshled transfer clone.cppInPass = cppInPass; clone.cppOutPass = cppOutPass; clone.cppInConvert = cppInConvert; clone.cppOutConvert = cppOutConvert; clone.cppOutConvertCleanup = cppOutConvertCleanup; //Affects C# generation clone.csName = csName; clone.csType = csType; clone.csInPass = csInPass; clone.csOutPass = csOutPass; clone.csInConvert = csInConvert; clone.csOutConvert = csOutConvert; //Other clone.textBlocks = new List <string>(textBlocks); //Return return(clone); }
public string getCppArgCall(WrapperGenerator generator) { StringBuilder buffer = new StringBuilder(); for (int i = 0; i < args.Count; i++) { //Comma if (i > 0) { buffer.Append(", "); } //Arg WrapMethodArg wrapArg = args[i]; WrapType type = generator.findType(wrapArg.type); //Check if struct if (type is WrapStruct && !wrapArg.moveOut) { buffer.Append("*"); } else if (wrapArg.cppRef) { buffer.Append("*"); } if (String.IsNullOrEmpty(type.cppInConvert)) { buffer.Append(wrapArg.name); } else { if (wrapArg.moveOut) { buffer.Append("&"); } buffer.Append("arg"); buffer.Append(i); } } return(buffer.ToString()); }