Exemple #1
0
 public override void Serialize(System.IO.Stream stream, bool read)
 {
     if (read)
     {
         System.IO.BinaryReader r = new System.IO.BinaryReader(stream);
         SerializeOrient(stream, read);
         op_type = (TBoolOpType)r.ReadUInt32();
         int op_count = r.ReadInt32();
         for (int i = 0; i < op_count; i++)
         {
             TCSGObjectType type = (TCSGObjectType)r.ReadUInt32();
             TCSGObject     obj  = CreateObj(type);
             obj.Serialize(stream, true);
             AddOperand(obj);
         }
         need_update = true;
     }
     else
     {
         System.IO.BinaryWriter r = new System.IO.BinaryWriter(stream);
         r.Write((UInt32)TCSGObjectType.BOOL_OP);
         SerializeOrient(stream, read);
         r.Write((UInt32)op_type);
         r.Write(operand.Count);
         for (int i = 0; i < operand.Count; i++)
         {
             operand[i].Serialize(stream, false);
         }
     }
 }
Exemple #2
0
 public TCSGBoolOp()
 {
     operand = new List <TCSGObject>();
     op_type = TBoolOpType.NOT;
 }