Ejemplo n.º 1
0
 public void ApplyImmutableFrom(RailStateDataSerializer source)
 {
     for (int i = 0; i < immutable.Count; ++i)
     {
         immutable[i].ApplyFrom(source.immutable[i]);
     }
 }
Ejemplo n.º 2
0
 public void ApplyControllerFrom(RailStateDataSerializer source)
 {
     for (int i = 0; i < controller.Count; ++i)
     {
         controller[i].ApplyFrom(source.controller[i]);
     }
 }
Ejemplo n.º 3
0
 public void ApplyMutableFrom(RailStateDataSerializer source, uint flags)
 {
     for (int i = 0; i < mutable.Count; ++i)
     {
         if ((flags & ToFlag(i)) == ToFlag(i))
         {
             mutable[i].ApplyFrom(source.mutable[i]);
         }
     }
 }
Ejemplo n.º 4
0
        public bool IsControllerDataEqual(RailStateDataSerializer other)
        {
            for (int i = 0; i < controller.Count; ++i)
            {
                if (!controller[i].Equals(other.controller[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
Ejemplo n.º 5
0
        public uint CompareMutableData(RailStateDataSerializer other)
        {
            uint uiFlags = 0x0;

            for (int i = 0; i < mutable.Count; ++i)
            {
                if (!mutable[i].Equals(other.mutable[i]))
                {
                    uiFlags |= ToFlag(i);
                }
            }

            return(uiFlags);
        }
Ejemplo n.º 6
0
 void IRailPoolable <RailState> .Allocated()
 {
     DataSerializer = new RailStateDataSerializer(this);
 }