private SharpClass CreateClass(Type classType, Type superType, SharpClass module) { string name = GetTableName(classType); LuaNativeFunction dctor = null; if (classType.IsValueType) { if (!classType.IsUnManaged()) //未注册Wrap,用反射版api, UnmanagedType同Object { dctor = gcFn; } } else { dctor = gcFn; } LuaRef meta = CreateClass(module.Meta, name, classType, superType, dctor); var bindClass = new SharpClass(module, meta); bindClass.Name = name; bindClass.SetClassType(classType); registeredClass.Add(classType, bindClass); return(bindClass); }
public SharpClass(SharpClass parent, LuaRef meta) { this.meta = meta; this.meta.CheckTable(); this.parent = parent; }
public SharpClass(SharpClass parent) { this.parent = parent; }