/// <summary> /// Add a known type to the list. Args is (.net type/cpp type) /// </summary> /// <param name="typeName"></param> public static void AddMethod(string typeName, string methodName, string cppMethodName, Tuple <string, string>[] args = null, string[] includeFiles = null) { var kt = new KnownTypeInfo() { Name = typeName }; var ourArgs = new KnownTypeInfo.MechodArg[0]; if (args != null) { ourArgs = (from t in args select new KnownTypeInfo.MechodArg() { Type = t.Item1, CPPType = t.Item2 }).ToArray(); } var incfiles = includeFiles; if (incfiles == null) { incfiles = new string[0]; } kt.Methods = new KnownTypeInfo.MethodInfo[] { new KnownTypeInfo.MethodInfo() { Name = methodName, CPPName = cppMethodName, Arguments = ourArgs, IncludeFiles = incfiles } }; gSetTypes.Add(kt); }
/// <summary> /// Add a known type to the list. Args is (.net type/cpp type) /// </summary> /// <param name="typeName"></param> public static void AddMethod(string typeName, string methodName, string cppMethodName, Tuple<string, string>[] args = null, string[] includeFiles = null) { var kt = new KnownTypeInfo() { Name = typeName }; var ourArgs = new KnownTypeInfo.MechodArg[0]; if (args != null) ourArgs = (from t in args select new KnownTypeInfo.MechodArg() { Type = t.Item1, CPPType = t.Item2 }).ToArray(); var incfiles = includeFiles; if (incfiles == null) { incfiles = new string[0]; } kt.Methods = new KnownTypeInfo.MethodInfo[] { new KnownTypeInfo.MethodInfo() { Name = methodName, CPPName = cppMethodName, Arguments = ourArgs, IncludeFiles = incfiles } }; gSetTypes.Add(kt); }