public void Visit(TypeByte type) { if (id >= 0) { sw.WriteLine(prefix + bufname + ".WriteInt(Zeze.ByteBuffer.BYTE | " + id + " << Zeze.ByteBuffer.TAG_SHIFT);"); } sw.WriteLine(prefix + bufname + ".WriteByte(" + varname + ");"); }
public void Write(BinaryWriter bw) { bw.Write(data.Count); for (int i = 0; i < data.Count;) { TypeByte tb = determine(i); int amount; bw.Write(tb); switch (tb.head) { case 0: amount = tb.amount; for (; amount > 0; amount--) { bw.Write((uint)((UID)data[i]).Value); bw.Write((byte)data[i + 1]); i += 2; } break; case 1: amount = tb.amount; for (; amount > 0; amount--) { bw.Write((uint)((Time)data[i]).Value); bw.Write((byte)data[i + 1]); i += 2; } break; case 2: amount = tb.amount; bw.Write((uint)((Time)data[i]).Value); i++; for (; amount > 0; amount--) { bw.Write((uint)((UID)data[i]).Value); bw.Write((byte)data[i + 1]); i += 2; } break; case 3: amount = tb.amount; for (; amount > 0; amount--) { bw.Write((uint)((Time)data[i]).Value); bw.Write((uint)((UID)data[i + 1]).Value); bw.Write((byte)data[i + 2]); i += 3; } break; } } }
void Visitor.Visit(TypeByte type) { if (id >= 0) { sw.WriteLine(prefix + "case (Zeze.ByteBuffer.BYTE | " + id + " << Zeze.ByteBuffer.TAG_SHIFT): "); sw.WriteLine(prefix + " " + varname + " = " + bufname + ".ReadByte();"); sw.WriteLine(prefix + " break;"); } else { sw.WriteLine(prefix + varname + " = " + bufname + ".ReadByte();"); } }
public void Visit(TypeByte type) { WriteProperty(type); }
public void Visit(TypeByte type) { Initial(); }
void Visitor.Visit(TypeByte type) { Type = Zeze.Serialize.ByteBuffer.BYTE; }
void Visitor.Visit(TypeByte type) { text = var.NamePrivate + (isEquals ? " == " : " != ") + another + "." + var.NamePrivate; }
void Visitor.Visit(TypeByte type) { ChangeVariableCollectorName = "Zeze.Transaction.ChangeVariableCollectorChanged()"; }
void Visitor.Visit(TypeByte type) { }
public void Visit(TypeByte type) { name = "byte"; }
public void Visit(TypeByte type) { text = varname + ".GetHashCode()"; }
public void Visit(TypeByte type) { text = variable.NamePrivate + ".CompareTo(" + another + "." + variable.NamePrivate + ")"; }
/// <summary> /// Writes the element_type of the BSON Grammar /// </summary> /// <param name="type">The type.</param> void element_type(TypeByte type) { Write((byte)type); }
public void Visit(TypeByte type) { WriteLogValue(type); }
void Visitor.Visit(TypeByte type) { SetDefaultValue("0"); }
public void Visit(TypeByte type) { DefineStack(type); }
public void Visit(TypeByte type) { name = "number"; }
public static UndoList Read(BinaryReader br) { UndoList ret = new UndoList(); int count = br.ReadInt32(); for (int i = 0; i < count;) { TypeByte tb = br.ReadByte(); int amount; switch (tb.head) { case 0: amount = tb.amount; try { for (; amount > 0; amount--) { ret.data.Add(new UID(br.ReadUInt32())); ret.data.Add(br.ReadByte()); i += 2; } } catch { } break; case 1: amount = tb.amount; try { for (; amount > 0; amount--) { ret.data.Add(new Time(br.ReadUInt32())); ret.data.Add(br.ReadByte()); i += 2; } } catch { } break; case 2: amount = tb.amount; ret.data.Add(new Time(br.ReadUInt32())); i++; for (; amount > 0; amount--) { try { ret.data.Add(new UID(br.ReadUInt32())); ret.data.Add(br.ReadByte()); } catch { i = i; } i += 2; } break; case 3: amount = tb.amount; try { for (; amount > 0; amount--) { ret.data.Add(new Time(br.ReadUInt32())); ret.data.Add(new UID(br.ReadUInt32())); ret.data.Add(br.ReadByte()); i += 3; } } catch { } break; } } return(ret); }
void Visitor.Visit(TypeByte type) { Name = "Zeze.ByteBuffer.BYTE"; }
void Visitor.Visit(TypeByte type) { sw.WriteLine(prefix + $"sb.Append(new string(' ', level * 4)).Append(\"{var}\").Append(\"=\").Append({var}).Append(\"{sep}\").Append(Environment.NewLine);"); }