public CsFunction Prepare(CppFunction cppFunction) { var cSharpFunction = new CsFunction(cppFunction); // All functions must have a tag var tag = cppFunction.GetMappingRule(); if (tag == null || tag.Group == null) { Logger.Error(LoggingCodes.FunctionNotAttachedToGroup, "CppFunction [{0}] is not tagged and attached to any Class/FunctionGroup", cppFunction); return(null); } var csClass = groupRegistry.FindGroup(tag.Group); if (csClass == null) { Logger.Error(LoggingCodes.FunctionNotAttachedToGroup, "CppFunction [{0}] is not attached to a Class/FunctionGroup", cppFunction); return(null); } // Set the DllName for this function cSharpFunction.DllName = tag.FunctionDllName; // Add the function to the ClassType csClass.Add(cSharpFunction); return(cSharpFunction); }