/// <inheritdoc/> public override void RunCombination(int combinationIndex, Combination combination, CalculationContext context) { Shear.Run(context); Moment.Run(context); Axial.Run(context); Deflection.Run(context); }
//**************************************************************************************************** public VarBase Perform(ArgList al) { Namespace ns = new Namespace(InterprEnvironment.Instance.CurrentNamespace); ns["result"] = new IntVar(0); int argc = m_args.Count; if (al.Count != argc) throw new CalcException("Ќеверное число параметров"); al.Reset(); for (int i = 0; i < argc; i++) { ns[m_args[i] as System.String] = al.Get(); } InterprEnvironment.Instance.CurrentNamespace = ns; Moment moment = new Moment(this); if (m_count > 1) { try { moment.Run(); } catch (SyntaxErrorException ex) { throw ex; } catch (CalcException ex) { throw new CalcException("ќшибка в функции " + m_name + "[] в строке " + (moment.Pos + 1) + " : " + ex.Message); } } VarBase res = ns["result"]; InterprEnvironment.Instance.CurrentNamespace = ns.PreviousNamespace; if (res == null) throw new CalcException("ќшибка в функции " + m_name + "[] : переменна¤ result не определена на момент выхода"); return res; }