< Summary

Class:Simulation.State
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Generated/Proto/State.cs
Covered lines:29
Uncovered lines:113
Coverable lines:142
Total lines:358
Line coverage:20.4% (29 of 142)
Covered branches:0
Total branches:0
Covered methods:7
Total methods:23
Method coverage:30.4% (7 of 23)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
State()0%110100%
get_Descriptor()0%2100%
State()0%110100%
State(...)0%56700%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%42600%
GetHashCode()0%30500%
ToString()0%2100%
WriteTo(...)0%2100%
InternalWriteTo(...)0%30500%
CalculateSize()0%30500%
MergeFrom(...)0%72800%
MergeFrom(...)0%2100%
InternalMergeFrom(...)0%12.299065.62%

File(s)

/github/workspace/Assets/Scripts/Generated/Proto/State.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: Simulation/state.proto
 4// </auto-generated>
 5#pragma warning disable 1591, 0612, 3021, 8981
 6#region Designer generated code
 7
 8using pb = global::Google.Protobuf;
 9using pbc = global::Google.Protobuf.Collections;
 10using pbr = global::Google.Protobuf.Reflection;
 11using scg = global::System.Collections.Generic;
 12namespace Simulation {
 13
 14  /// <summary>Holder for reflection information generated from Simulation/state.proto</summary>
 15  public static partial class StateReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for Simulation/state.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static StateReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "ChZTaW11bGF0aW9uL3N0YXRlLnByb3RvEgpzaW11bGF0aW9uGhxTaW11bGF0",
 28            "aW9uL2Nvb3JkaW5hdGVzLnByb3RvIqcBCgVTdGF0ZRIyCghwb3NpdGlvbhgB",
 29            "IAEoCzIgLnNpbXVsYXRpb24uQ2FydGVzaWFuQ29vcmRpbmF0ZXMSMgoIdmVs",
 30            "b2NpdHkYAiABKAsyIC5zaW11bGF0aW9uLkNhcnRlc2lhbkNvb3JkaW5hdGVz",
 31            "EjYKDGFjY2VsZXJhdGlvbhgDIAEoCzIgLnNpbXVsYXRpb24uQ2FydGVzaWFu",
 32            "Q29vcmRpbmF0ZXNiBnByb3RvMw=="));
 33      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 34          new pbr::FileDescriptor[] { global::Simulation.CoordinatesReflection.Descriptor, },
 35          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 36            new pbr::GeneratedClrTypeInfo(typeof(global::Simulation.State), global::Simulation.State.Parser, new[]{ "Pos
 37          }));
 38    }
 39    #endregion
 40
 41  }
 42  #region Messages
 43  /// <summary>
 44  /// Agent state.
 45  /// </summary>
 46  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
 47  public sealed partial class State : pb::IMessage<State>
 48  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 49      , pb::IBufferMessage
 50  #endif
 51  {
 152    private static readonly pb::MessageParser<State> _parser = new pb::MessageParser<State>(() => new State());
 53    private pb::UnknownFieldSet _unknownFields;
 54    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 55    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 056    public static pb::MessageParser<State> Parser { get { return _parser; } }
 57
 58    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 59    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 60    public static pbr::MessageDescriptor Descriptor {
 061      get { return global::Simulation.StateReflection.Descriptor.MessageTypes[0]; }
 62    }
 63
 64    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 65    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 66    pbr::MessageDescriptor pb::IMessage.Descriptor {
 067      get { return Descriptor; }
 68    }
 69
 70    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 71    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 163872    public State() {
 73      OnConstruction();
 81974    }
 75
 76    partial void OnConstruction();
 77
 78    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 79    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 080    public State(State other) : this() {
 081      position_ = other.position_ != null ? other.position_.Clone() : null;
 082      velocity_ = other.velocity_ != null ? other.velocity_.Clone() : null;
 083      acceleration_ = other.acceleration_ != null ? other.acceleration_.Clone() : null;
 084      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 085    }
 86
 87    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 88    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 089    public State Clone() {
 090      return new State(this);
 091    }
 92
 93    /// <summary>Field number for the "position" field.</summary>
 94    public const int PositionFieldNumber = 1;
 95    private global::Simulation.CartesianCoordinates position_;
 96    /// <summary>
 97    /// Position in m.
 98    /// </summary>
 99    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 100    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 101    public global::Simulation.CartesianCoordinates Position {
 6987102      get { return position_; }
 819103      set {
 819104        position_ = value;
 819105      }
 106    }
 107
 108    /// <summary>Field number for the "velocity" field.</summary>
 109    public const int VelocityFieldNumber = 2;
 110    private global::Simulation.CartesianCoordinates velocity_;
 111    /// <summary>
 112    /// Velocity in m/s.
 113    /// </summary>
 114    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 115    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 116    public global::Simulation.CartesianCoordinates Velocity {
 9252117      get { return velocity_; }
 819118      set {
 819119        velocity_ = value;
 819120      }
 121    }
 122
 123    /// <summary>Field number for the "acceleration" field.</summary>
 124    public const int AccelerationFieldNumber = 3;
 125    private global::Simulation.CartesianCoordinates acceleration_;
 126    /// <summary>
 127    /// Acceleration in m/s^2.
 128    /// </summary>
 129    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 130    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 131    public global::Simulation.CartesianCoordinates Acceleration {
 0132      get { return acceleration_; }
 0133      set {
 0134        acceleration_ = value;
 0135      }
 136    }
 137
 138    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 139    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0140    public override bool Equals(object other) {
 0141      return Equals(other as State);
 0142    }
 143
 144    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 145    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0146    public bool Equals(State other) {
 0147      if (ReferenceEquals(other, null)) {
 0148        return false;
 149      }
 0150      if (ReferenceEquals(other, this)) {
 0151        return true;
 152      }
 0153      if (!object.Equals(Position, other.Position)) return false;
 0154      if (!object.Equals(Velocity, other.Velocity)) return false;
 0155      if (!object.Equals(Acceleration, other.Acceleration)) return false;
 0156      return Equals(_unknownFields, other._unknownFields);
 0157    }
 158
 159    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 160    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0161    public override int GetHashCode() {
 0162      int hash = 1;
 0163      if (position_ != null) hash ^= Position.GetHashCode();
 0164      if (velocity_ != null) hash ^= Velocity.GetHashCode();
 0165      if (acceleration_ != null) hash ^= Acceleration.GetHashCode();
 0166      if (_unknownFields != null) {
 0167        hash ^= _unknownFields.GetHashCode();
 0168      }
 0169      return hash;
 0170    }
 171
 172    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 173    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0174    public override string ToString() {
 0175      return pb::JsonFormatter.ToDiagnosticString(this);
 0176    }
 177
 178    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 179    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0180    public void WriteTo(pb::CodedOutputStream output) {
 181    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 0182      output.WriteRawMessage(this);
 183    #else
 184      if (position_ != null) {
 185        output.WriteRawTag(10);
 186        output.WriteMessage(Position);
 187      }
 188      if (velocity_ != null) {
 189        output.WriteRawTag(18);
 190        output.WriteMessage(Velocity);
 191      }
 192      if (acceleration_ != null) {
 193        output.WriteRawTag(26);
 194        output.WriteMessage(Acceleration);
 195      }
 196      if (_unknownFields != null) {
 197        _unknownFields.WriteTo(output);
 198      }
 199    #endif
 0200    }
 201
 202    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 203    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 204    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0205    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 0206      if (position_ != null) {
 0207        output.WriteRawTag(10);
 0208        output.WriteMessage(Position);
 0209      }
 0210      if (velocity_ != null) {
 0211        output.WriteRawTag(18);
 0212        output.WriteMessage(Velocity);
 0213      }
 0214      if (acceleration_ != null) {
 0215        output.WriteRawTag(26);
 0216        output.WriteMessage(Acceleration);
 0217      }
 0218      if (_unknownFields != null) {
 0219        _unknownFields.WriteTo(ref output);
 0220      }
 0221    }
 222    #endif
 223
 224    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 225    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0226    public int CalculateSize() {
 0227      int size = 0;
 0228      if (position_ != null) {
 0229        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Position);
 0230      }
 0231      if (velocity_ != null) {
 0232        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Velocity);
 0233      }
 0234      if (acceleration_ != null) {
 0235        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Acceleration);
 0236      }
 0237      if (_unknownFields != null) {
 0238        size += _unknownFields.CalculateSize();
 0239      }
 0240      return size;
 0241    }
 242
 243    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 244    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0245    public void MergeFrom(State other) {
 0246      if (other == null) {
 0247        return;
 248      }
 0249      if (other.position_ != null) {
 0250        if (position_ == null) {
 0251          Position = new global::Simulation.CartesianCoordinates();
 0252        }
 0253        Position.MergeFrom(other.Position);
 0254      }
 0255      if (other.velocity_ != null) {
 0256        if (velocity_ == null) {
 0257          Velocity = new global::Simulation.CartesianCoordinates();
 0258        }
 0259        Velocity.MergeFrom(other.Velocity);
 0260      }
 0261      if (other.acceleration_ != null) {
 0262        if (acceleration_ == null) {
 0263          Acceleration = new global::Simulation.CartesianCoordinates();
 0264        }
 0265        Acceleration.MergeFrom(other.Acceleration);
 0266      }
 0267      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0268    }
 269
 270    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 271    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0272    public void MergeFrom(pb::CodedInputStream input) {
 273    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 0274      input.ReadRawMessage(this);
 275    #else
 276      uint tag;
 277      while ((tag = input.ReadTag()) != 0) {
 278      if ((tag & 7) == 4) {
 279        // Abort on any end group tag.
 280        return;
 281      }
 282      switch(tag) {
 283          default:
 284            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 285            break;
 286          case 10: {
 287            if (position_ == null) {
 288              Position = new global::Simulation.CartesianCoordinates();
 289            }
 290            input.ReadMessage(Position);
 291            break;
 292          }
 293          case 18: {
 294            if (velocity_ == null) {
 295              Velocity = new global::Simulation.CartesianCoordinates();
 296            }
 297            input.ReadMessage(Velocity);
 298            break;
 299          }
 300          case 26: {
 301            if (acceleration_ == null) {
 302              Acceleration = new global::Simulation.CartesianCoordinates();
 303            }
 304            input.ReadMessage(Acceleration);
 305            break;
 306          }
 307        }
 308      }
 309    #endif
 0310    }
 311
 312    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 313    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 314    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 64315    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 316      uint tag;
 320317      while ((tag = input.ReadTag()) != 0) {
 128318      if ((tag & 7) == 4) {
 319        // Abort on any end group tag.
 0320        return;
 321      }
 128322      switch(tag) {
 323          default:
 0324            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 0325            break;
 64326          case 10: {
 128327            if (position_ == null) {
 64328              Position = new global::Simulation.CartesianCoordinates();
 64329            }
 64330            input.ReadMessage(Position);
 64331            break;
 332          }
 64333          case 18: {
 128334            if (velocity_ == null) {
 64335              Velocity = new global::Simulation.CartesianCoordinates();
 64336            }
 64337            input.ReadMessage(Velocity);
 64338            break;
 339          }
 0340          case 26: {
 0341            if (acceleration_ == null) {
 0342              Acceleration = new global::Simulation.CartesianCoordinates();
 0343            }
 0344            input.ReadMessage(Acceleration);
 0345            break;
 346          }
 347        }
 128348      }
 64349    }
 350    #endif
 351
 352  }
 353
 354  #endregion
 355
 356}
 357
 358#endregion Designer generated code