Ejemplo n.º 1
0
        //────────────────────────────────────────

        /// <summary>
        /// 例えば ("access",”from”)と指定すれば、
        /// 指定リストの要素の中で <~ access=”from,to”> といった属性を持つものはヒットする。
        ///
        /// 選択アイテムをリストから除外するなら bRemove=true にします。
        /// </summary>
        /// <param name="sName"></param>
        /// <param name="sExpectedValue"></param>
        /// <param name="request_Items"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        private static List <Expression_Node_String> SelectItemsByPmAsCsv_Full_(
            List <Expression_Node_String> ecList_Item,
            string sPmName,
            bool bUnconditional,//無条件一致なら真
            string sExpectedValue,
            bool bRemove,
            EnumHitcount hits,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);

            pg_Method.BeginMethod(Info_Controls.Name_Library, "Util_E_NodeImpl", "SelectItemsByAttrAsCsv_Full_", log_Reports);
            //
            //
            //Util_E_NodeImpl dammy_This = new Util_E_NodeImpl();

            List <Expression_Node_String> ecList_Result = new List <Expression_Node_String>();

            for (int nI = 0; nI < ecList_Item.Count; nI++)
            {
                Expression_Node_String ec_Item = ecList_Item[nI];

                if (log_Reports.Successful)
                {
                    Expression_Node_String ec_AttrValue;
                    bool bHit = ec_Item.TrySelectAttribute(out ec_AttrValue, sPmName, EnumHitcount.One_Or_Zero, log_Reports);
                    if (bHit)
                    {
                        string sAttrValue = ec_AttrValue.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                        CsvTo_ListImpl to          = new CsvTo_ListImpl();
                        List <string>  sList_Value = to.Read(sAttrValue);

                        bool bHit10 = false;

                        if (bUnconditional)
                        {
                            //if(""!=sAttrValue)
                            //{
                            bHit = true;
                            //}
                        }
                        else if (sList_Value.Contains(sExpectedValue))
                        {
                            bHit10 = true;
                        }

                        if (bHit10)
                        {
                            ecList_Result.Add(ec_Item);

                            if (bRemove)
                            {
                                // 削除
                                ecList_Item.RemoveAt(nI);
                                nI--;
                            }


                            if (EnumHitcount.First_Exist == hits ||
                                EnumHitcount.First_Exist_Or_Zero == hits)
                            {
                                // 最初の1件で削除は終了。複数件ヒットするかどうかは判定しない。
                                break;
                            }
                        }
                    }
                }
            }


            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":Util_E_NodeImpl.GetItemsByAttrAsCsv: 直後 list_E_Result.Count=[" + list_E_Result.Count + "]");


            if (EnumHitcount.One == hits)
            {
                // 必ず1件だけヒットする想定。

                if (ecList_Result.Count != 1)
                {
                    goto gt_Error_NotOne;
                }
            }
            else if (EnumHitcount.First_Exist == hits)
            {
                // 必ずヒットする。複数件あれば、最初の1件だけ取得。

                if (0 == ecList_Result.Count)
                {
                    goto gt_Error_NoHit;
                }
                else if (1 < ecList_Result.Count)
                {
                    ecList_Result.RemoveRange(1, ecList_Result.Count - 1);
                }
            }
            else if (EnumHitcount.First_Exist_Or_Zero == hits)
            {
                // ヒットすれば最初の1件だけ、ヒットしなければ0件の想定。

                if (1 < ecList_Result.Count)
                {
                    ecList_Result.RemoveRange(1, ecList_Result.Count - 1);
                }
            }
            else
            {
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NoHit:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー102!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();
                s.Append("必ず、1件以上ヒットする指定でしたが、[");
                s.Append(ecList_Result.Count);
                s.Append("]件ヒットしました。");
                s.Newline();
                s.Newline();

                s.AppendI(1, "ヒット件数=[");
                s.Append(ecList_Result.Count);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "items.Count=[");
                s.Append(ecList_Item.Count);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "sPmName=[");
                s.Append(sPmName);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "無条件一致か?=[");
                s.Append(bUnconditional);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "sExpectedValue=[");
                s.Append(sExpectedValue);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "bRemove=[");
                s.Append(bRemove);
                s.Append("]");
                s.Newline();


                s.AppendI(1, "request_Items=[");
                s.Append(hits);
                s.Append("]");
                s.Newline();



                s.Append("┌────────┐処理後に残った内容 要素数=[");
                s.Append(ecList_Item.Count);
                s.Append("]");
                s.Newline();
                foreach (Expression_Node_String e_Item2 in ecList_Item)
                {
                    string sAttrNameValue;
                    bool   bHit = e_Item2.TrySelectAttribute(out sAttrNameValue, sPmName, EnumHitcount.One_Or_Zero, log_Reports);

                    s.AppendI(1, "・「E■[");
                    s.Append(e_Item2.Cur_Configuration.Name);
                    s.Append("] name=”[");
                    s.Append(sAttrNameValue);
                    s.Append("] 値=”[");
                    s.Append(e_Item2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                    s.Append("]”」");
                    s.Newline();

                    e_Item2.ToText_Snapshot(s);
                }
                s.Append("└────────┘");
                s.Newline();

                // ヒント
                if (1 < ecList_Item.Count)
                {
                    Expression_Node_String parent_Expr = ecList_Item[0].Parent_Expression;
                    if (null != parent_Expr)
                    {
                        s.Append("┌────────┐先頭要素の親");
                        s.Newline();
                        parent_Expr.ToText_Snapshot(s);
                        s.Append("└────────┘");
                        s.Newline();
                    }
                }

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_NotOne:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー101!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();
                s.Append("必ず、1件のみ取得する指定でしたが、[");
                s.Append(ecList_Result.Count);
                s.Append("]件取得しました。");
                s.Newline();
                s.Newline();

                s.AppendI(1, "sPmName=[");
                s.Append(sPmName);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "無条件一致か?=[");
                s.Append(bUnconditional);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "sExpectedValue=[");
                s.Append(sExpectedValue);
                s.Append("]");
                s.Newline();

                s.AppendI(1, "bRemove=[");
                s.Append(bRemove);
                s.Append("]");
                s.Newline();

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
            return(ecList_Result);
        }
Ejemplo n.º 2
0
        //────────────────────────────────────────

        /// <summary>
        /// <arg1>
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,    //「S■arg1」
            Expression_Node_String parent_Ec, //親「E■fnc」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            //
            // デバッグオープンの前に。
            //
            // 「S■arg1 name=”★”」属性
            //
            string sName_MyFnc;

            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, false, log_Reports);

            if (log_Method.CanDebug(1))
            {
                Dictionary <string, string> s_Dic = new Dictionary <string, string>();
                s_Dic.Add(PmNames.S_NAME.Name_Pm, sName_MyFnc);
                pg_ParsingLog.Increment("(6.arg1・3要素)" + cur_Cf.Name, s_Dic);
            }

            //
            //

            if (log_Method.CanDebug(2))
            {
                log_Method.WriteDebug_ToConsole("「S■arg1・3」要素 解析開始┌────────────────┐ 自arg1・3は、e_Parent=[" + parent_Ec.Cur_Configuration.Name + "]の”" + sName_MyFnc + "”属性になる。");
            }


            string parent_SName_Fnc;
            {
                // ヒット必須にするとエラーになる?
                parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }

                //if (0 < d_InMethod.NDebugLevel)
                //{
                //    if (NamesNode.S_FNC != e_Parent.Cur_Configurationtree.Name)
                //    {
                //        d_InMethod.WriteDebug_ToConsole(1, "fnc以外の親要素「E■[" + e_Parent.Cur_Configurationtree.Name + "]」");
                //    }
                //}
            }

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);


            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 元からあった。
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    true, //name属性は必須。
                    true, //value属性は、子<f-str>にする。
                    log_Reports
                    );
            }


            //
            //
            //
            // 子
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }



            //
            //
            //
            // 親へ連結 ※属性連結。
            //
            //
            //
            if (log_Reports.Successful)
            {
                parent_Ec.SetAttribute(sName_MyFnc, cur_Ec, log_Reports);
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }

            if (log_Method.CanDebug(2))
            {
                log_Method.WriteDebug_ToConsole("「S■arg1・3」要素 解析終了└────────────────┘");
            }

            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 3
0
        //────────────────────────────────────────

        public void ToMemory_DataTargetFcell(
            string sValue_Output,
            Expression_Node_String ec_SfCell,//Sf:cell;
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM_DataTargetFcell", log_Reports);
            //
            //


            string sName_Fnc;

            ec_SfCell.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
            if (NamesFnc.S_CELL != sName_Fnc)
            {
                // エラー。
                goto gt_Error_NotSfcell;
            }



            // ■f-cellの子要素
            Expression_Node_String ec_KeyExpected1 = null;
            int nKeyCount = 0;

            {
                //
                //「E■f-cell」の子要素のリスト。
                ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                {
                    // キー値 が1つ入っています。
                    ec_KeyExpected1 = e_Item;
                    nKeyCount++;
                });
            }

            // それでも @keyValueを取得できなければ。
            if (null == ec_KeyExpected1)
            {
                //「E■rec-cond」を調べる。
                Expression_Node_String ec_Where;
                bool bHit2 = ec_SfCell.TrySelectAttribute(out ec_Where, PmNames.S_WHERE.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (bHit2)
                {
                    ec_Where.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                    {
                        if (NamesNode.S_FNC == e_Item.Cur_Configuration.Name)
                        {
                            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#ToM: 「E■f-cell」の「E■@where」属性の下の「E■fnc」を解析。その子要素がvalue相当であるはず。");
                            ec_KeyExpected1 = e_Item;
                        }
                        else
                        {
                        }
                    });
                }
            }


            if (1 < nKeyCount)
            {
                ec_KeyExpected1 = null;

                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー311!", pg_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();

                    s.Append("「E■f-cell」系要素の子要素が、「E■rec-cond」を除いて[" + nKeyCount + "]個ありました。");
                    s.Newline();

                    s.Append("この子要素は キー値になるもので、1個でなければいけません。");
                    s.Newline();

                    // 一覧
                    s.Append("──────────子要素名一覧");
                    s.Newline();

                    ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Str1, ref bool bRemove2, ref bool bBreak2)
                    {
                        if ("" == e_Str1.Cur_Configuration.Name)
                        {
                            s.Append("E■(要素名無し)");
                            s.Newline();
                        }
                        else
                        {
                            s.Append("E■");
                            s.Append(e_Str1.Cur_Configuration.Name);
                            s.Newline();
                        }
                    });
                    s.Append("──────────");
                    s.Newline();

                    // ヒント
                    s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                    r.Message = s.ToString();
                    log_Reports.EndCreateReport();
                }
            }
            else if (null == ec_KeyExpected1)
            {
                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー312!", pg_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();

                    //s.Append("「E■f-cell」系要素の子要素に、「E■f-text」や「E■f-cell」が無いのか、有っても値がありませんでした。");
                    s.Append("「E■f-cell」の「keyValue」相当の値が指定されていませんでした。");
                    s.Newline();

                    // 一覧
                    s.Append("──────────子要素名一覧");
                    s.Newline();
                    ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Str1, ref bool bRemove2, ref bool bBreak2)
                    {
                        if ("" == e_Str1.Cur_Configuration.Name)
                        {
                            s.Append("E■(要素名無し)");
                            s.Newline();
                        }
                        else
                        {
                            s.Append("E■");
                            s.Append(e_Str1.Cur_Configuration.Name);
                            s.Newline();
                        }
                    });
                    s.Append("──────────");
                    s.Newline();

                    // ヒント
                    s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                    r.Message = s.ToString();
                    log_Reports.EndCreateReport();
                }
            }

            if (log_Reports.Successful)
            {
                //
                // <f-cell>1つにつき。
                //
                ExpressionToMemory_FcellImpl to = new ExpressionToMemory_FcellImpl();
                to.Translate(
                    sValue_Output,
                    ec_KeyExpected1,
                    ec_SfCell,// <f-cell>相当と想定。
                    moApplication,
                    log_Reports
                    );
            }

            goto gt_EndMethod;
            //
            //
gt_Error_NotSfcell:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー909!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("Sf:cell;でないExpression_Node_Stringが指定されました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));
                if (null != ec_SfCell)
                {
                    ec_SfCell.ToText_Snapshot(s);
                }

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        /// <summary>
        /// <arg1>
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,//「S■arg1」
            Expression_Node_String parent_Ec,//親「E■fnc」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE",log_Reports);

            //
            // デバッグオープンの前に。
            //
            // 「S■arg1 name=”★”」属性
            //
            string sName_MyFnc;
            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, false, log_Reports);

            if (log_Method.CanDebug(1))
            {
                Dictionary<string, string> s_Dic = new Dictionary<string, string>();
                s_Dic.Add(PmNames.S_NAME.Name_Pm, sName_MyFnc);
                pg_ParsingLog.Increment("(6.arg1・3要素)" + cur_Cf.Name, s_Dic);
            }

            //
            //

            if (log_Method.CanDebug(2))
            {
                log_Method.WriteDebug_ToConsole("「S■arg1・3」要素 解析開始┌────────────────┐ 自arg1・3は、e_Parent=[" + parent_Ec.Cur_Configuration.Name + "]の”" + sName_MyFnc + "”属性になる。");
            }

            string parent_SName_Fnc;
            {
                // ヒット必須にするとエラーになる?
                parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }

                //if (0 < d_InMethod.NDebugLevel)
                //{
                //    if (NamesNode.S_FNC != e_Parent.Cur_Configurationtree.Name)
                //    {
                //        d_InMethod.WriteDebug_ToConsole(1, "fnc以外の親要素「E■[" + e_Parent.Cur_Configurationtree.Name + "]」");
                //    }
                //}
            }

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);

            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 元からあった。
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    true,//name属性は必須。
                    true,//value属性は、子<f-str>にする。
                    log_Reports
                    );
            }

            //
            //
            //
            // 子
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }

            //
            //
            //
            // 親へ連結 ※属性連結。
            //
            //
            //
            if (log_Reports.Successful)
            {
                parent_Ec.SetAttribute(sName_MyFnc, cur_Ec, log_Reports);
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }

            if (log_Method.CanDebug(2))
            {
                log_Method.WriteDebug_ToConsole( "「S■arg1・3」要素 解析終了└────────────────┘");
            }

            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 5
0
        //────────────────────────────────────────

        /// <summary>
        /// <f-cell>→M
        /// </summary>
        /// <param name="outputValueStr"></param>
        /// <param name="nKeyExpected"></param>
        /// <param name="nFcell"></param>
        /// <param name="moApplication"></param>
        /// <param name="log_Reports"></param>
        public void Translate(
            string sOutputValue,
            Expression_Node_String ec_KeyExpected,
            Expression_Node_String ec_SfCell,//Sf:cell;相当と想定。
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "EToM2", log_Reports);
            //
            //

            string sName_Fnc;

            ec_SfCell.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
            if (NamesFnc.S_CELL != sName_Fnc)
            {
                // エラー。
                goto gt_Error_NotSfcell;
            }


            string sSelectedFldName;

            if (log_Reports.Successful)
            {
                bool bHit = ec_SfCell.TrySelectAttribute(
                    out sSelectedFldName,
                    PmNames.S_SELECT.Name_Pm,
                    EnumHitcount.One_Or_Zero,
                    log_Reports
                    );

                //if (!bHit)
                //{
                //    // 【追加 2012-07-10】
                //    // Sf:cell; の子要素arg1 には、name="select" のものがある。本来これは属性連結しておいて欲しい。
                //    List<Expression_Node_String> list_Arg1 = e_SfCell.SelectDirectchildByNodename(NamesNode.S_ARG1, false, EnumHitcount.Unconstraint, log_Reports);

                //    d_InMethod.WriteDebug_ToConsole(1, "sSelectedFldNameが属性になかった。子要素arg1(" + list_Arg1 .Count+ "個)から探す。");
                //    if (0<d_InMethod.NDebugLevel && list_Arg1.Count<=0)
                //    {
                //        Log_TextIndented s = new Log_TextIndentedImpl();
                //        e_SfCell.ToText_Snapshot(s);
                //        d_InMethod.WriteDebug_ToConsole(1, s.ToString());
                //    }

                //    EUtil_NodeImpl.SelectItemsByAttrAsCsv(list_Arg1, PmNames.NAME.SAttrName, ValuesAttr.S_SELECT, false, EnumHitcount.First_Exist, log_Reports);

                //    if (log_Reports.Successful)
                //    {
                //        sSelectedFldName = list_Arg1[0].Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                //    }
                //}
            }
            else
            {
                sSelectedFldName = "";
            }


            Expression_Node_String ec_KeyFldName1 = null;

            if (log_Reports.Successful)
            {
                Expression_Node_String ec_Where = null;

                //
                // 「E■where」は子要素。
                //

                // 再検索。
                ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String ec_Child, ref bool bRemove, ref bool bBreak)
                {
                    string sValue;
                    ec_Child.TrySelectAttribute(out sValue, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);

                    if (NamesNode.S_FNC == ec_Child.Cur_Configuration.Name &&
                        NamesFnc.S_WHERE == sValue)
                    {
                        ec_Where = ec_Child;

                        if (pg_Method.CanDebug(2))
                        {
                            pg_Method.WriteDebug_ToConsole("子「E■[" + ec_Child.Cur_Configuration.Name + "]」。子要素数=[" + ec_Where.List_Expression_Child.Count + "]");
                        }

                        ec_Where.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                        {
                            if (NamesNode.S_FNC == e_Item.Cur_Configuration.Name)
                            {
                                Expression_Node_String ec_Field;
                                bool bHit3 = e_Item.TrySelectAttribute(out ec_Field, PmNames.S_FIELD.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                                if (bHit3)
                                {
                                    //「E■f-cell」/「E■@where」/「E■fnc field=”★”」。
                                    ec_KeyFldName1 = ec_Field;

                                    if (pg_Method.CanDebug(2))
                                    {
                                        pg_Method.WriteDebug_ToConsole("「E■f-cell」/「E■a-where」/「E■fnc field=”[" + ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "]”」。");
                                    }
                                }
                                else
                                {
                                    throw new Exception("ここは通らない?");
                                }
                            }
                            else
                            {
                                // #エラー
                                System.Console.WriteLine(Info_Controls.Name_Library + ":" + this.GetType().Name + "#EToM: 「E■fnc」がありませんでした。");
                            }
                        });
                    }
                    else
                    {
                        if (pg_Method.CanDebug(2))
                        {
                            pg_Method.WriteDebug_ToConsole("(無視)  子「E■[" + ec_Child.Cur_Configuration.Name + "]」。");
                        }
                    }
                });

                if (null == ec_Where)
                {
                    // #エラー
                    System.Console.WriteLine(Info_Controls.Name_Library + ":" + this.GetType().Name + "#EToM: 「E■f-cell」に、子「E■where」が無かった? そういう場合(無条件)もある。");
                }
            }
            else
            {
                ec_KeyFldName1 = null;
            }


            //
            // from
            //
            Expression_Node_String ec_TableName1;//ソース情報利用

            if (log_Reports.Successful)
            {
                // Sf:cell; に from が指定されていない?
                bool bHit = ec_SfCell.TrySelectAttribute(
                    out ec_TableName1,
                    PmNames.S_FROM.Name_Pm,
                    EnumHitcount.One,
                    log_Reports
                    );

                //if (null == e_TableName1)
                //{
                //    d_InMethod.WriteDebug_ToConsole(1, "e_TableName1が属性になかった。子要素arg1から探す。");
                //    // 【追加 2012-07-10】
                //    // Sf:cell; の子要素arg1 には、name=”from” のものがある。本来これは属性連結しておいて欲しい。
                //    List<Expression_Node_String> list_Arg1 = e_SfCell.SelectDirectchildByNodename(NamesNode.S_ARG1, false, EnumHitcount.Unconstraint, log_Reports);
                //    EUtil_NodeImpl.SelectItemsByAttrAsCsv(list_Arg1, PmNames.NAME.SAttrName, ValuesAttr.S_FROM, false, EnumHitcount.First_Exist, log_Reports);

                //    if (log_Reports.Successful)
                //    {
                //        e_TableName1 = list_Arg1[0];
                //    }
                //}
            }
            else
            {
                ec_TableName1 = null;
            }


            //
            // required
            //
            bool bExpectedValueRequired = false;

            if (log_Reports.Successful)
            {
                string sRequired1;
                bool   bHit = ec_SfCell.TrySelectAttribute(out sRequired1, PmNames.S_REQUIRED.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (bHit)
                {
                    // 【旧仕様】
                    bool bParseSuccessful = bool.TryParse(sRequired1, out bExpectedValueRequired);
                }
                else
                {
                    // 【新仕様】

                    //
                    // 新仕様では、「E■f-cell/@E■where/E■prm name=”required”」。
                    //
                    {
                        Expression_Node_String ec_Where;
                        bool bHit1 = ec_SfCell.TrySelectAttribute(out ec_Where, PmNames.S_WHERE.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                        if (bHit1)
                        {
                            throw new Exception("こーこは通らない?");
                        }
                    }
                }
            }
            else
            {
            }


            // e_TableName を取得してから引数エラーチェック。
            if (null == ec_KeyExpected)
            {
                // エラー
                goto gt_Error_NullKeyExpected;
            }

            // ──────────

            Table_Humaninput o_Table;

            if (log_Reports.Successful)
            {
                o_Table = moApplication.MemoryTables.GetTable_HumaninputByName(ec_TableName1, true, log_Reports);
                // エラー時には、エラーメッセージを出させます。

                if (null == o_Table)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundTable;
                }
                else
                {
                    //
                    // 正常時
                    //
                    //.WriteLine("(" + Info_Forms .LibraryName+ ")" + this.GetType().NFcName + "#...: (1)テーブル検索終了 refOTable=[" + refOTable.SourceFilePath + "]");
                }
            }
            else
            {
                o_Table = null;
            }


            string err_SKeyFldName;
            string err_SSelectedFldName;

            // field=""。
            Fielddefinition o_KeyFldDef;

            if (log_Reports.Successful)
            {
                //
                // 検索のキーとなるフィールドの定義を調べます。
                //

                List <string> sList_KeyFldName;
                {
                    sList_KeyFldName = new List <string>();

                    string sKeyFldName = ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                    if ("" == sKeyFldName.Trim())
                    {
                        // エラー
                        err_SKeyFldName = sKeyFldName;
                        goto gt_Error_EmptyKeyField;
                    }
                    sList_KeyFldName.Add(sKeyFldName);
                    if (sList_KeyFldName.Count < 1)
                    {
                        // エラー
                        err_SKeyFldName = sKeyFldName;
                        goto gt_Error_ZeroKeyField;
                    }
                }

                RecordFielddefinition recordFielddefinition;
                bool bHit = o_Table.TryGetFieldDefinitionByName(
                    out recordFielddefinition,
                    sList_KeyFldName,
                    true,
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    goto gt_EndMethod;
                }

                o_KeyFldDef = recordFielddefinition.ValueAt(0);
            }
            else
            {
                o_KeyFldDef = null;
            }


            RecordFielddefinition recordFielddefinition_Selected;

            if (log_Reports.Successful)
            {
                // 選択対象のフィールドの定義を調べます。

                List <string> sList_SelectedFldName;
                {
                    sList_SelectedFldName = new CsvTo_ListImpl().Read(sSelectedFldName);
                    foreach (string sName in sList_SelectedFldName)
                    {
                        if ("" == sName.Trim())
                        {
                            // エラー
                            err_SSelectedFldName = sSelectedFldName;
                            goto gt_Error_EmptySelectField;
                        }
                    }

                    if (sList_SelectedFldName.Count < 1)
                    {
                        // エラー
                        err_SSelectedFldName = sSelectedFldName;
                        goto gt_Error_ZeroSelectField;
                    }
                }

                bool bHit = o_Table.TryGetFieldDefinitionByName(
                    out recordFielddefinition_Selected,
                    sList_SelectedFldName,
                    false,
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    goto gt_EndMethod;
                }
            }
            else
            {
                recordFielddefinition_Selected = null;
            }



            if (log_Reports.Successful)
            {
                if (null == o_KeyFldDef)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundKeyFldDefinition;
                }
            }



            if (log_Reports.Successful)
            {
                if (recordFielddefinition_Selected.Count < 1)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundSelectFldDefinition;
                }
            }


            if (log_Reports.Successful)
            {
                List <DataRow> dst_Row = new List <DataRow>();


                string             sKeyFieldName         = ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                string             sExpectedValue        = ec_KeyExpected.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                Configuration_Node cf_WrittenPlace_Query = ec_SfCell.Cur_Configuration;

                SelectPerformerImpl sp = new SelectPerformerImpl();
                sp.Select(
                    out dst_Row,
                    sKeyFieldName,
                    sExpectedValue,
                    bExpectedValueRequired,
                    o_KeyFldDef,
                    o_Table.DataTable,
                    cf_WrittenPlace_Query,
                    log_Reports
                    );



                if (0 < dst_Row.Count)
                {
                    //.WriteLine("(" + Info_Forms .LibraryName+ ")" + this.GetType().NFcName + "#...: (6a)該当 recordSet.Count=[" + recordSet.Count + "]");

                    foreach (DataRow row in dst_Row)
                    {
                        ToMemory_CellImpl updater = new ToMemory_CellImpl();

                        recordFielddefinition_Selected.ForEach(delegate(Fielddefinition fielddefinition_Selected, ref bool isBreak2, Log_Reports log_Reports2)
                        {
                            updater.ToMemory_ToSelectedField(
                                sOutputValue,
                                ec_SfCell,
                                row,
                                fielddefinition_Selected,
                                log_Reports
                                );
                        }, log_Reports);
                    }
                }
                else
                {
                    // エラー。
                    goto gt_Error_NotFoundRecord;
                }
            }

            goto gt_EndMethod;
            //
            //
gt_Error_NotSfcell:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー909!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("Sf:cell;でないExpression_Node_Stringが指定されました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));
                if (null != ec_SfCell)
                {
                    ec_SfCell.ToText_Snapshot(s);
                }

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
gt_Error_NullKeyExpected:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー906!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("引数e_KeyExpectedにヌルが指定されました。 e_KeyExpected=[");
                s.Append(ec_KeyExpected);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_EmptyKeyField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー903!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("fieldで指定されたキーフィールドの名前が空文字列でした。 err_SKeyFldName=[");
                s.Append(err_SKeyFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_ZeroKeyField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー902!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("fieldで指定されたキーフィールドの個数が0個でした。 err_SKeyFldName=[");
                s.Append(err_SKeyFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_EmptySelectField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー904!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("selectで指定されたフィールドの名前に空文字列がありました。 err_SSelectedFldName=[");
                s.Append(err_SSelectedFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_ZeroSelectField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー901!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("selectで指定されたフィールドの個数が0個でした。 err_SSelectedFldName=[");
                s.Append(err_SSelectedFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            // エラー。
gt_Error_NotFoundTable:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー1011!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append(" ヌル=refTable");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_NotFoundKeyFldDefinition:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー478!", pg_Method);

                StringBuilder t = new StringBuilder();

                t.Append(" キーフィールドの定義を取得できませんでした。");
                t.Append(Environment.NewLine);

                t.Append("「E■[");
                t.Append(ec_KeyFldName1.Cur_Configuration.Name);
                t.Append("]」、キーフィールド名=[");
                t.Append(ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                t.Append("]");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                t.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_NotFoundSelectFldDefinition:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー479!", pg_Method);

                StringBuilder t = new StringBuilder();

                t.Append(" 取得データが入っているはずのフィールドの定義を取得できませんでした。");
                t.Append(Environment.NewLine);
                t.Append("  指定されたフィールド名=[");
                t.Append(sSelectedFldName);
                t.Append("]");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                t.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_NotFoundRecord:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー344!", pg_Method);

                string sDebugExceptedKey = ec_KeyExpected.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("【失敗】");
                s.Newline();
                s.Newline();

                s.Append("[");
                s.Append(o_Table.Name);
                s.Append("](テーブル)には、");
                s.Append(Environment.NewLine);

                s.Append("[");
                s.Append(ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]フィールドに");

                s.Append("[");
                s.Append(sDebugExceptedKey);
                s.Append("]が入っているレコードは、見つかりませんでした。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("この入力したデータは、入力が確定されず、無視されています。");
                s.Append(Environment.NewLine);

                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("もしかして?");
                s.Append(Environment.NewLine);
                s.Append(" ・ツールの不便さにより、手入力で");
                s.Append(Environment.NewLine);
                s.Append("  指定のテーブルに ID付きのレコードの空欄を");
                s.Append(Environment.NewLine);
                s.Append("  予め 作っておかなければならなかった、といった決まりごとはありませんか?");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append(" ・それとも、それ以外の理由?");
                s.Append(Environment.NewLine);

                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("────────以下はプログラマー用の情報。");
                s.Append(Environment.NewLine);


                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();

                //essageBox.Show(r.SMsg(log_Reports), Info_Forms.LibraryName + ":" + this.GetType().Name );
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 6
0
        //────────────────────────────────────────

        /// <summary>
        /// 選択されているセルに、指定の値を上書きします。
        /// </summary>
        /// <param nFcName="outputValueStr"></param>
        /// <param nFcName="row"></param>
        /// <param nFcName="selFldDefinition">選択フィールド</param>
        /// <param nFcName="log_Reports"></param>
        public void ToMemory_ToSelectedField(
            string sValue_Output,
            Expression_Node_String ec_Fcell,
            DataRow row,
            Fielddefinition selFldDefinition,//選択したフィールド定義
            Log_Reports log_Reports
            )
        {
            //essageBox.Show("アップデートデータ【開始】 outputValueStr=[" + outputValueStr + "]\n", "(FormsImpl)" + this.GetType().NFcName );

            //.WriteLine(this.GetType().NFcName + "#: 【開始】データのアップデートを始める。");

            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM_ToSelectedField", log_Reports);
            //
            //

            string sName_SelectedFld;
            {
                bool bHit = ec_Fcell.TrySelectAttribute(
                    out sName_SelectedFld,
                    PmNames.S_SELECT.Name_Pm,
                    EnumHitcount.One,
                    log_Reports
                    );
            }

            string sConfigStack_StringOfCell = sName_SelectedFld;

            switch (selFldDefinition.Type_Field)
            {
            case EnumTypeFielddefinition.String:
            {
                // 空欄も自動処理
                String_HumaninputImpl cellData = new String_HumaninputImpl(sConfigStack_StringOfCell);
                cellData.Text = sValue_Output;

                row[sName_SelectedFld] = cellData;
            }
            break;

            case EnumTypeFielddefinition.Int:
            {
                // 空欄も自動処理
                Int_HumaninputImpl cellData = new Int_HumaninputImpl(sConfigStack_StringOfCell);
                cellData.Text          = sValue_Output;
                row[sName_SelectedFld] = cellData;
            }
            break;

            case EnumTypeFielddefinition.Bool:
            {
                // 空欄も自動処理
                Bool_HumaninputImpl cellData = new Bool_HumaninputImpl(sConfigStack_StringOfCell);
                cellData.Text          = sValue_Output;
                row[sName_SelectedFld] = cellData;
            }
            break;

            default:
            {
                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー398!", pg_Method);

                    StringBuilder t = new StringBuilder();

                    t.Append("予期しない、フィールドの型です。");
                    t.Append(Environment.NewLine);
                    t.Append("selFldDefinition.Type=[");
                    t.Append(selFldDefinition.ToString_Type());
                    t.Append("]");
                    t.Append(Environment.NewLine);
                    t.Append(Environment.NewLine);

                    // ヒント
                    t.Append(r.Message_Configuration(
                                 ec_Fcell.Cur_Configuration));

                    r.Message = t.ToString();
                    log_Reports.EndCreateReport();
                }
            }
            break;
            }

            //
            pg_Method.EndMethod(log_Reports);
        }
        public void ParseAttr_InConfigurationtreeToExpression(
            Configurationtree_Node cur_Cf,
            Expression_Node_String cur_Ec,
            bool bRequired_NameAttr,//name属性が必須な場合、真。
            bool bRequired_ValueAttrIsChild,//value属性を、子<f-str>にする場合、真。
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseAttr",log_Reports);
            //
            //

            if (log_Reports.Successful)
            {
                //
                // s属性 はなんでも受け入れるとする。
                //
                cur_Cf.Dictionary_Attribute.ForEach(delegate(string sPmName, string sAttrValue, ref bool bBreak)
                {
                    Expression_Node_String ec_AttrValue;
                    if (log_Reports.Successful)
                    {

                        ec_AttrValue = new Expression_Node_StringImpl(cur_Ec, cur_Cf);
                        ec_AttrValue.AppendTextNode(sAttrValue, cur_Cf, log_Reports);//ここでエラー?
                    }
                    else
                    {
                        bBreak = true;
                        goto gt_EndMethod1;
                    }

                    if (log_Reports.Successful)
                    {
                        if (bRequired_ValueAttrIsChild && PmNames.S_VALUE.Name_Pm == sPmName)
                        {
                            // value属性は、子<f-str>にする。

                            //d_InMethod.WriteDebug_ToConsole(2,"     ["+sAttrName+"]属性を子要素として追加。");
                            cur_Ec.List_Expression_Child.Add(ec_AttrValue, log_Reports);
                        }
                        else
                        {
                            // 属性にする。
                            cur_Ec.SetAttribute(sPmName, ec_AttrValue, log_Reports);
                        }
                    }
                    else
                    {
                        bBreak = true;
                        goto gt_EndMethod1;
                    }

                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole( " ├属性[" + sPmName + "]=”[" + sAttrValue + "]”");
                    }

                    // 追加したe_Attr=[" + e_AttrValue.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "] e属性数=[" + e_Cur.Dictionary_Expression_Attribute.Count + "] 子要素数=[" + e_Cur.List_Child.Count + "]

                    goto gt_EndMethod1;
                //
                //
                //
                //
                gt_EndMethod1:
                    ;
                });

                //
                // 【開発中 2012-06-04】
                // S_Elmの、S_AttrDic は廃止したい。
                //

                if (bRequired_NameAttr)
                {
                    //
                    // name属性は必須。
                    //
                    string sFncName2;
                    log_Reports.Log_Callstack.Push(log_Method, "①name必須指定");
                    cur_Ec.TrySelectAttribute(out sFncName2, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
                    log_Reports.Log_Callstack.Pop(log_Method, "①name必須指定");

                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole( "sFncName2=[" + sFncName2 + "]");
                    }
                    //bool bHit = s_Cur.Dictionary_Attribute.TryGetValue(PmNames.NAME.SAttrName, out sFncName2, true, log_Reports);

                    if (!log_Reports.Successful)
                    {
                        goto gt_EndMethod;
                    }

                }
            }
            else
            {
                goto gt_EndMethod;
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        public override void Translate(
            Configurationtree_Node cur_Cf,//<lookup-id>
            Expression_Node_String parent_Ec,//< Sf:text-template;>
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE",log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(9)" + cur_Cf.Name);
            }

            //
            //

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);

            //
            //
            //
            // 親へ連結 (value属性)
            //
            //
            //
            {
                //
                // 自要素の value="" 属性を、親へ連結
                //
                PmName pmName = PmNames.S_VALUE;

                string sValue;
                bool bHit = cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sValue, false, log_Reports);
                if (bHit)
                {

                    cur_Ec.AppendTextNode(
                        sValue,
                        cur_Cf,
                        log_Reports
                        );

                    //
                    //
                    //
                    // 子
                    //
                    //
                    //
                    this.ParseChild_InConfigurationtreeToExpression(
                        cur_Cf,
                        cur_Ec,//自
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                    //
                    //
                    //
                    // 親へ連結 ※属性連結
                    //
                    //
                    //
                    parent_Ec.SetAttribute(PmNames.S_LOOKUP_ID.Name_Pm, cur_Ec, log_Reports);

                    goto gt_EndMethod;
                }
                else
                {
                }

            }

            //
            //
            //
            // 子
            //
            //
            //
            {
                //<a-default>の子要素を確認し、親<f-switch>のdefault属性に追加します。

                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }

            //
            //
            //
            // 親へ連結
            //
            //
            //
            parent_Ec.SetAttribute(PmNames.S_LOOKUP_ID.Name_Pm, cur_Ec, log_Reports);

            //
            //
            //
            // 親へ連結 debug
            //
            //
            //
            if (log_Method.CanDebug(1))
            {
                string parent_SName_Fnc;
                parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.WriteDebug_ToConsole(" ☆☆☆☆☆☆☆☆ 親<[" + parent_Ec.Cur_Configuration.Name + "] name=”[" + parent_SName_Fnc + "]” >");

                string sName_MyFnc;
                cur_Ec.TrySelectAttribute(out sName_MyFnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.WriteDebug_ToConsole(" ☆☆☆☆☆☆☆☆ 自<[" + cur_Ec.Cur_Configuration.Name + "] name=”[" + sName_MyFnc + "]” >");
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
        private void ParseChild_SpecialSwitch_(
            Configurationtree_Node cur_Cf,//「S■fnc」
            Expression_Node_String owner_Ec,// 「E■fnc」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            // a-●●要素や、switch要素など。

            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseChild_SpecialSwitch_",log_Reports);

            //
            //
            //
            //

            //
            // データ_ソース、データ_ターゲット、<fnc >の子要素。

            string sName_OwnerNode = owner_Ec.Cur_Configuration.Name;
            string sName_OwnerFnc = "";
            {
                EnumHitcount enumHitcount;
                if (NamesNode.S_FNC == sName_OwnerNode
                    //||
                    //NamesNode.S_F_TEXT_TEMPLATE2 == sOwnerNodeName
                    )
                {
                    enumHitcount = EnumHitcount.One;
                }
                else
                {
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }
                bool bHit = owner_Ec.TrySelectAttribute(out sName_OwnerFnc, PmNames.S_NAME.Name_Pm, enumHitcount, log_Reports);
            }

            string sName_MyFnc;
            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, true, log_Reports);

            //
            // <f-switch>要素であれば、子Sf:case;要素が何個もある。
            //
            if (log_Reports.Successful)
            {
                if (NamesFnc.S_SWITCH == sName_MyFnc)
                {
                    cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node s_Child, ref bool bBreak)
                    {
                        Configurationtree_Node err_CfAttr;
                        if (log_Reports.Successful)
                        {
                            string sName;
                            s_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName, true, log_Reports);

                            if (
                                NamesNode.S_FNC == s_Child.Name
                                && NamesFnc.S_CASE == sName
                                )
                            {
                                ConfigurationtreeToExpression_F14n16_AbstractImpl_ to = new ConfigurationtreeToExpression_F16_CaseImpl_();
                                to.Translate(
                                    s_Child,//Sf:case;
                                    owner_Ec,//Sf:switch;
                                    memoryApplication,
                                    pg_ParsingLog,
                                    log_Reports
                                    );
                            }
                            else if (NamesNode.S_ARG == s_Child.Name)
                            {
                                // todo:<arg>。恐らくswitchValueなど。
                                ConfigurationtreeToExpression_F14n16 to = new ConfigurationtreeToExpression_F14_FArgImpl();
                                to.Translate(
                                    s_Child,
                                    owner_Ec,//<f-switch >
                                    memoryApplication,
                                    pg_ParsingLog,
                                    log_Reports
                                    );
                            }
                            else
                            {
                                err_CfAttr = s_Child;
                                bBreak = true;
                                goto gt_Error_NotACase;
                            }
                        }

                        goto gt_EndMethod2;
                    //
                    gt_Error_NotACase:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, err_CfAttr.Name, log_Reports);//設定ノード名
                            tmpl.SetParameter(2, err_CfAttr.GetType().Name, log_Reports);//ノードのクラス名
                            tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(err_CfAttr), log_Reports);//設定位置パンくずリスト

                            memoryApplication.CreateErrorReport("Er:7006;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;
                    //
                    gt_EndMethod2:
                        ;
                    });
                }
            }

            goto gt_EndMethod;

            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 10
0
        public void ParseAttr_InConfigurationtreeToExpression(
            Configurationtree_Node cur_Cf,
            Expression_Node_String cur_Ec,
            bool bRequired_NameAttr,         //name属性が必須な場合、真。
            bool bRequired_ValueAttrIsChild, //value属性を、子<f-str>にする場合、真。
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseAttr", log_Reports);
            //
            //


            if (log_Reports.Successful)
            {
                //
                // s属性 はなんでも受け入れるとする。
                //
                cur_Cf.Dictionary_Attribute.ForEach(delegate(string sPmName, string sAttrValue, ref bool bBreak)
                {
                    Expression_Node_String ec_AttrValue;
                    if (log_Reports.Successful)
                    {
                        ec_AttrValue = new Expression_Node_StringImpl(cur_Ec, cur_Cf);
                        ec_AttrValue.AppendTextNode(sAttrValue, cur_Cf, log_Reports);//ここでエラー?
                    }
                    else
                    {
                        bBreak = true;
                        goto gt_EndMethod1;
                    }

                    if (log_Reports.Successful)
                    {
                        if (bRequired_ValueAttrIsChild && PmNames.S_VALUE.Name_Pm == sPmName)
                        {
                            // value属性は、子<f-str>にする。

                            //d_InMethod.WriteDebug_ToConsole(2,"     ["+sAttrName+"]属性を子要素として追加。");
                            cur_Ec.List_Expression_Child.Add(ec_AttrValue, log_Reports);
                        }
                        else
                        {
                            // 属性にする。
                            cur_Ec.SetAttribute(sPmName, ec_AttrValue, log_Reports);
                        }
                    }
                    else
                    {
                        bBreak = true;
                        goto gt_EndMethod1;
                    }

                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole(" ├属性[" + sPmName + "]=”[" + sAttrValue + "]”");
                    }

                    // 追加したe_Attr=[" + e_AttrValue.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "] e属性数=[" + e_Cur.Dictionary_Expression_Attribute.Count + "] 子要素数=[" + e_Cur.List_Child.Count + "]

                    goto gt_EndMethod1;
                    //
                    //
                    //
                    //
                    gt_EndMethod1:
                    ;
                });

                //
                // 【開発中 2012-06-04】
                // S_Elmの、S_AttrDic は廃止したい。
                //



                if (bRequired_NameAttr)
                {
                    //
                    // name属性は必須。
                    //
                    string sFncName2;
                    log_Reports.Log_Callstack.Push(log_Method, "①name必須指定");
                    cur_Ec.TrySelectAttribute(out sFncName2, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
                    log_Reports.Log_Callstack.Pop(log_Method, "①name必須指定");

                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("sFncName2=[" + sFncName2 + "]");
                    }
                    //bool bHit = s_Cur.Dictionary_Attribute.TryGetValue(PmNames.NAME.SAttrName, out sFncName2, true, log_Reports);

                    if (!log_Reports.Successful)
                    {
                        goto gt_EndMethod;
                    }
                }
            }
            else
            {
                goto gt_EndMethod;
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        public override void Translate(
            Configurationtree_Node cur_Cf,//「S■fnc」
            Expression_Node_String parent_Ec,//「S■fnc」、や「S■event」か?
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE",log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(29)" + cur_Cf.Name);
            }

            //
            //
            //
            //

            if (!log_Reports.Successful)
            {
                goto gt_EndMethod;
            }

            if (null == parent_Ec)
            {
                goto gt_Error_NullParent;
            }

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = null;  //「E■fnc」

            //
            // 親ファンク名
            // 自ファンク名
            //
            string parent_SName_Fnc = "";
            string sName_MyFnc = "";
            {
                bool bHit9 = parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }
                else if (NamesNode.S_FNC == parent_Ec.Cur_Configuration.Name && "" == parent_SName_Fnc)
                {
                    //
                    // エラー。親要素が、name属性を持たない「E■fnc」だった。
                    //
                    goto gt_Error_NoNameParent1;
                }
            }

            //   「E■fnc」には、name=”★”属性が必須。
            bool bHit = cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, true, log_Reports);

            if (!log_Reports.Successful)
            {
                goto gt_EndMethod;
            }

            //
            //
            //
            // 自
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 「E■fnc」要素を作成。

                if (NamesFnc.S_ALL_TRUE == sName_MyFnc)
                {
                    cur_Ec = Expressionv_5FAllTrueImpl.Create(parent_Ec, cur_Cf, memoryApplication);
                }
                else if (NamesFnc.S_TEXT_TEMPLATE == sName_MyFnc)
                {
                    cur_Ec = Expression_SftextTemplate.Create(parent_Ec, cur_Cf, memoryApplication);
                }
                else if (NamesFnc.S_CELL == sName_MyFnc)
                {
                    if (log_Method.CanDebug(10))
                    {
                        log_Method.WriteDebug_ToConsole( "(2) 「S■fnc name=”[" + sName_MyFnc + "]”」要素 属性解析開始。");
                    }
                    cur_Ec = Expression_SfcellImpl.Create(parent_Ec, cur_Cf, memoryApplication);
                }
                else if (NamesFnc.S_VALUE_CONTROL == sName_MyFnc)
                {
                    // コントロール名を取得し、コントロールの値を返すように設定。

                    string sFcName;
                    cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sFcName, true, log_Reports);
                    if (!log_Reports.Successful)
                    {
                        goto gt_EndMethod;
                    }

                    Expression_Node_String ec_FcName = new Expression_Leaf_StringImpl(sFcName, parent_Ec, cur_Cf);
                    cur_Ec = new Expression_ValuecontrolImpl(ec_FcName, memoryApplication, parent_Ec, cur_Cf);
                }
                else if (NamesFnc.S_SWITCH == sName_MyFnc)
                {
                    if(log_Method.CanDebug(1))
                    {
                        Log_TextIndented s = new Log_TextIndentedImpl();
                        parent_Ec.ToText_Snapshot(s);
                        log_Method.WriteDebug_ToConsole( "E■switch生成。s=" + s.ToString());
                    }
                    cur_Ec = Expression_SfswitchImpl.Create(parent_Ec, cur_Cf);
                }
                else
                {

                    if(sName_MyFnc.StartsWith(NamesFnc.S_UF))
                    {
                        // ユーザー定義関数
                        cur_Ec = new Expression_FfncImpl(parent_Ec, cur_Cf, memoryApplication);
                    }
                    else
                    {
                        // システム定義関数
                        cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);
                    }

                }
            }
            else
            {
                goto gt_EndMethod;
            }

            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 元からあった。
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    true,//name属性は必須。
                    false,//value属性は、子<f-str>にしない。
                    log_Reports
                    );
            }

            //
            //
            //
            // 子
            //
            //
            //
            if (log_Reports.Successful)
            {
                if(NamesFnc.S_TEXT_TEMPLATE == sName_MyFnc)
                {
                    this.ParseChild_SpecialTextTemplate_(
                        cur_Cf,
                        cur_Ec,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else if (NamesFnc.S_SWITCH == sName_MyFnc)
                {
                    this.ParseChild_SpecialSwitch_(
                        cur_Cf,//「S■fnc」
                        cur_Ec,//「E■fnc」
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                            );
                }
                else if (NamesFnc.S_VLD_EMPTY_FIELD == sName_MyFnc)
                {
                    // <a-empty-field>要素
                    ConfigurationtreeToExpression_V55_AEmptyFieldImpl_ to = new ConfigurationtreeToExpression_V55_AEmptyFieldImpl_();
                    to.Translate(
                        cur_Cf,
                        cur_Ec,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else
                {
                    // この「S□fnc」の子を解析。
                    // 「Sf:cell;」
                    // 「Sf:where;」
                    // 「Sf:rec-cond;」

                    // 【追加 2012-06-02】
                    this.ParseChild_SpecialFnc_(
                        cur_Cf,
                        cur_Ec,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
            }
            else
            {
                goto gt_EndMethod;
            }

            //
            //
            //
            // 親へ連結
            //
            //
            //
            if (log_Reports.Successful)
            {

                //
                // "hardcoding-control" に追加する子要素としては、f-cellなどがある。
                //

                if (
                    sName_MyFnc.StartsWith(NamesFnc.S_UF)//ユーザー定義関数
                    || NamesFnc.S_TEXT_TEMPLATE == sName_MyFnc//テンプレート
                    || NamesFnc.S_SWITCH == sName_MyFnc//スイッチ文
                    || (NamesNode.S_FNC == cur_Cf.Name && NamesFnc.S_VALUE_CONTROL == sName_MyFnc)//todo:
                    || (NamesNode.S_FNC == parent_Ec.Cur_Configuration.Name)
                    || (NamesFnc.S_CELL == sName_MyFnc || NamesFnc.S_TEXT_TEMPLATE == sName_MyFnc)
                    || (sName_MyFnc == NamesFnc.S_REC_COND && NamesNode.S_FNC == parent_Ec.Cur_Configuration.Name && NamesFnc.S_WHERE == parent_SName_Fnc)//親が<rec-cond>で、自<fnc name=”Sf:Where;”>要素
                    )
                {
                    parent_Ec.List_Expression_Child.Add(cur_Ec, log_Reports);
                }
                else
                {
                    // エラー

                    goto gt_Error_CanNotAddParent;
                    // todo:
                    //throw new Exception(Info_SToE.LibraryName + ":" + this.GetType().Name + "#SToE:(18)★★親要素へ連結不能    ・親「E■[" + e_Parent.Cur_Configurationtree.Name + "] name=”[" + sParentFncName + "]”」 ← 自「S■[" + s_AFnc.Name_Node + "] name=”[" + sFncName + "]”」中止。 /エラー。親要素に追加しようとしましたが、予想しない親要素でした。");
                }

            }

            //
            //
            // 終わり際に、デバッグ
            //
            //
            if (log_Method.CanDebug(10) && log_Reports.Successful)
            {
                if (null != cur_Ec)//既にエラーが出ている場合。
                {
                    log_Method.WriteDebug_ToConsole("(19) 自要素の属性の数=[" + cur_Ec.Dictionary_Expression_Attribute.Count + "]");

                    log_Method.WriteDebug_ToConsole("(21) ┌────┐自要素。その子要素の数=[" + cur_Ec.List_Expression_Child.Count + "]");

                    cur_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            log_Method.WriteDebug_ToConsole("「S■" + e_Child.Cur_Configuration.Name + "」");
                        });

                    log_Method.WriteDebug_ToConsole( "(22) └────┘");

                    log_Method.WriteDebug_ToConsole( "(23)└────────────────┘ 「S■[" + cur_Cf.Name + "] name=”[" + sName_MyFnc + "]”」(fnc)要素解析終了。");

                    //
                    // name属性の指定は必須です。
                    //
                    string sName8;
                    bool bHit8 = cur_Ec.TrySelectAttribute(out sName8, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
                    if (!bHit8)
                    {
                        // todo:
                        throw new Exception(Info_ConfigurationtreeToExpression.Name_Library + ":" + this.GetType().Name + "#SToE:(24)fnc要素にname属性が指定されていないのはエラーです①。");
                    }
                    else if ("" == sName8)
                    {
                        // todo:
                        //throw new Exception(Info_SToE.LibraryName + ":" + this.GetType().Name + "#SToE:(24)fnc要素に空文字列のname属性が指定されているのはエラーです。");
                        goto gt_Error_NoNameParent2;
                    }
                }
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_CanNotAddParent:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, cur_Cf.Name, log_Reports);//設定ノード名
                tmpl.SetParameter(2, sName_MyFnc, log_Reports);//関数名

                if (null != cur_Ec)
                {
                    tmpl.SetParameter(3, cur_Ec.Dictionary_Expression_Attribute.Count.ToString(), log_Reports);//属性の数

                    //属性リスト
                    StringBuilder s1 = new StringBuilder();
                    cur_Ec.Dictionary_Expression_Attribute.ForEach(
                        delegate(string sName2, Expression_Node_String e_Attr2, ref bool bBreak)
                        {
                            s1.Append("属" + sName2 + "=”" + e_Attr2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "”\n");
                        });
                    tmpl.SetParameter(4, s1.ToString(), log_Reports);

                    tmpl.SetParameter(5, cur_Ec.List_Expression_Child.Count.ToString(), log_Reports);//子要素の数

                    //子要素リスト
                    StringBuilder s2 = new StringBuilder();
                    cur_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            s2.Append("子「S■" + e_Child.Cur_Configuration.Name + "」\n");
                        });
                    tmpl.SetParameter(6, s2.ToString(), log_Reports);

                    tmpl.SetParameter(7, NamesNode.S_ARG, log_Reports);//期待の親設定ノード名
                    tmpl.SetParameter(8, PmNames.S_WHERE.Name_Pm, log_Reports);//期待の親設定関数名
                }
                else
                {
                    tmpl.SetParameter(3, "ヌル", log_Reports);//設定属性の数
                    tmpl.SetParameter(4, "ヌル", log_Reports);//設定属性リスト
                    tmpl.SetParameter(5, "ヌル", log_Reports);//設定子要素の数
                    tmpl.SetParameter(6, "ヌル", log_Reports);//設定子要素リスト
                    tmpl.SetParameter(7, "ヌル", log_Reports);//期待の親設定ノード名
                    tmpl.SetParameter(8, "ヌル", log_Reports);//期待の親設定関数名
                }

                if (null != parent_Ec)
                {
                    tmpl.SetParameter(9, parent_Ec.Cur_Configuration.Name, log_Reports);//実際の親Expression要素ノード名
                    tmpl.SetParameter(10, parent_SName_Fnc, log_Reports);//実際の親Expression要素関数名
                    tmpl.SetParameter(11, parent_Ec.Dictionary_Expression_Attribute.Count.ToString(), log_Reports);//Expression属性の数

                    StringBuilder s3 = new StringBuilder();
                    parent_Ec.Dictionary_Expression_Attribute.ForEach(
                        delegate(string sName2, Expression_Node_String e_Attr2, ref bool bBreak)
                        {
                            s3.Append("属" + sName2 + "=”" + e_Attr2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "”\n");
                        });
                    tmpl.SetParameter(12, s3.ToString(), log_Reports);//子Expression属性リスト

                    tmpl.SetParameter(13, parent_Ec.List_Expression_Child.Count.ToString(), log_Reports);//子Expression要素数

                    StringBuilder s4 = new StringBuilder();
                    parent_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            s4.Append("子「S■" + e_Child.Cur_Configuration.Name + "」\n");
                        });
                    tmpl.SetParameter(14, s4.ToString(), log_Reports);//子Expression要素リスト

                }
                else
                {
                    tmpl.SetParameter(9, "ヌル", log_Reports);//実際の親Expression要素ノード名
                    tmpl.SetParameter(10, "ヌル", log_Reports);//実際の親Expression要素関数名
                    tmpl.SetParameter(11, "ヌル", log_Reports);//Expression属性の数
                    tmpl.SetParameter(12, "ヌル", log_Reports);//子Expression属性リスト
                    tmpl.SetParameter(13, "ヌル", log_Reports);//子Expression要素数
                    tmpl.SetParameter(14, "ヌル", log_Reports);//子Expression要素リスト
                }

                tmpl.SetParameter(15, Log_RecordReportsImpl.ToText_Configuration(parent_Ec.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7021;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_NoNameParent2:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, cur_Cf.Name, log_Reports);//設定ノード名
                tmpl.SetParameter(2, sName_MyFnc, log_Reports);//関数名

                if (null != cur_Ec)
                {
                    tmpl.SetParameter(3, cur_Ec.Dictionary_Expression_Attribute.Count.ToString(), log_Reports);//属性の数

                    //属性リスト
                    StringBuilder s1 = new StringBuilder();
                    cur_Ec.Dictionary_Expression_Attribute.ForEach(
                        delegate(string sName2, Expression_Node_String e_Attr2, ref bool bBreak)
                        {
                            s1.Append("属" + sName2 + "=”" + e_Attr2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "”\n");
                        });
                    tmpl.SetParameter(4, s1.ToString(), log_Reports);

                    tmpl.SetParameter(5, cur_Ec.List_Expression_Child.Count.ToString(), log_Reports);//子要素の数

                    //子要素リスト
                    StringBuilder s2 = new StringBuilder();
                    cur_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            s2.Append("子「S■" + e_Child.Cur_Configuration.Name + "」\n");
                        });
                    tmpl.SetParameter(6, s2.ToString(), log_Reports);

                    tmpl.SetParameter(7, NamesNode.S_ARG, log_Reports);//期待の親設定ノード名
                    tmpl.SetParameter(8, PmNames.S_WHERE.Name_Pm, log_Reports);//期待の親設定関数名
                }
                else
                {
                    tmpl.SetParameter(3, "ヌル", log_Reports);//設定属性の数
                    tmpl.SetParameter(4, "ヌル", log_Reports);//設定属性リスト
                    tmpl.SetParameter(5, "ヌル", log_Reports);//設定子要素の数
                    tmpl.SetParameter(6, "ヌル", log_Reports);//設定子要素リスト
                    tmpl.SetParameter(7, "ヌル", log_Reports);//期待の親設定ノード名
                    tmpl.SetParameter(8, "ヌル", log_Reports);//期待の親設定関数名
                }

                if (null != parent_Ec)
                {
                    tmpl.SetParameter(9, parent_Ec.Cur_Configuration.Name, log_Reports);//実際の親Expression要素ノード名
                    tmpl.SetParameter(10, parent_SName_Fnc, log_Reports);//実際の親Expression要素関数名
                    tmpl.SetParameter(11, parent_Ec.Dictionary_Expression_Attribute.Count.ToString(), log_Reports);//Expression属性の数

                    StringBuilder s3 = new StringBuilder();
                    parent_Ec.Dictionary_Expression_Attribute.ForEach(
                        delegate(string sName2, Expression_Node_String e_Attr2, ref bool bBreak)
                        {
                            s3.Append("属" + sName2 + "=”" + e_Attr2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "”\n");
                        });
                    tmpl.SetParameter(12, s3.ToString(), log_Reports);//子Expression属性リスト

                    tmpl.SetParameter(13, parent_Ec.List_Expression_Child.Count.ToString(), log_Reports);//子Expression要素数

                    StringBuilder s4 = new StringBuilder();
                    parent_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            s4.Append("子「S■" + e_Child.Cur_Configuration.Name + "」\n");
                        });
                    tmpl.SetParameter(14, s4.ToString(), log_Reports);//子Expression要素リスト

                }
                else
                {
                    tmpl.SetParameter(9, "ヌル", log_Reports);//実際の親Expression要素ノード名
                    tmpl.SetParameter(10, "ヌル", log_Reports);//実際の親Expression要素関数名
                    tmpl.SetParameter(11, "ヌル", log_Reports);//Expression属性の数
                    tmpl.SetParameter(12, "ヌル", log_Reports);//子Expression属性リスト
                    tmpl.SetParameter(13, "ヌル", log_Reports);//子Expression要素数
                    tmpl.SetParameter(14, "ヌル", log_Reports);//子Expression要素リスト
                }

                tmpl.SetParameter(15, Log_RecordReportsImpl.ToText_Configuration(parent_Ec.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7022;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_NoNameParent1:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, cur_Cf.Name, log_Reports);//設定ノード名
                tmpl.SetParameter(2, sName_MyFnc, log_Reports);//関数名

                if (null != cur_Ec)
                {
                    tmpl.SetParameter(3, cur_Ec.Dictionary_Expression_Attribute.Count.ToString(), log_Reports);//属性の数

                    //属性リスト
                    StringBuilder s1 = new StringBuilder();
                    cur_Ec.Dictionary_Expression_Attribute.ForEach(
                        delegate(string sName2, Expression_Node_String e_Attr2, ref bool bBreak)
                        {
                            s1.Append("属" + sName2 + "=”" + e_Attr2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "”\n");
                        });
                    tmpl.SetParameter(4, s1.ToString(), log_Reports);

                    tmpl.SetParameter(5, cur_Ec.List_Expression_Child.Count.ToString(), log_Reports);//子要素の数

                    //子要素リスト
                    StringBuilder s2 = new StringBuilder();
                    cur_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            s2.Append("子「S■" + e_Child.Cur_Configuration.Name + "」\n");
                        });
                    tmpl.SetParameter(6, s2.ToString(), log_Reports);

                    tmpl.SetParameter(7, NamesNode.S_ARG, log_Reports);//期待の親設定ノード名
                    tmpl.SetParameter(8, PmNames.S_WHERE.Name_Pm, log_Reports);//期待の親設定関数名
                }
                else
                {
                    tmpl.SetParameter(3, "ヌル", log_Reports);//設定属性の数
                    tmpl.SetParameter(4, "ヌル", log_Reports);//設定属性リスト
                    tmpl.SetParameter(5, "ヌル", log_Reports);//設定子要素の数
                    tmpl.SetParameter(6, "ヌル", log_Reports);//設定子要素リスト
                    tmpl.SetParameter(7, "ヌル", log_Reports);//期待の親設定ノード名
                    tmpl.SetParameter(8, "ヌル", log_Reports);//期待の親設定関数名
                }

                if (null != parent_Ec)
                {
                    tmpl.SetParameter(9, parent_Ec.Cur_Configuration.Name, log_Reports);//実際の親Expression要素ノード名
                    tmpl.SetParameter(10, parent_SName_Fnc, log_Reports);//実際の親Expression要素関数名
                    tmpl.SetParameter(11, parent_Ec.Dictionary_Expression_Attribute.Count.ToString(), log_Reports);//Expression属性の数

                    StringBuilder s3 = new StringBuilder();
                    parent_Ec.Dictionary_Expression_Attribute.ForEach(
                        delegate(string sName2, Expression_Node_String e_Attr2, ref bool bBreak)
                        {
                            s3.Append("属" + sName2 + "=”" + e_Attr2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "”\n");
                        });
                    tmpl.SetParameter(12, s3.ToString(), log_Reports);//子Expression属性リスト

                    tmpl.SetParameter(13, parent_Ec.List_Expression_Child.Count.ToString(), log_Reports);//子Expression要素数

                    StringBuilder s4 = new StringBuilder();
                    parent_Ec.List_Expression_Child.ForEach(
                        delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                        {
                            s4.Append("子「S■" + e_Child.Cur_Configuration.Name + "」\n");
                        });
                    tmpl.SetParameter(14, s4.ToString(), log_Reports);//子Expression要素リスト

                }
                else
                {
                    tmpl.SetParameter(9, "ヌル", log_Reports);//実際の親Expression要素ノード名
                    tmpl.SetParameter(10, "ヌル", log_Reports);//実際の親Expression要素関数名
                    tmpl.SetParameter(11, "ヌル", log_Reports);//Expression属性の数
                    tmpl.SetParameter(12, "ヌル", log_Reports);//子Expression属性リスト
                    tmpl.SetParameter(13, "ヌル", log_Reports);//子Expression要素数
                    tmpl.SetParameter(14, "ヌル", log_Reports);//子Expression要素リスト
                }

                tmpl.SetParameter(15, Log_RecordReportsImpl.ToText_Configuration(parent_Ec.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7023;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_NullParent:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7004;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
        private void ParseChild_SpecialTextTemplate_(
            Configurationtree_Node cur_Cf,
            Expression_Node_String owner_Ec,
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseChild_Special_",log_Reports);

            //
            //
            //
            //

            //
            // データ_ソース、データ_ターゲット、<fnc >の子要素。

            string sName_OwnerNode = owner_Ec.Cur_Configuration.Name;
            string sName_OwnerFnc = "";
            {
                EnumHitcount enumHitcount;
                if (NamesNode.S_FNC == sName_OwnerNode
                    //||
                    //NamesNode.S_F_TEXT_TEMPLATE2 == sOwnerNodeName
                    )
                {
                    enumHitcount = EnumHitcount.One;
                }
                else
                {
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }
                bool bHit = owner_Ec.TrySelectAttribute(out sName_OwnerFnc, PmNames.S_NAME.Name_Pm, enumHitcount, log_Reports);
            }

            //
            //
            //
            // 子
            //
            //
            //
            string err_SAtFncName;
            Configurationtree_Node err_Cf_AtElm;
            Exception err_E;

            cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node cf_Child, ref bool bBreak)
            {

                if (log_Reports.Successful)
                {
                    if (null == cf_Child)
                    {
                        bBreak = true;
                        goto gt_errorNullValue;
                    }
                    else
                    {
                        string sName_AtNode = cf_Child.Name;
                        string sName_AtFnc = "";
                        {
                            bool bRequired;

                            if (
                                NamesNode.S_FNC == sName_AtNode ||
                                NamesNode.S_ARG == sName_AtNode
                                )
                            {
                                // 「S■fnc」
                                // 「S■arg」
                                bRequired = true;
                            }
                            else
                            {
                                bRequired = false;
                            }

                            cf_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_AtFnc, bRequired, log_Reports);
                        }

                        if (NamesNode.S_ARG == sName_AtNode)
                        {
                            // 「S■arg」

                            int nP1p;
                            bool bP1pNameSuccessful = Utility_TexttemplateP1p.TryParseName(sName_AtFnc, out nP1p);

                            if (bP1pNameSuccessful)
                            {
                                //
                                // 例: <attribute name=”p1p”>
                                ConfigurationtreeToExpression_F16_P1pImpl_ to = new ConfigurationtreeToExpression_F16_P1pImpl_();

                                // Sf:case;文はここには来ない。

                                to.NP1p = nP1p;
                                to.Translate(
                                    cf_Child,
                                    owner_Ec,
                                    memoryApplication,
                                    pg_ParsingLog,
                                    log_Reports
                                    );
                            }
                            else if (
                                NamesFnc.S_TEXT_TEMPLATE == sName_OwnerFnc &&
                                //NamesNode.S_F_TEXT_TEMPLATE2 == sOwnerNodeName &&
                                PmNames.S_TABLE.Name_Pm == sName_AtFnc
                                )
                            {
                                // 【追加 2012-06-05】
                                // <fnc name=”Sf:text-template;”>
                                //      <arg name=”table” value=”~”>

                                // 旧仕様?
                                // 「S■f-text-template name=””」
                                //     「S■table name=””」

                                if (log_Method.CanDebug(2))
                                {
                                    log_Method.WriteDebug_ToConsole("テキストテンプレートのテーブル属性。親要素「S■[" + sName_OwnerNode + "] name=”[" + sName_OwnerFnc + "]”」 自要素「[" + sName_AtNode + "] name=”[" + sName_AtFnc + "]”」 子要素数=[" + cf_Child.List_Child.Count + "] string属性数=[" + cf_Child.Dictionary_Attribute.Count + "] S_Elm属性数=[" + cf_Child.Dictionary_Attribute.Count + "]");
                                }

                                //
                                //
                                // 自
                                //
                                //
                                string sValue;
                                cf_Child.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, log_Reports);

                                Expression_Node_String ec_Tbl = new Expression_Node_StringImpl(owner_Ec, cf_Child);
                                ec_Tbl.AppendTextNode(
                                    sValue,
                                    cf_Child,
                                    log_Reports
                                    );

                                owner_Ec.SetAttribute(
                                    PmNames.S_TABLE.Name_Pm,
                                    ec_Tbl,
                                    log_Reports
                                    );

                                // 無視します。
                                goto gt_nextAttr;
                            }
                            else if (this.Dic_B.ContainsKey(sName_AtFnc))
                            {
                                // キー有り。
                                ConfigurationtreeToExpression_F14n16 to = this.Dic_B[sName_AtFnc];
                                to.Translate(
                                    cf_Child,
                                    owner_Ec,
                                    memoryApplication,
                                    pg_ParsingLog,
                                    log_Reports
                                    );
                            }
                            else
                            {
                                // キー無し。
                                err_Cf_AtElm = cf_Child;
                                err_SAtFncName = sName_AtFnc;
                                err_E = null;
                                goto gt_Error_KeyNotFound_Arg3;
                            }

                        }
                        else
                        {

                            ConfigurationtreeToExpression_F14n16 to;
                            if (this.Dic_B.ContainsKey(sName_AtNode))//todo:ノード名と比べるのはおかしい?
                            {
                                // キー有り。
                                to = this.Dic_B[sName_AtNode];
                            }
                            else
                            {
                                // キー無し。
                                err_Cf_AtElm = cf_Child;
                                err_E = null;
                                goto gt_Error_KeyNotFound1;
                            }

                            to.Translate(
                                cf_Child,
                                owner_Ec,
                                memoryApplication,
                                pg_ParsingLog,
                                log_Reports
                                );
                        }
                        // <a-case>要素は、次のループで。

                    }

                }

                goto gt_nextAttr;
            //
            //
            //
            //

            gt_errorNullValue:
                {
                    Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                    tmpl.SetParameter(1, cur_Cf.Name, log_Reports);//設定ノード名
                    tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(cf_Child), log_Reports);//設定位置パンくずリスト

                    memoryApplication.CreateErrorReport("Er:7007;", tmpl, log_Reports);
                }
                goto gt_nextAttr;

            gt_Error_KeyNotFound_Arg3:
                {
                    Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                    tmpl.SetParameter(1, err_Cf_AtElm.Name, log_Reports);//設定ノード名
                    tmpl.SetParameter(2, err_SAtFncName, log_Reports);//関数名
                    tmpl.SetParameter(3, err_Cf_AtElm.GetType().Name, log_Reports);//関数のクラス名
                    tmpl.SetParameter(4, sName_OwnerNode, log_Reports);//親設定ノード名
                    tmpl.SetParameter(5, sName_OwnerFnc, log_Reports);//親設定関数名
                    tmpl.SetParameter(6, Log_RecordReportsImpl.ToText_Configuration(err_Cf_AtElm), log_Reports);//設定位置パンくずリスト
                    tmpl.SetParameter(7, Log_RecordReportsImpl.ToText_Exception(err_E), log_Reports);//例外メッセージ

                    memoryApplication.CreateErrorReport("Er:7008;", tmpl, log_Reports);
                }
                goto gt_nextAttr;

            gt_Error_KeyNotFound1:
                {
                    Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                    tmpl.SetParameter(1, err_Cf_AtElm.Name, log_Reports);//設定ノード名
                    tmpl.SetParameter(2, err_Cf_AtElm.GetType().Name, log_Reports);//設定ノードのクラス名
                    tmpl.SetParameter(3, sName_OwnerNode, log_Reports);//親設定ノード名
                    tmpl.SetParameter(4, sName_OwnerFnc, log_Reports);//親設定関数名
                    tmpl.SetParameter(5, Log_RecordReportsImpl.ToText_Configuration(err_Cf_AtElm), log_Reports);//設定位置パンくずリスト
                    tmpl.SetParameter(6, Log_RecordReportsImpl.ToText_Exception(err_E), log_Reports);//例外メッセージ

                    memoryApplication.CreateErrorReport("Er:7009;", tmpl, log_Reports);
                }
                goto gt_nextAttr;

            gt_nextAttr:
                ;
            });

            goto gt_EndMethod;

            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 13
0
        //────────────────────────────────────────

        /// <summary>
        ///
        /// </summary>
        /// <param name="s_cur"></param>
        /// <param name="e_parent"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,      //Sf:case;
            Expression_Node_String parent_Expr, //Sf:switch;
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            //throw new Exception(Info_SToE.LibraryName + ":" + this.GetType().Name + "#SToE: このメソッドは廃止方針です。");

            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(8)" + cur_Cf.Name);
            }

            //
            //
            //
            //

            string parent_SName_Fnc;

            parent_Expr.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);


            if (NamesFnc.S_SWITCH != parent_SName_Fnc)
            {
                goto gt_Error_Parent;
            }



            //
            // 親
            //
            Expression_SfswitchImpl parent_Expression_Fswitch = (Expression_SfswitchImpl)parent_Expr;

            //
            // 自
            //
            Expression_SfcaseImpl cur_Ec = (Expression_SfcaseImpl)Expression_SfcaseImpl.Create(parent_Expression_Fswitch, cur_Cf);

            //
            // 属性
            //
            {
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    true,  //name属性は必須。
                    false, //value属性は無い。
                    log_Reports
                    );
            }



            //
            //
            //
            // 子
            //
            //
            //
            Configurationtree_Node err_Child_Cf;

            {
                //
                // <fnc name=”Sf:case;”>
                //   <arg1 name=”caseValue” value=”★”>要素の value値を、nFallTrue に セット。
                //

                cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node child_Cf_Arg1, ref bool bBreak)
                {
                    if (
                        // <arg >
                        NamesNode.S_ARG == child_Cf_Arg1.Name
                        )
                    {
                        string sName_Child_Fnc;
                        child_Cf_Arg1.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Child_Fnc, true, log_Reports);

                        if (log_Method.CanDebug(1))
                        {
                            log_Method.WriteDebug_ToConsole(" ・" + child_Cf_Arg1.Name + " name=”[" + sName_Child_Fnc + "]”");
                        }

                        if (
                            //s_ChildArg1.Dictionary_Attribute.ContainsKey(PmNames.NAME.SAttrName) &&
                            // name=”caseValue”
                            PmNames.S_VALUE_CASE.Name_Pm == sName_Child_Fnc
                            )
                        {
                            //
                            // caseValueは、直接 value=""属性で指定されたものだけが有効です。子要素は指定できません。
                            //
                            if (child_Cf_Arg1.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE.Name_Pm))
                            {
                                log_Reports.Log_Callstack.Push(log_Method, "SToE②s_Cur→e_Cur");
                                this.ParseChild_InConfigurationtreeToExpression(
                                    cur_Cf, //Sf:case;
                                    cur_Ec, // e_Cur, e_Parent, //Sf:case;
                                    memoryApplication,
                                    pg_ParsingLog,
                                    log_Reports
                                    );
                                log_Reports.Log_Callstack.Pop(log_Method, "SToE②s_Cur→e_Cur");


                                //
                                // 最初のcaseValueのみ有効。
                                //
                                bBreak = true;
                            }
                            else
                            {
                                // エラー
                                err_Child_Cf = child_Cf_Arg1;
                                bBreak       = true;
                                goto gt_Error_NotConstCaseValue;
                            }
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        if (log_Method.CanDebug(1))
                        {
                            log_Method.WriteDebug_ToConsole(" ・" + child_Cf_Arg1.Name);
                        }
                    }

                    goto gt_End2;
                    //
                    //
                    gt_Error_NotConstCaseValue:
                    {
                        Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                        tmpl.SetParameter(1, PmNames.S_VALUE_CASE.Name_Pm, log_Reports);                             //ケース名
                        tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(err_Child_Cf), log_Reports); //設定位置パンくずリスト

                        memoryApplication.CreateErrorReport("Er:7017;", tmpl, log_Reports);
                    }
                    goto gt_End2;
                    //
                    gt_End2:
                    ;
                });
            }


            //
            //
            //
            // 親
            //
            //
            //
            parent_Expression_Fswitch.List_Expression_Sfcase.Add(cur_Ec);


            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole(" ┌────┐ 子要素数=[" + cur_Cf.List_Child.Count + "]");
                cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node s_Child, ref bool bBreak)
                {
                    if (NamesNode.S_ARG == s_Child.Name)
                    {
                        string sName;
                        s_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName, true, log_Reports);
                        log_Method.WriteDebug_ToConsole(" ・" + s_Child.Name + " name=”[" + sName + "]”");
                    }
                    else
                    {
                        log_Method.WriteDebug_ToConsole(" ・" + s_Child.Name);
                    }
                });
                log_Method.WriteDebug_ToConsole(" └────┘");


                log_Method.WriteDebug_ToConsole(" ┌────┐ string属性数=[" + cur_Cf.Dictionary_Attribute.Count + "]");
                cur_Cf.Dictionary_Attribute.ForEach(delegate(string sKey, string sValue, ref bool bBreak)
                {
                    log_Method.WriteDebug_ToConsole(" s属 [" + sKey + "]=[" + sValue + "]");
                });
                log_Method.WriteDebug_ToConsole(" └────┘");
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_Parent:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, parent_Expr.Cur_Configuration.Name, log_Reports);                 //親設定ノード名
                tmpl.SetParameter(2, parent_SName_Fnc, log_Reports);                                   //親設定ノード関数名
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports); //設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7018;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 14
0
        //────────────────────────────────────────

        public override void Translate(
            Configurationtree_Node cur_Cf,    //<lookup-id>
            Expression_Node_String parent_Ec, //< Sf:text-template;>
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(9)" + cur_Cf.Name);
            }

            //
            //

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);


            //
            //
            //
            // 親へ連結 (value属性)
            //
            //
            //
            {
                //
                // 自要素の value="" 属性を、親へ連結
                //
                PmName pmName = PmNames.S_VALUE;

                string sValue;
                bool   bHit = cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sValue, false, log_Reports);
                if (bHit)
                {
                    cur_Ec.AppendTextNode(
                        sValue,
                        cur_Cf,
                        log_Reports
                        );

                    //
                    //
                    //
                    // 子
                    //
                    //
                    //
                    this.ParseChild_InConfigurationtreeToExpression(
                        cur_Cf,
                        cur_Ec,//自
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                    //
                    //
                    //
                    // 親へ連結 ※属性連結
                    //
                    //
                    //
                    parent_Ec.SetAttribute(PmNames.S_LOOKUP_ID.Name_Pm, cur_Ec, log_Reports);

                    goto gt_EndMethod;
                }
                else
                {
                }
            }


            //
            //
            //
            // 子
            //
            //
            //
            {
                //<a-default>の子要素を確認し、親<f-switch>のdefault属性に追加します。

                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }


            //
            //
            //
            // 親へ連結
            //
            //
            //
            parent_Ec.SetAttribute(PmNames.S_LOOKUP_ID.Name_Pm, cur_Ec, log_Reports);


            //
            //
            //
            // 親へ連結 debug
            //
            //
            //
            if (log_Method.CanDebug(1))
            {
                string parent_SName_Fnc;
                parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.WriteDebug_ToConsole(" ☆☆☆☆☆☆☆☆ 親<[" + parent_Ec.Cur_Configuration.Name + "] name=”[" + parent_SName_Fnc + "]” >");

                string sName_MyFnc;
                cur_Ec.TrySelectAttribute(out sName_MyFnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.WriteDebug_ToConsole(" ☆☆☆☆☆☆☆☆ 自<[" + cur_Ec.Cur_Configuration.Name + "] name=”[" + sName_MyFnc + "]” >");
            }


            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 15
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        public override string Execute5_Main(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main", log_Reports);

            string sFncName0;

            this.TrySelectAttribute(out sFncName0, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = "Nアクション[" + sFncName0 + "]実行";
                log_Method.Log_Stopwatch.Begin();
            }

            //
            //

            Expression_Node_String err_Ec_FcName1;

            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                if (this.Functionparameterset.Sender is Customcontrol)
                {
                    Customcontrol fcCc = (Customcontrol)this.Functionparameterset.Sender;

                    string sName_Usercontrol = fcCc.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(
                        EnumHitcount.Unconstraint,
                        log_Reports
                        );

                    log_Reports.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールが、[" + sFncName0 + "]アクションを実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe = "[" + sFncName0 + "]アクションを実行。";
                }

                //
                //
                //
                //

                //
                // このNAction29を含んでいるcontrol要素から
                // コントロールの名前を取得。
                Expression_Node_String ec_FcName1;

                //
                // このNAction29要素を含んでいる control要素から、コントロールの名前を取得。
                List <Usercontrol> list_FcUc;
                if (log_Reports.Successful)
                {
                    // 正常時

                    Configuration_Node cf_Event = this.Cur_Configuration.GetParentByNodename(
                        NamesNode.S_EVENT, EnumConfiguration.Unknown, false, log_Reports);

                    if (null != cf_Event)
                    {
                        Configuration_Node owner_Configurationtree_Control = cf_Event.GetParentByNodename(
                            NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);

                        if (null != owner_Configurationtree_Control)
                        {
                            string sName_Usercontrol;
                            ((Configurationtree_Node)owner_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Usercontrol, true, log_Reports);


                            Expression_Node_StringImpl ec_Str = new Expression_Node_StringImpl(this, this.Cur_Configuration);
                            ec_Str.AppendTextNode(
                                sName_Usercontrol,
                                this.Cur_Configuration,
                                log_Reports
                                );

                            ec_FcName1 = ec_Str;
                        }
                        else
                        {
                            ec_FcName1 = null;
                        }
                    }
                    else
                    {
                        ec_FcName1 = null;
                    }

                    //
                    // 指定のコントロール
                    //
                    list_FcUc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                        ec_FcName1,
                        true,
                        log_Reports
                        );
                }
                else
                {
                    //
                    // エラー。
                    ec_FcName1     = null;
                    list_FcUc      = null;
                    err_Ec_FcName1 = ec_FcName1;
                    goto gt_Error_NullFcUc;
                }
                // ここで、fcUc は必ずある。
                Usercontrol fct = list_FcUc[0];

                //
                //
                //
                // View
                //
                //
                //

                // 最初の1個のみ有効。必ずあるとする。
                List <Expression_Node_String> ecList_View = fct.ControlCommon.Expression_Control.SelectDirectchildByNodename(NamesNode.S_VIEW, false, EnumHitcount.One, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }
                Expression_Node_StringImpl ec_View = (Expression_Node_StringImpl)ecList_View[0];

                //
                // O → N は、Fcnfをロードした時点で実行済み。
                if (ec_View.List_Expression_Child.Count < 1)
                {
                    //
                    // エラー。
                    //
                    // このアクションを使うからには、
                    // 必ず<view>の中に子要素がないといけない。
                    err_Ec_FcName1 = ec_FcName1;
                    goto gt_Error_EmptyView;
                }


                object errorRule = null;
                Expression_Node_String err_Ec_DataTarget = null;
                if (log_Reports.Successful)
                {
                    // 正常時

                    ec_View.List_Expression_Child.ForEach(delegate(Expression_Node_String ec_Child, ref bool bRemove, ref bool bBreak)
                    {
                        string sFncName;
                        ec_Child.TrySelectAttribute(out sFncName, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

                        if (
                            NamesNode.S_FNC == ec_Child.Cur_Configuration.Name &&
                            NamesFnc.S_LISTBOX_LABELS == sFncName
                            )
                        {
                            // <f-list-box-labels>


                            //
                            // fcUc は、必ずリストボックス。
                            if (!(fct is UsercontrolListbox))
                            {
                                //
                                // エラー。
                                goto gt_Error_NotListbox;
                            }

                            UsercontrolListbox uctLst = (UsercontrolListbox)fct;

                            //
                            // リストボックスの表示を自作します。項目の高さが固定の場合。
                            uctLst.DrawMode = DrawMode.OwnerDrawFixed;



                            //
                            // N → Uc

                            //
                            // 描画プログラムの作成。
                            ListboxItemDrawer_02Impl drawer = new ListboxItemDrawer_02Impl(
                                this.Owner_MemoryApplication);

                            //
                            // item-valur-to-variable="" 属性
                            //
                            //if (null == nF11.E_ItemValueToVariable)
                            {
                                // <データ access="to">から取りたい。
                                Expression_Node_String ec_ItemValueToVariable = null;//ソース情報利用


                                List <Expression_Node_String> ecList_DataTarget;
                                {
                                    List <Expression_Node_String> ecList_Data = uctLst.ControlCommon.Expression_Control.SelectDirectchildByNodename(NamesNode.S_DATA, false, EnumHitcount.Unconstraint, log_Reports);
                                    ecList_DataTarget = Utility_Expression_NodeImpl.SelectItemsByPmAsCsv(ecList_Data, PmNames.S_ACCESS.Name_Pm, ValuesAttr.S_TO, false, EnumHitcount.First_Exist, log_Reports);
                                }

                                if (!log_Reports.Successful)
                                {
                                    goto gt_EndMethod2;
                                }
                                Expression_Node_String ec_DataTarget = ecList_DataTarget[0];
                                err_Ec_DataTarget = ec_DataTarget;


                                if (null != ec_DataTarget)
                                {
                                    bool bHit = ec_DataTarget.TrySelectAttribute(
                                        out ec_ItemValueToVariable, PmNames.S_NAME_VAR.Name_Pm, EnumHitcount.One, log_Reports);
                                    if (bHit)
                                    {
                                        drawer.Expression_ValueVariableName = ec_ItemValueToVariable;
                                    }
                                    else
                                    {
                                        // エラー。
                                        goto gt_Error_NullItemValueToVariable;
                                    }
                                }
                                else
                                {
                                    // エラー。
                                    goto gt_Error_NotFoundDataTarget;
                                }
                            }
                            //else
                            //{
                            //    //
                            //    // 変数名設定。
                            //    drawer.Ec_ValueVariableName = nF11.E_ItemValueToVariable;
                            //}

                            //
                            // <fnc name=”Sf:item-label;”>
                            List <Expression_Node_String> ecList_Fnc = ec_Child.SelectDirectchildByNodename(NamesNode.S_FNC, false, EnumHitcount.Unconstraint, log_Reports);
                            ecList_Fnc = Utility_Expression_NodeImpl.SelectItemsByPmAsCsv(ecList_Fnc, PmNames.S_NAME.Name_Pm, NamesFnc.S_ITEM_LABEL2, false, EnumHitcount.First_Exist, log_Reports);
                            if (!log_Reports.Successful)
                            {
                                // エラー。
                                goto gt_EndMethod2;
                            }

                            drawer.Expression_ItemLabel = ecList_Fnc[0];

                            if (log_Reports.Successful)
                            {
                                //
                                // 描画プログラムの変更。
                                uctLst.ListboxItemDrawer = drawer;
                            }
                        }
                        else
                        {
                            errorRule = ec_Child;

                            //
                            // エラー。未定義の<view>。
                            goto gt_Error_UndefinedView;
                        }

                        goto gt_EndMethod2;

                        //
                        //
                        //
                        //

                        //
                        // エラー。
                        gt_Error_NotListbox:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports); //コントロール名
                            tmpl.SetParameter(2, fct.GetType().Name, log_Reports);                                                             //コントロールのクラス名

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110019;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        //
                        // エラー。
                        gt_Error_NotFoundDataTarget:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//コントロール名

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110020;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        //
                        // エラー。
                        gt_Error_NullItemValueToVariable:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, PmNames.S_NAME_VAR.Name_Pm, log_Reports);                                                     //引数名NameVar
                            tmpl.SetParameter(2, ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports); //コントロール名

                            //
                            // 「access="to"」要素を取得しているような。
                            //
                            Log_TextIndented s1 = new Log_TextIndentedImpl();
                            err_Ec_DataTarget.ToText_Snapshot(s1);
                            tmpl.SetParameter(3, s1.ToString(), log_Reports);//データターゲットの変数の中身

                            Log_TextIndented s2 = new Log_TextIndentedImpl();
                            err_Ec_DataTarget.Cur_Configuration.ToText_Content(s2);
                            tmpl.SetParameter(4, s2.ToString(), log_Reports);//データターゲットの設定の中身

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110021;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        //
                        // エラー。
                        gt_Error_UndefinedView:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, errorRule.GetType().Name, log_Reports);        //要素のクラス名
                            tmpl.SetParameter(2, ec_Child.Cur_Configuration.Name, log_Reports); //設定の子要素のノード名
                            tmpl.SetParameter(3, sFncName, log_Reports);                        //設定の子要素の関数名

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110022;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        gt_EndMethod2:
                        ;
                    });



                    //
                    // 「表示プログラム」を作成、
                    // リストボックスにその「リスト作成プログラム」を渡す。
                    // リストボックスは再表示されるたびに、
                    // その「リスト作成プログラム」を実行。

                    // 以下、その「表示プログラム」の内容。

                    //
                    // ループカウンタの回数だけ、リストに項目を追加。

                    //
                    // その内容は、値が<a-item-value>から取得。

                    //
                    // その内容は、表示ラベルが<a-item-label>から取得。

                    //
                    // その表示ラベルは、次の条件に一致した時、グレー色にする。
                    //
                    // <a-item-gray-out>
                    // <f-all-true>
                    // <a-empty-field>
                }
                goto gt_EndMethod;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NullFcUc:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//コントロール名

                this.Owner_MemoryApplication.CreateErrorReport("Er:110023;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_EmptyView:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//検索ヒット数

                this.Owner_MemoryApplication.CreateErrorReport("Er:110024;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return("");
        }
        //────────────────────────────────────────
        public void ParseChild_InConfigurationtreeToExpression(
            Configurationtree_Node cur_Conf,//S_NodeList s_curNodeList,
            Expression_Node_String parent_Expr,//nAcase,nFelemの両方の場合がある。
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseChild_InSToE",log_Reports);
            //
            //

            if (null == parent_Expr)
            {
                goto gt_Error_NullNFAelem;
            }

            //
            // 親ノード名、親ファンク名
            //
            string parent_SName_Node = parent_Expr.Cur_Configuration.Name;
            string parent_SName_Fnc = "";
            {
                EnumHitcount enumHitcount;
                if (NamesNode.S_FNC == parent_SName_Node)
                {
                    //todo: enumHitcount = EnumHitcount.One;
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }
                else
                {
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }

                log_Reports.Log_Callstack.Push(log_Method, "①");
                bool bHit = parent_Expr.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, enumHitcount, log_Reports);
                log_Reports.Log_Callstack.Pop(log_Method, "①");
            }

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole( "開始┌──┐ s_Curノード名=[" + cur_Conf.Name + "] 子要素数=[" + cur_Conf.List_Child.Count + "]");
            }

            //
            //
            //
            // 子
            //
            //
            //
            Configurationtree_Node err_Configurationtree_Node2 = null;
            cur_Conf.List_Child.ForEach(delegate(Configurationtree_Node s_Child, ref bool bBreak)
            {

                if (!log_Reports.Successful)
                {
                    // 強制終了。
                    bBreak = true;
                    return;
                }

                string sName_MyNode = s_Child.Name;
                string sName_MyFnc = "";
                {
                    bool bRequired;

                    if (NamesNode.S_ARG == sName_MyNode)
                    {
                        bRequired = true;
                    }
                    else
                    {
                        bRequired = false;
                    }

                    log_Reports.Log_Callstack.Push(log_Method, "②");
                    s_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, bRequired, log_Reports);
                    log_Reports.Log_Callstack.Pop(log_Method, "②");
                }

                if (this.Dictionary_ConfigurationtreeToExpression.ContainsKey(sName_MyNode))
                {
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole( "親「S■[" + parent_SName_Fnc + "] name=”[" + parent_SName_Fnc + "]”」 自「S■[" + sName_MyNode + "] name=”[" + sName_MyFnc + "]”」");
                    }

                    this.Dictionary_ConfigurationtreeToExpression[sName_MyNode].Translate(
                        s_Child,
                        parent_Expr,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                }
                else
                {
                    //
                    // それ以外、エラー。
                    //
                    err_Configurationtree_Node2 = s_Child;
                    bBreak = true;
                }
            });
            //
            if (null != err_Configurationtree_Node2)
            {
                goto gt_Error_UndefinedElement;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_NullNFAelem:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Expr.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7010;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_UndefinedElement:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Configurationtree_Node2.Name, log_Reports);//設定ノード名
                tmpl.SetParameter(2, err_Configurationtree_Node2.GetType().Name, log_Reports);//設定ノードのクラス名
                tmpl.SetParameter(3, this.Dictionary_ConfigurationtreeToExpression.Count.ToString(), log_Reports);//キーの個数

                StringBuilder s1 = new StringBuilder();
                foreach (string sKey in this.Dictionary_ConfigurationtreeToExpression.Keys)
                {
                    s1.Append(sKey);
                    s1.Append(System.Environment.NewLine);
                }
                tmpl.SetParameter(4, s1.ToString(), log_Reports);//キーのリスト

                //設定親ノード名
                if (null != parent_Expr)
                {
                    tmpl.SetParameter(5, parent_Expr.Cur_Configuration.Name, log_Reports);
                }
                else
                {
                    tmpl.SetParameter(5, "ヌル", log_Reports);
                }

                tmpl.SetParameter(6, Log_RecordReportsImpl.ToText_Configuration(err_Configurationtree_Node2), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7011;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                //d_ParsingLog.Decrement(s_Cur.Name_Node);
            }
            log_Method.EndMethod(log_Reports);

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole( "終了└──┘");
            }
        }
Ejemplo n.º 17
0
        //────────────────────────────────────────
        /// <summary>
        /// 選択されているセルに、指定の値を上書きします。
        /// </summary>
        /// <param nFcName="outputValueStr"></param>
        /// <param nFcName="row"></param>
        /// <param nFcName="selFldDefinition">選択フィールド</param>
        /// <param nFcName="log_Reports"></param>
        public void ToMemory_ToSelectedField(
            string sValue_Output,
            Expression_Node_String ec_Fcell,
            DataRow row,
            Fielddefinition selFldDefinition,//選択したフィールド定義
            Log_Reports log_Reports
            )
        {
            //essageBox.Show("アップデートデータ【開始】 outputValueStr=[" + outputValueStr + "]\n", "(FormsImpl)" + this.GetType().NFcName );

            //.WriteLine(this.GetType().NFcName + "#: 【開始】データのアップデートを始める。");

            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM_ToSelectedField",log_Reports);
            //
            //

            string sName_SelectedFld;
            {
                bool bHit = ec_Fcell.TrySelectAttribute(
                    out sName_SelectedFld,
                    PmNames.S_SELECT.Name_Pm,
                    EnumHitcount.One,
                    log_Reports
                    );
            }

            string sConfigStack_StringOfCell = sName_SelectedFld;

            switch (selFldDefinition.Type_Field)
            {
                case EnumTypeFielddefinition.String:
                    {
                        // 空欄も自動処理
                        String_HumaninputImpl cellData = new String_HumaninputImpl(sConfigStack_StringOfCell);
                        cellData.Text = sValue_Output;

                        row[sName_SelectedFld] = cellData;
                    }
                    break;
                case EnumTypeFielddefinition.Int:
                    {
                        // 空欄も自動処理
                        Int_HumaninputImpl cellData = new Int_HumaninputImpl(sConfigStack_StringOfCell);
                        cellData.Text = sValue_Output;
                        row[sName_SelectedFld] = cellData;
                    }
                    break;
                case EnumTypeFielddefinition.Bool:
                    {
                        // 空欄も自動処理
                        Bool_HumaninputImpl cellData = new Bool_HumaninputImpl(sConfigStack_StringOfCell);
                        cellData.Text = sValue_Output;
                        row[sName_SelectedFld] = cellData;
                    }
                    break;
                default:
                    {
                        if (log_Reports.CanCreateReport)
                        {
                            Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                            r.SetTitle("▲エラー398!", pg_Method);

                            StringBuilder t = new StringBuilder();

                            t.Append("予期しない、フィールドの型です。");
                            t.Append(Environment.NewLine);
                            t.Append("selFldDefinition.Type=[");
                            t.Append(selFldDefinition.ToString_Type());
                            t.Append("]");
                            t.Append(Environment.NewLine);
                            t.Append(Environment.NewLine);

                            // ヒント
                            t.Append(r.Message_Configuration(
                                ec_Fcell.Cur_Configuration));

                            r.Message = t.ToString();
                            log_Reports.EndCreateReport();
                        }
                    }
                    break;
            }

            //
            pg_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 18
0
        //────────────────────────────────────────

        public void ParseChild_InConfigurationtreeToExpression(
            Configurationtree_Node cur_Conf,    //S_NodeList s_curNodeList,
            Expression_Node_String parent_Expr, //nAcase,nFelemの両方の場合がある。
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseChild_InSToE", log_Reports);
            //
            //

            if (null == parent_Expr)
            {
                goto gt_Error_NullNFAelem;
            }


            //
            // 親ノード名、親ファンク名
            //
            string parent_SName_Node = parent_Expr.Cur_Configuration.Name;
            string parent_SName_Fnc  = "";

            {
                EnumHitcount enumHitcount;
                if (NamesNode.S_FNC == parent_SName_Node)
                {
                    //todo: enumHitcount = EnumHitcount.One;
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }
                else
                {
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }



                log_Reports.Log_Callstack.Push(log_Method, "①");
                bool bHit = parent_Expr.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, enumHitcount, log_Reports);
                log_Reports.Log_Callstack.Pop(log_Method, "①");
            }

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("開始┌──┐ s_Curノード名=[" + cur_Conf.Name + "] 子要素数=[" + cur_Conf.List_Child.Count + "]");
            }



            //
            //
            //
            // 子
            //
            //
            //
            Configurationtree_Node err_Configurationtree_Node2 = null;

            cur_Conf.List_Child.ForEach(delegate(Configurationtree_Node s_Child, ref bool bBreak)
            {
                if (!log_Reports.Successful)
                {
                    // 強制終了。
                    bBreak = true;
                    return;
                }


                string sName_MyNode = s_Child.Name;
                string sName_MyFnc  = "";
                {
                    bool bRequired;

                    if (NamesNode.S_ARG == sName_MyNode)
                    {
                        bRequired = true;
                    }
                    else
                    {
                        bRequired = false;
                    }

                    log_Reports.Log_Callstack.Push(log_Method, "②");
                    s_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, bRequired, log_Reports);
                    log_Reports.Log_Callstack.Pop(log_Method, "②");
                }



                if (this.Dictionary_ConfigurationtreeToExpression.ContainsKey(sName_MyNode))
                {
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("親「S■[" + parent_SName_Fnc + "] name=”[" + parent_SName_Fnc + "]”」 自「S■[" + sName_MyNode + "] name=”[" + sName_MyFnc + "]”」");
                    }


                    this.Dictionary_ConfigurationtreeToExpression[sName_MyNode].Translate(
                        s_Child,
                        parent_Expr,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else
                {
                    //
                    // それ以外、エラー。
                    //
                    err_Configurationtree_Node2 = s_Child;
                    bBreak = true;
                }
            });
            //
            if (null != err_Configurationtree_Node2)
            {
                goto gt_Error_UndefinedElement;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NullNFAelem:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Expr.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7010;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_UndefinedElement:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Configurationtree_Node2.Name, log_Reports);                               //設定ノード名
                tmpl.SetParameter(2, err_Configurationtree_Node2.GetType().Name, log_Reports);                     //設定ノードのクラス名
                tmpl.SetParameter(3, this.Dictionary_ConfigurationtreeToExpression.Count.ToString(), log_Reports); //キーの個数

                StringBuilder s1 = new StringBuilder();
                foreach (string sKey in this.Dictionary_ConfigurationtreeToExpression.Keys)
                {
                    s1.Append(sKey);
                    s1.Append(System.Environment.NewLine);
                }
                tmpl.SetParameter(4, s1.ToString(), log_Reports);//キーのリスト

                //設定親ノード名
                if (null != parent_Expr)
                {
                    tmpl.SetParameter(5, parent_Expr.Cur_Configuration.Name, log_Reports);
                }
                else
                {
                    tmpl.SetParameter(5, "ヌル", log_Reports);
                }

                tmpl.SetParameter(6, Log_RecordReportsImpl.ToText_Configuration(err_Configurationtree_Node2), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7011;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                //d_ParsingLog.Decrement(s_Cur.Name_Node);
            }
            log_Method.EndMethod(log_Reports);

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("終了└──┘");
            }
        }
Ejemplo n.º 19
0
        //────────────────────────────────────────
        /// <summary>
        /// <f-cell>→M
        /// </summary>
        /// <param name="outputValueStr"></param>
        /// <param name="nKeyExpected"></param>
        /// <param name="nFcell"></param>
        /// <param name="moApplication"></param>
        /// <param name="log_Reports"></param>
        public void Translate(
            string sOutputValue,
            Expression_Node_String ec_KeyExpected,
            Expression_Node_String ec_SfCell,//Sf:cell;相当と想定。
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "EToM2",log_Reports);
            //
            //

            string sName_Fnc;
            ec_SfCell.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
            if (NamesFnc.S_CELL != sName_Fnc)
            {
                // エラー。
                goto gt_Error_NotSfcell;
            }

            string sSelectedFldName;
            if (log_Reports.Successful)
            {
                bool bHit = ec_SfCell.TrySelectAttribute(
                    out sSelectedFldName,
                    PmNames.S_SELECT.Name_Pm,
                    EnumHitcount.One_Or_Zero,
                    log_Reports
                    );

                //if (!bHit)
                //{
                //    // 【追加 2012-07-10】
                //    // Sf:cell; の子要素arg1 には、name="select" のものがある。本来これは属性連結しておいて欲しい。
                //    List<Expression_Node_String> list_Arg1 = e_SfCell.SelectDirectchildByNodename(NamesNode.S_ARG1, false, EnumHitcount.Unconstraint, log_Reports);

                //    d_InMethod.WriteDebug_ToConsole(1, "sSelectedFldNameが属性になかった。子要素arg1(" + list_Arg1 .Count+ "個)から探す。");
                //    if (0<d_InMethod.NDebugLevel && list_Arg1.Count<=0)
                //    {
                //        Log_TextIndented s = new Log_TextIndentedImpl();
                //        e_SfCell.ToText_Snapshot(s);
                //        d_InMethod.WriteDebug_ToConsole(1, s.ToString());
                //    }

                //    EUtil_NodeImpl.SelectItemsByAttrAsCsv(list_Arg1, PmNames.NAME.SAttrName, ValuesAttr.S_SELECT, false, EnumHitcount.First_Exist, log_Reports);

                //    if (log_Reports.Successful)
                //    {
                //        sSelectedFldName = list_Arg1[0].Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                //    }
                //}
            }
            else
            {
                sSelectedFldName = "";
            }

            Expression_Node_String ec_KeyFldName1 = null;
            if (log_Reports.Successful)
            {
                Expression_Node_String ec_Where = null;

                //
                // 「E■where」は子要素。
                //

                // 再検索。
                ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String ec_Child, ref bool bRemove, ref bool bBreak)
                {
                    string sValue;
                    ec_Child.TrySelectAttribute(out sValue, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);

                    if (NamesNode.S_FNC == ec_Child.Cur_Configuration.Name &&
                        NamesFnc.S_WHERE == sValue)
                    {
                        ec_Where = ec_Child;

                        if (pg_Method.CanDebug(2))
                        {
                            pg_Method.WriteDebug_ToConsole("子「E■[" + ec_Child.Cur_Configuration.Name + "]」。子要素数=[" + ec_Where.List_Expression_Child.Count + "]");
                        }

                        ec_Where.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                        {
                            if (NamesNode.S_FNC == e_Item.Cur_Configuration.Name)
                            {
                                Expression_Node_String ec_Field;
                                bool bHit3 = e_Item.TrySelectAttribute(out ec_Field, PmNames.S_FIELD.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                                if (bHit3)
                                {
                                    //「E■f-cell」/「E■@where」/「E■fnc field=”★”」。
                                    ec_KeyFldName1 = ec_Field;

                                    if (pg_Method.CanDebug(2))
                                    {
                                        pg_Method.WriteDebug_ToConsole( "「E■f-cell」/「E■a-where」/「E■fnc field=”[" + ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "]”」。");
                                    }
                                }
                                else
                                {
                                    throw new Exception("ここは通らない?");
                                }
                            }
                            else
                            {
                                // #エラー
                                System.Console.WriteLine(Info_Controls.Name_Library + ":" + this.GetType().Name + "#EToM: 「E■fnc」がありませんでした。");
                            }

                        });
                    }
                    else
                    {
                        if (pg_Method.CanDebug(2))
                        {
                            pg_Method.WriteDebug_ToConsole( "(無視)  子「E■[" + ec_Child.Cur_Configuration.Name + "]」。");
                        }
                    }
                });

                if (null == ec_Where)
                {
                    // #エラー
                    System.Console.WriteLine(Info_Controls.Name_Library + ":" + this.GetType().Name + "#EToM: 「E■f-cell」に、子「E■where」が無かった? そういう場合(無条件)もある。");
                }
            }
            else
            {
                ec_KeyFldName1 = null;
            }

            //
            // from
            //
            Expression_Node_String ec_TableName1;//ソース情報利用
            if (log_Reports.Successful)
            {
                // Sf:cell; に from が指定されていない?
                bool bHit = ec_SfCell.TrySelectAttribute(
                    out ec_TableName1,
                    PmNames.S_FROM.Name_Pm,
                    EnumHitcount.One,
                    log_Reports
                    );

                //if (null == e_TableName1)
                //{
                //    d_InMethod.WriteDebug_ToConsole(1, "e_TableName1が属性になかった。子要素arg1から探す。");
                //    // 【追加 2012-07-10】
                //    // Sf:cell; の子要素arg1 には、name=”from” のものがある。本来これは属性連結しておいて欲しい。
                //    List<Expression_Node_String> list_Arg1 = e_SfCell.SelectDirectchildByNodename(NamesNode.S_ARG1, false, EnumHitcount.Unconstraint, log_Reports);
                //    EUtil_NodeImpl.SelectItemsByAttrAsCsv(list_Arg1, PmNames.NAME.SAttrName, ValuesAttr.S_FROM, false, EnumHitcount.First_Exist, log_Reports);

                //    if (log_Reports.Successful)
                //    {
                //        e_TableName1 = list_Arg1[0];
                //    }
                //}
            }
            else
            {
                ec_TableName1 = null;
            }

            //
            // required
            //
            bool bExpectedValueRequired = false;
            if (log_Reports.Successful)
            {
                string sRequired1;
                bool bHit = ec_SfCell.TrySelectAttribute(out sRequired1, PmNames.S_REQUIRED.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (bHit)
                {
                    // 【旧仕様】
                    bool bParseSuccessful = bool.TryParse(sRequired1, out bExpectedValueRequired);
                }
                else
                {
                    // 【新仕様】

                    //
                    // 新仕様では、「E■f-cell/@E■where/E■prm name=”required”」。
                    //
                    {
                        Expression_Node_String ec_Where;
                        bool bHit1 = ec_SfCell.TrySelectAttribute(out ec_Where, PmNames.S_WHERE.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                        if (bHit1)
                        {
                            throw new Exception("こーこは通らない?");
                        }
                    }

                }
            }
            else
            {
            }

            // e_TableName を取得してから引数エラーチェック。
            if (null == ec_KeyExpected)
            {
                // エラー
                goto gt_Error_NullKeyExpected;
            }

            // ──────────

            Table_Humaninput o_Table;
            if (log_Reports.Successful)
            {
                o_Table = moApplication.MemoryTables.GetTable_HumaninputByName(ec_TableName1, true, log_Reports);
                // エラー時には、エラーメッセージを出させます。

                if (null == o_Table)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundTable;
                }
                else
                {
                    //
                    // 正常時
                    //
                    //.WriteLine("(" + Info_Forms .LibraryName+ ")" + this.GetType().NFcName + "#...: (1)テーブル検索終了 refOTable=[" + refOTable.SourceFilePath + "]");
                }
            }
            else
            {
                o_Table = null;
            }

            string err_SKeyFldName;
            string err_SSelectedFldName;

            // field=""。
            Fielddefinition o_KeyFldDef;
            if (log_Reports.Successful)
            {
                //
                // 検索のキーとなるフィールドの定義を調べます。
                //

                List<string> sList_KeyFldName;
                {
                    sList_KeyFldName = new List<string>();

                    string sKeyFldName = ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                    if ("" == sKeyFldName.Trim())
                    {
                        // エラー
                        err_SKeyFldName = sKeyFldName;
                        goto gt_Error_EmptyKeyField;
                    }
                    sList_KeyFldName.Add(sKeyFldName);
                    if (sList_KeyFldName.Count < 1)
                    {
                        // エラー
                        err_SKeyFldName = sKeyFldName;
                        goto gt_Error_ZeroKeyField;
                    }
                }

                RecordFielddefinition recordFielddefinition;
                bool bHit = o_Table.TryGetFieldDefinitionByName(
                    out recordFielddefinition,
                    sList_KeyFldName,
                    true,
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    goto gt_EndMethod;
                }

                o_KeyFldDef = recordFielddefinition.ValueAt(0);
            }
            else
            {
                o_KeyFldDef = null;
            }

            RecordFielddefinition recordFielddefinition_Selected;
            if (log_Reports.Successful)
            {
                // 選択対象のフィールドの定義を調べます。

                List<string> sList_SelectedFldName;
                {
                    sList_SelectedFldName = new CsvTo_ListImpl().Read(sSelectedFldName);
                    foreach (string sName in sList_SelectedFldName)
                    {
                        if ("" == sName.Trim())
                        {
                            // エラー
                            err_SSelectedFldName = sSelectedFldName;
                            goto gt_Error_EmptySelectField;
                        }
                    }

                    if (sList_SelectedFldName.Count < 1)
                    {
                        // エラー
                        err_SSelectedFldName = sSelectedFldName;
                        goto gt_Error_ZeroSelectField;
                    }
                }

                bool bHit = o_Table.TryGetFieldDefinitionByName(
                    out recordFielddefinition_Selected,
                    sList_SelectedFldName,
                    false,
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    goto gt_EndMethod;
                }
            }
            else
            {
                recordFielddefinition_Selected = null;
            }

            if (log_Reports.Successful)
            {
                if (null == o_KeyFldDef)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundKeyFldDefinition;
                }
            }

            if (log_Reports.Successful)
            {
                if (recordFielddefinition_Selected.Count < 1)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundSelectFldDefinition;
                }
            }

            if (log_Reports.Successful)
            {

                List<DataRow> dst_Row = new List<DataRow>();

                string sKeyFieldName = ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                string sExpectedValue = ec_KeyExpected.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                Configuration_Node cf_WrittenPlace_Query = ec_SfCell.Cur_Configuration;

                SelectPerformerImpl sp = new SelectPerformerImpl();
                sp.Select(
                    out dst_Row,
                    sKeyFieldName,
                    sExpectedValue,
                    bExpectedValueRequired,
                    o_KeyFldDef,
                    o_Table.DataTable,
                    cf_WrittenPlace_Query,
                    log_Reports
                    );

                if (0 < dst_Row.Count)
                {
                    //.WriteLine("(" + Info_Forms .LibraryName+ ")" + this.GetType().NFcName + "#...: (6a)該当 recordSet.Count=[" + recordSet.Count + "]");

                    foreach (DataRow row in dst_Row)
                    {
                        ToMemory_CellImpl updater = new ToMemory_CellImpl();

                        recordFielddefinition_Selected.ForEach(delegate(Fielddefinition fielddefinition_Selected, ref bool isBreak2, Log_Reports log_Reports2)
                        {
                            updater.ToMemory_ToSelectedField(
                                sOutputValue,
                                ec_SfCell,
                                row,
                                fielddefinition_Selected,
                                log_Reports
                                );
                        }, log_Reports);
                    }
                }
                else
                {
                    // エラー。
                    goto gt_Error_NotFoundRecord;
                }
            }

            goto gt_EndMethod;
            //
            //
            gt_Error_NotSfcell:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー909!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("Sf:cell;でないExpression_Node_Stringが指定されました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));
                if (null != ec_SfCell)
                {
                    ec_SfCell.ToText_Snapshot(s);
                }

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
            gt_Error_NullKeyExpected:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー906!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("引数e_KeyExpectedにヌルが指定されました。 e_KeyExpected=[");
                s.Append(ec_KeyExpected);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_EmptyKeyField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー903!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("fieldで指定されたキーフィールドの名前が空文字列でした。 err_SKeyFldName=[");
                s.Append(err_SKeyFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_ZeroKeyField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー902!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("fieldで指定されたキーフィールドの個数が0個でした。 err_SKeyFldName=[");
                s.Append(err_SKeyFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_EmptySelectField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー904!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("selectで指定されたフィールドの名前に空文字列がありました。 err_SSelectedFldName=[");
                s.Append(err_SSelectedFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_ZeroSelectField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー901!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("selectで指定されたフィールドの個数が0個でした。 err_SSelectedFldName=[");
                s.Append(err_SSelectedFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            // エラー。
            gt_Error_NotFoundTable:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー1011!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append(" ヌル=refTable");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_NotFoundKeyFldDefinition:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー478!", pg_Method);

                StringBuilder t = new StringBuilder();

                t.Append(" キーフィールドの定義を取得できませんでした。");
                t.Append(Environment.NewLine);

                t.Append("「E■[");
                t.Append(ec_KeyFldName1.Cur_Configuration.Name);
                t.Append("]」、キーフィールド名=[");
                t.Append(ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                t.Append("]");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                t.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_NotFoundSelectFldDefinition:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー479!", pg_Method);

                StringBuilder t = new StringBuilder();

                t.Append(" 取得データが入っているはずのフィールドの定義を取得できませんでした。");
                t.Append(Environment.NewLine);
                t.Append("  指定されたフィールド名=[");
                t.Append(sSelectedFldName);
                t.Append("]");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                t.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            gt_Error_NotFoundRecord:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー344!", pg_Method);

                string sDebugExceptedKey = ec_KeyExpected.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("【失敗】");
                s.Newline();
                s.Newline();

                s.Append("[");
                s.Append(o_Table.Name);
                s.Append("](テーブル)には、");
                s.Append(Environment.NewLine);

                s.Append("[");
                s.Append(ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]フィールドに");

                s.Append("[");
                s.Append(sDebugExceptedKey);
                s.Append("]が入っているレコードは、見つかりませんでした。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("この入力したデータは、入力が確定されず、無視されています。");
                s.Append(Environment.NewLine);

                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("もしかして?");
                s.Append(Environment.NewLine);
                s.Append(" ・ツールの不便さにより、手入力で");
                s.Append(Environment.NewLine);
                s.Append("  指定のテーブルに ID付きのレコードの空欄を");
                s.Append(Environment.NewLine);
                s.Append("  予め 作っておかなければならなかった、といった決まりごとはありませんか?");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append(" ・それとも、それ以外の理由?");
                s.Append(Environment.NewLine);

                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("────────以下はプログラマー用の情報。");
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();

                //essageBox.Show(r.SMsg(log_Reports), Info_Forms.LibraryName + ":" + this.GetType().Name );
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        public void ToMemory_DataTargetFcell(
            string sValue_Output,
            Expression_Node_String ec_SfCell,//Sf:cell;
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM_DataTargetFcell",log_Reports);
            //
            //

            string sName_Fnc;
            ec_SfCell.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
            if (NamesFnc.S_CELL != sName_Fnc)
            {
                // エラー。
                goto gt_Error_NotSfcell;
            }

            // ■f-cellの子要素
            Expression_Node_String ec_KeyExpected1 = null;
            int nKeyCount = 0;
            {
                //
                //「E■f-cell」の子要素のリスト。
                ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                {
                    // キー値 が1つ入っています。
                    ec_KeyExpected1 = e_Item;
                    nKeyCount++;
                });
            }

            // それでも @keyValueを取得できなければ。
            if (null == ec_KeyExpected1)
            {
                //「E■rec-cond」を調べる。
                Expression_Node_String ec_Where;
                bool bHit2 = ec_SfCell.TrySelectAttribute(out ec_Where, PmNames.S_WHERE.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (bHit2)
                {
                    ec_Where.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                    {
                        if (NamesNode.S_FNC == e_Item.Cur_Configuration.Name)
                        {
                            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#ToM: 「E■f-cell」の「E■@where」属性の下の「E■fnc」を解析。その子要素がvalue相当であるはず。");
                            ec_KeyExpected1 = e_Item;
                        }
                        else
                        {
                        }

                    });
                }
            }

            if (1 < nKeyCount)
            {
                ec_KeyExpected1 = null;

                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー311!", pg_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();

                    s.Append("「E■f-cell」系要素の子要素が、「E■rec-cond」を除いて[" + nKeyCount + "]個ありました。");
                    s.Newline();

                    s.Append("この子要素は キー値になるもので、1個でなければいけません。");
                    s.Newline();

                    // 一覧
                    s.Append("──────────子要素名一覧");
                    s.Newline();

                    ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Str1, ref bool bRemove2, ref bool bBreak2)
                    {
                        if ("" == e_Str1.Cur_Configuration.Name)
                        {
                            s.Append("E■(要素名無し)");
                            s.Newline();
                        }
                        else
                        {
                            s.Append("E■");
                            s.Append(e_Str1.Cur_Configuration.Name);
                            s.Newline();
                        }
                    });
                    s.Append("──────────");
                    s.Newline();

                    // ヒント
                    s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                    r.Message = s.ToString();
                    log_Reports.EndCreateReport();
                }
            }
            else if (null == ec_KeyExpected1)
            {
                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー312!", pg_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();

                    //s.Append("「E■f-cell」系要素の子要素に、「E■f-text」や「E■f-cell」が無いのか、有っても値がありませんでした。");
                    s.Append("「E■f-cell」の「keyValue」相当の値が指定されていませんでした。");
                    s.Newline();

                    // 一覧
                    s.Append("──────────子要素名一覧");
                    s.Newline();
                    ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Str1, ref bool bRemove2, ref bool bBreak2)
                    {
                        if ("" == e_Str1.Cur_Configuration.Name)
                        {
                            s.Append("E■(要素名無し)");
                            s.Newline();
                        }
                        else
                        {
                            s.Append("E■");
                            s.Append(e_Str1.Cur_Configuration.Name);
                            s.Newline();
                        }
                    });
                    s.Append("──────────");
                    s.Newline();

                    // ヒント
                    s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                    r.Message = s.ToString();
                    log_Reports.EndCreateReport();
                }
            }

            if (log_Reports.Successful)
            {

                //
                // <f-cell>1つにつき。
                //
                ExpressionToMemory_FcellImpl to = new ExpressionToMemory_FcellImpl();
                to.Translate(
                    sValue_Output,
                    ec_KeyExpected1,
                    ec_SfCell,// <f-cell>相当と想定。
                    moApplication,
                    log_Reports
                    );
            }

            goto gt_EndMethod;
            //
            //
            gt_Error_NotSfcell:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー909!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("Sf:cell;でないExpression_Node_Stringが指定されました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));
                if (null != ec_SfCell)
                {
                    ec_SfCell.ToText_Snapshot(s);
                }

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        /// <summary>
        /// 
        /// </summary>
        /// <param name="s_cur"></param>
        /// <param name="e_parent"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,//Sf:case;
            Expression_Node_String parent_Expr,//Sf:switch;
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            //throw new Exception(Info_SToE.LibraryName + ":" + this.GetType().Name + "#SToE: このメソッドは廃止方針です。");

            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE",log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(8)"+cur_Cf.Name);
            }

            //
            //
            //
            //

            string parent_SName_Fnc;
            parent_Expr.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);

            if (NamesFnc.S_SWITCH != parent_SName_Fnc)
            {
                goto gt_Error_Parent;
            }

            //
            // 親
            //
            Expression_SfswitchImpl parent_Expression_Fswitch = (Expression_SfswitchImpl)parent_Expr;

            //
            // 自
            //
            Expression_SfcaseImpl cur_Ec = (Expression_SfcaseImpl)Expression_SfcaseImpl.Create(parent_Expression_Fswitch, cur_Cf);

            //
            // 属性
            //
            {
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    true,//name属性は必須。
                    false,//value属性は無い。
                    log_Reports
                    );
            }

            //
            //
            //
            // 子
            //
            //
            //
            Configurationtree_Node err_Child_Cf;
            {
                //
                // <fnc name=”Sf:case;”>
                //   <arg1 name=”caseValue” value=”★”>要素の value値を、nFallTrue に セット。
                //

                cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node child_Cf_Arg1, ref bool bBreak)
                {
                    if (
                        // <arg >
                        NamesNode.S_ARG == child_Cf_Arg1.Name
                        )
                    {
                        string sName_Child_Fnc;
                        child_Cf_Arg1.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Child_Fnc, true, log_Reports);

                        if (log_Method.CanDebug(1))
                        {
                            log_Method.WriteDebug_ToConsole( " ・" + child_Cf_Arg1.Name + " name=”[" + sName_Child_Fnc + "]”");
                        }

                        if (
                            //s_ChildArg1.Dictionary_Attribute.ContainsKey(PmNames.NAME.SAttrName) &&
                            // name=”caseValue”
                            PmNames.S_VALUE_CASE.Name_Pm == sName_Child_Fnc
                            )
                        {

                            //
                            // caseValueは、直接 value=""属性で指定されたものだけが有効です。子要素は指定できません。
                            //
                            if (child_Cf_Arg1.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE.Name_Pm))
                            {
                                log_Reports.Log_Callstack.Push(log_Method, "SToE②s_Cur→e_Cur");
                                this.ParseChild_InConfigurationtreeToExpression(
                                    cur_Cf, //Sf:case;
                                    cur_Ec,// e_Cur, e_Parent, //Sf:case;
                                    memoryApplication,
                                    pg_ParsingLog,
                                    log_Reports
                                    );
                                log_Reports.Log_Callstack.Pop(log_Method, "SToE②s_Cur→e_Cur");

                                //
                                // 最初のcaseValueのみ有効。
                                //
                                bBreak = true;
                            }
                            else
                            {
                                // エラー
                                err_Child_Cf = child_Cf_Arg1;
                                bBreak = true;
                                goto gt_Error_NotConstCaseValue;
                            }
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        if (log_Method.CanDebug(1))
                        {
                            log_Method.WriteDebug_ToConsole(" ・" + child_Cf_Arg1.Name);
                        }
                    }

                    goto gt_End2;
                //
                //
                gt_Error_NotConstCaseValue:
                    {
                        Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                        tmpl.SetParameter(1, PmNames.S_VALUE_CASE.Name_Pm, log_Reports);//ケース名
                        tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(err_Child_Cf), log_Reports);//設定位置パンくずリスト

                        memoryApplication.CreateErrorReport("Er:7017;", tmpl, log_Reports);
                    }
                    goto gt_End2;
                    //
                gt_End2:
                    ;
                });
            }

            //
            //
            //
            // 親
            //
            //
            //
            parent_Expression_Fswitch.List_Expression_Sfcase.Add(cur_Ec);

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole( " ┌────┐ 子要素数=[" + cur_Cf.List_Child.Count + "]");
                cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node s_Child, ref bool bBreak)
                {
                    if (NamesNode.S_ARG == s_Child.Name)
                    {
                        string sName;
                        s_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName, true, log_Reports);
                        log_Method.WriteDebug_ToConsole( " ・" + s_Child.Name + " name=”[" + sName + "]”");
                    }
                    else
                    {
                        log_Method.WriteDebug_ToConsole( " ・" + s_Child.Name);
                    }
                });
                log_Method.WriteDebug_ToConsole( " └────┘");

                log_Method.WriteDebug_ToConsole(" ┌────┐ string属性数=[" + cur_Cf.Dictionary_Attribute.Count + "]");
                cur_Cf.Dictionary_Attribute.ForEach(delegate(string sKey, string sValue, ref bool bBreak)
                {
                    log_Method.WriteDebug_ToConsole( " s属 [" + sKey + "]=[" + sValue + "]");
                });
                log_Method.WriteDebug_ToConsole( " └────┘");

            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_Parent:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, parent_Expr.Cur_Configuration.Name, log_Reports);//親設定ノード名
                tmpl.SetParameter(2, parent_SName_Fnc, log_Reports);//親設定ノード関数名
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7018;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }