public static Column Eval(Compilat compilat, MemMapper MM) { compilat.run(MM); VBoxTU last_VBT = compilat.VBoxTrs.Last(); return(MM.getGen(last_VBT.CH_out)); }
public explicit_preCH(TTuple types_in, VBoxTU _dataSrc) { _types = types_in; this._dataSrc = _dataSrc; // since this is bijective, there is no point in deferring creation _CH = Instantiate(types_in, dataSrc); }
public static Column Eval_incomplete_tolerant(string strExpr, GrammarEntry GE, TranslateLHS trans_LHS, MemMapper MM, out CH_closedScope scope_out) { var compilat = TranslateEntry.TranslateFully_incomplete_tolerant(strExpr, GE, trans_LHS); scope_out = compilat.deltaScope.close(); #if todo_fixme // external refs in the scopes still need implementation ( done . todo plug this shit in ) foreach (var sc_ref in compilat.ownDecls) { scope_out = (ClosedScope)scope_out.decl(sc_ref); } #endif compilat.run(MM); // atm the MM keeps references on tmp columns around forever - some pruning mechanism is needed VBoxTU last_VBT = compilat.VBoxTrs.Last(); return(MM.getGen(last_VBT.CH_out)); }
} // usage relies on preCH -> CH (by object instance) to be a pure function. that is, assign underlying field at most once, if any public static TypedCH Instantiate(TTuple ttuple, VBoxTU dataSrc) { Type closedType; if (ttuple.isMulti) { closedType = typeof(TypedMultiCH <>).MakeGenericType(new [] { ttuple.PayT }); } else { closedType = typeof(TypedSingleCH <>).MakeGenericType(new [] { ttuple.PayT }); } var instance = (TypedCH)Activator.CreateInstance(closedType); instance.GetType().GetProperty("pred_SrcVBXTU").SetValue(instance, dataSrc, new SObject[0]); // guess return(instance); }
Func <TTuple> TypeCalcEdges; // funky name because outgoing dependencies are contained in the closure of this func public deferred_preCH(Func <TTuple> F_in, VBoxTU dataSrc) { TypeCalcEdges = F_in; this._dataSrc = dataSrc; }