Esempio n. 1
0
        public Guk ToGuk()
        {
            Guk guk = new Guk();

            guk.SetType(Type, false);
            if (isSub)
            {
                guk.SetAttr("isSub", null);
            }
            Entries.ForEachPairs((index, entry) => {
                Guk sub = guk.CreateSubNode(StrGen.Start("<").Append(entry.species).Append(':').Append(index).Append(" />").End);
                sub.SetAttr("name", entry.name, false);
                sub.SetAttr("type", entry.type, false);
                entry.Flags.ForEachPairs((k, v) => sub.SetAttr(k, v, false));
            });
            return(guk);
        }
Esempio n. 2
0
        public string Serialize()
        {
            StrGen.Builder builder = StrGen.GetBuilder();

            int lastRow = 0;

            DoCell((row, col, cellValue) => {
                if (row != lastRow)
                {
                    builder.Append("\n"); lastRow = row;
                }
                if (col != 0)
                {
                    builder.Append(",");
                }
                AppendString(builder, cellValue);
            });
            return(builder.GetStringAndRelease());
        }
Esempio n. 3
0
 public ID Append(string subId)
 {
     open_id = StrGen.Start(open_id).Append('.').Append(subId).End; return(this);
 }
Esempio n. 4
0
 public override string ToString()
 {
     return(Reduce(StrGen.Start("GapSeq<{0}>({1}):", typeof(T).Name, Count), (s, t) => s[" "][t]).End);
 }