Beispiel #1
0
    /// <summary>
    /// 转文本输出
    /// </summary>
    protected override void toWriteDataString(DataWriter writer)
    {
        base.toWriteDataString(writer);

        writer.writeTabs();
        writer.sb.Append("version");
        writer.sb.Append(':');
        writer.sb.Append(this.version);

        writer.writeEnter();
        writer.writeTabs();
        writer.sb.Append("list");
        writer.sb.Append(':');
        writer.sb.Append("List<RankData>");
        if (this.list != null)
        {
            SList <RankData> listT = this.list;
            int listLen            = listT.size();
            writer.sb.Append('(');
            writer.sb.Append(listLen);
            writer.sb.Append(')');
            writer.writeEnter();
            writer.writeLeftBrace();
            for (int listI = 0; listI < listLen; ++listI)
            {
                RankData listV = listT.get(listI);
                writer.writeTabs();
                writer.sb.Append(listI);
                writer.sb.Append(':');
                if (listV != null)
                {
                    listV.writeDataString(writer);
                }
                else
                {
                    writer.sb.Append("RankData=null");
                }

                writer.writeEnter();
            }
            writer.writeRightBrace();
        }
        else
        {
            writer.sb.Append("=null");
        }

        writer.writeEnter();
    }
Beispiel #2
0
    /// <summary>
    /// 转文本输出
    /// </summary>
    protected override void toWriteDataString(DataWriter writer)
    {
        base.toWriteDataString(writer);

        writer.writeTabs();
        writer.sb.Append("version");
        writer.sb.Append(':');
        writer.sb.Append(this.version);

        writer.writeEnter();
        writer.writeTabs();
        writer.sb.Append("listListMap");
        writer.sb.Append(':');
        writer.sb.Append("Map<int,SList<SList<RankData>>>");
        if (this.listListMap != null)
        {
            writer.sb.Append('(');
            writer.sb.Append(this.listListMap.size());
            writer.sb.Append(')');
            writer.writeEnter();
            writer.writeLeftBrace();
            if (!this.listListMap.isEmpty())
            {
                int   listListMapKFreeValue = this.listListMap.getFreeValue();
                int[] listListMapKKeys      = this.listListMap.getKeys();
                SList <SList <RankData> >[] listListMapVValues = this.listListMap.getValues();
                for (int listListMapKI = listListMapKKeys.Length - 1; listListMapKI >= 0; --listListMapKI)
                {
                    int listListMapK = listListMapKKeys[listListMapKI];
                    if (listListMapK != listListMapKFreeValue)
                    {
                        SList <SList <RankData> > listListMapV = listListMapVValues[listListMapKI];
                        writer.writeTabs();
                        writer.sb.Append(listListMapK);

                        writer.sb.Append(':');
                        writer.sb.Append("List<SList<RankData>>");
                        if (listListMapV != null)
                        {
                            SList <SList <RankData> > listListMapVT = listListMapV;
                            int listListMapVLen = listListMapVT.size();
                            writer.sb.Append('(');
                            writer.sb.Append(listListMapVLen);
                            writer.sb.Append(')');
                            writer.writeEnter();
                            writer.writeLeftBrace();
                            for (int listListMapVI = 0; listListMapVI < listListMapVLen; ++listListMapVI)
                            {
                                SList <RankData> listListMapVV = listListMapVT.get(listListMapVI);
                                writer.writeTabs();
                                writer.sb.Append(listListMapVI);
                                writer.sb.Append(':');
                                writer.sb.Append("List<RankData>");
                                if (listListMapVV != null)
                                {
                                    SList <RankData> listListMapVVT = listListMapVV;
                                    int listListMapVVLen            = listListMapVVT.size();
                                    writer.sb.Append('(');
                                    writer.sb.Append(listListMapVVLen);
                                    writer.sb.Append(')');
                                    writer.writeEnter();
                                    writer.writeLeftBrace();
                                    for (int listListMapVVI = 0; listListMapVVI < listListMapVVLen; ++listListMapVVI)
                                    {
                                        RankData listListMapVVV = listListMapVVT.get(listListMapVVI);
                                        writer.writeTabs();
                                        writer.sb.Append(listListMapVVI);
                                        writer.sb.Append(':');
                                        if (listListMapVVV != null)
                                        {
                                            listListMapVVV.writeDataString(writer);
                                        }
                                        else
                                        {
                                            writer.sb.Append("RankData=null");
                                        }

                                        writer.writeEnter();
                                    }
                                    writer.writeRightBrace();
                                }
                                else
                                {
                                    writer.sb.Append("=null");
                                }

                                writer.writeEnter();
                            }
                            writer.writeRightBrace();
                        }
                        else
                        {
                            writer.sb.Append("=null");
                        }

                        writer.writeEnter();
                    }
                }
            }
            writer.writeRightBrace();
        }
        else
        {
            writer.sb.Append("=null");
        }

        writer.writeEnter();
    }