< Summary

Class:Configs.SimulationConfig
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Generated/Proto/SimulationConfig.cs
Covered lines:37
Uncovered lines:91
Coverable lines:128
Total lines:349
Line coverage:28.9% (37 of 128)
Covered branches:0
Total branches:0
Covered methods:9
Total methods:23
Method coverage:39.1% (9 of 23)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SimulationConfig()0%110100%
get_Descriptor()0%2100%
SimulationConfig(...)0%2100%
Clone()0%2100%
SimulationConfig()0%110100%
Equals(...)0%2100%
Equals(...)0%56700%
GetHashCode()0%20400%
ToString()0%2100%
WriteTo(...)0%2100%
InternalWriteTo(...)0%20400%
CalculateSize()0%20400%
MergeFrom(...)0%20400%
MergeFrom(...)0%110100%
InternalMergeFrom(...)0%8.348082.61%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: Configs/simulation_config.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 Configs {
 13
 14  /// <summary>Holder for reflection information generated from Configs/simulation_config.proto</summary>
 15  public static partial class SimulationConfigReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for Configs/simulation_config.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static SimulationConfigReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Ch9Db25maWdzL3NpbXVsYXRpb25fY29uZmlnLnByb3RvEgdjb25maWdzGhpD",
 28            "b25maWdzL3N3YXJtX2NvbmZpZy5wcm90byKlAQoQU2ltdWxhdGlvbkNvbmZp",
 29            "ZxIQCghlbmRfdGltZRgBIAEoAhISCgp0aW1lX3NjYWxlGAIgASgCEjcKGWlu",
 30            "dGVyY2VwdG9yX3N3YXJtX2NvbmZpZ3MYAyADKAsyFC5jb25maWdzLlN3YXJt",
 31            "Q29uZmlnEjIKFHRocmVhdF9zd2FybV9jb25maWdzGAQgAygLMhQuY29uZmln",
 32            "cy5Td2FybUNvbmZpZ2IGcHJvdG8z"));
 33      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 34          new pbr::FileDescriptor[] { global::Configs.SwarmConfigReflection.Descriptor, },
 35          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 36            new pbr::GeneratedClrTypeInfo(typeof(global::Configs.SimulationConfig), global::Configs.SimulationConfig.Par
 37          }));
 38    }
 39    #endregion
 40
 41  }
 42  #region Messages
 43  /// <summary>
 44  /// Simulation configuration.
 45  /// </summary>
 46  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
 47  public sealed partial class SimulationConfig : pb::IMessage<SimulationConfig>
 48  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 49      , pb::IBufferMessage
 50  #endif
 51  {
 152    private static readonly pb::MessageParser<SimulationConfig> _parser = new pb::MessageParser<SimulationConfig>(() => 
 53    private pb::UnknownFieldSet _unknownFields;
 54    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 55    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 056    public static pb::MessageParser<SimulationConfig> 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::Configs.SimulationConfigReflection.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)]
 2072    public SimulationConfig() {
 73      OnConstruction();
 1074    }
 75
 76    partial void OnConstruction();
 77
 78    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 79    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 080    public SimulationConfig(SimulationConfig other) : this() {
 081      endTime_ = other.endTime_;
 082      timeScale_ = other.timeScale_;
 083      interceptorSwarmConfigs_ = other.interceptorSwarmConfigs_.Clone();
 084      threatSwarmConfigs_ = other.threatSwarmConfigs_.Clone();
 085      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 086    }
 87
 88    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 89    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 090    public SimulationConfig Clone() {
 091      return new SimulationConfig(this);
 092    }
 93
 94    /// <summary>Field number for the "end_time" field.</summary>
 95    public const int EndTimeFieldNumber = 1;
 96    private float endTime_;
 97    /// <summary>
 98    /// End time in seconds.
 99    /// </summary>
 100    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 101    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 102    public float EndTime {
 273103      get { return endTime_; }
 10104      set {
 10105        endTime_ = value;
 10106      }
 107    }
 108
 109    /// <summary>Field number for the "time_scale" field.</summary>
 110    public const int TimeScaleFieldNumber = 2;
 111    private float timeScale_;
 112    /// <summary>
 113    /// Time scale.
 114    /// </summary>
 115    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 116    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 117    public float TimeScale {
 33118      get { return timeScale_; }
 10119      set {
 10120        timeScale_ = value;
 10121      }
 122    }
 123
 124    /// <summary>Field number for the "interceptor_swarm_configs" field.</summary>
 125    public const int InterceptorSwarmConfigsFieldNumber = 3;
 1126    private static readonly pb::FieldCodec<global::Configs.SwarmConfig> _repeated_interceptorSwarmConfigs_codec
 127        = pb::FieldCodec.ForMessage(26, global::Configs.SwarmConfig.Parser);
 10128    private readonly pbc::RepeatedField<global::Configs.SwarmConfig> interceptorSwarmConfigs_ = new pbc::RepeatedField<g
 129    /// <summary>
 130    /// Interceptor swarm configurations.
 131    /// </summary>
 132    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 133    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 134    public pbc::RepeatedField<global::Configs.SwarmConfig> InterceptorSwarmConfigs {
 0135      get { return interceptorSwarmConfigs_; }
 136    }
 137
 138    /// <summary>Field number for the "threat_swarm_configs" field.</summary>
 139    public const int ThreatSwarmConfigsFieldNumber = 4;
 1140    private static readonly pb::FieldCodec<global::Configs.SwarmConfig> _repeated_threatSwarmConfigs_codec
 141        = pb::FieldCodec.ForMessage(34, global::Configs.SwarmConfig.Parser);
 10142    private readonly pbc::RepeatedField<global::Configs.SwarmConfig> threatSwarmConfigs_ = new pbc::RepeatedField<global
 143    /// <summary>
 144    /// Threat swarm configurations.
 145    /// </summary>
 146    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 147    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 148    public pbc::RepeatedField<global::Configs.SwarmConfig> ThreatSwarmConfigs {
 30149      get { return threatSwarmConfigs_; }
 150    }
 151
 152    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 153    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0154    public override bool Equals(object other) {
 0155      return Equals(other as SimulationConfig);
 0156    }
 157
 158    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 159    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0160    public bool Equals(SimulationConfig other) {
 0161      if (ReferenceEquals(other, null)) {
 0162        return false;
 163      }
 0164      if (ReferenceEquals(other, this)) {
 0165        return true;
 166      }
 0167      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(EndTime, other.EndTime)) return false;
 0168      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TimeScale, other.TimeScale)) return false
 0169      if(!interceptorSwarmConfigs_.Equals(other.interceptorSwarmConfigs_)) return false;
 0170      if(!threatSwarmConfigs_.Equals(other.threatSwarmConfigs_)) return false;
 0171      return Equals(_unknownFields, other._unknownFields);
 0172    }
 173
 174    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 175    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0176    public override int GetHashCode() {
 0177      int hash = 1;
 0178      if (EndTime != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(EndTime);
 0179      if (TimeScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TimeScale);
 0180      hash ^= interceptorSwarmConfigs_.GetHashCode();
 0181      hash ^= threatSwarmConfigs_.GetHashCode();
 0182      if (_unknownFields != null) {
 0183        hash ^= _unknownFields.GetHashCode();
 0184      }
 0185      return hash;
 0186    }
 187
 188    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 189    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0190    public override string ToString() {
 0191      return pb::JsonFormatter.ToDiagnosticString(this);
 0192    }
 193
 194    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 195    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0196    public void WriteTo(pb::CodedOutputStream output) {
 197    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 0198      output.WriteRawMessage(this);
 199    #else
 200      if (EndTime != 0F) {
 201        output.WriteRawTag(13);
 202        output.WriteFloat(EndTime);
 203      }
 204      if (TimeScale != 0F) {
 205        output.WriteRawTag(21);
 206        output.WriteFloat(TimeScale);
 207      }
 208      interceptorSwarmConfigs_.WriteTo(output, _repeated_interceptorSwarmConfigs_codec);
 209      threatSwarmConfigs_.WriteTo(output, _repeated_threatSwarmConfigs_codec);
 210      if (_unknownFields != null) {
 211        _unknownFields.WriteTo(output);
 212      }
 213    #endif
 0214    }
 215
 216    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 217    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 218    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0219    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 0220      if (EndTime != 0F) {
 0221        output.WriteRawTag(13);
 0222        output.WriteFloat(EndTime);
 0223      }
 0224      if (TimeScale != 0F) {
 0225        output.WriteRawTag(21);
 0226        output.WriteFloat(TimeScale);
 0227      }
 0228      interceptorSwarmConfigs_.WriteTo(ref output, _repeated_interceptorSwarmConfigs_codec);
 0229      threatSwarmConfigs_.WriteTo(ref output, _repeated_threatSwarmConfigs_codec);
 0230      if (_unknownFields != null) {
 0231        _unknownFields.WriteTo(ref output);
 0232      }
 0233    }
 234    #endif
 235
 236    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 237    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0238    public int CalculateSize() {
 0239      int size = 0;
 0240      if (EndTime != 0F) {
 0241        size += 1 + 4;
 0242      }
 0243      if (TimeScale != 0F) {
 0244        size += 1 + 4;
 0245      }
 0246      size += interceptorSwarmConfigs_.CalculateSize(_repeated_interceptorSwarmConfigs_codec);
 0247      size += threatSwarmConfigs_.CalculateSize(_repeated_threatSwarmConfigs_codec);
 0248      if (_unknownFields != null) {
 0249        size += _unknownFields.CalculateSize();
 0250      }
 0251      return size;
 0252    }
 253
 254    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 255    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0256    public void MergeFrom(SimulationConfig other) {
 0257      if (other == null) {
 0258        return;
 259      }
 0260      if (other.EndTime != 0F) {
 0261        EndTime = other.EndTime;
 0262      }
 0263      if (other.TimeScale != 0F) {
 0264        TimeScale = other.TimeScale;
 0265      }
 0266      interceptorSwarmConfigs_.Add(other.interceptorSwarmConfigs_);
 0267      threatSwarmConfigs_.Add(other.threatSwarmConfigs_);
 0268      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0269    }
 270
 271    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 272    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 10273    public void MergeFrom(pb::CodedInputStream input) {
 274    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 10275      input.ReadRawMessage(this);
 276    #else
 277      uint tag;
 278      while ((tag = input.ReadTag()) != 0) {
 279      if ((tag & 7) == 4) {
 280        // Abort on any end group tag.
 281        return;
 282      }
 283      switch(tag) {
 284          default:
 285            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 286            break;
 287          case 13: {
 288            EndTime = input.ReadFloat();
 289            break;
 290          }
 291          case 21: {
 292            TimeScale = input.ReadFloat();
 293            break;
 294          }
 295          case 26: {
 296            interceptorSwarmConfigs_.AddEntriesFrom(input, _repeated_interceptorSwarmConfigs_codec);
 297            break;
 298          }
 299          case 34: {
 300            threatSwarmConfigs_.AddEntriesFrom(input, _repeated_threatSwarmConfigs_codec);
 301            break;
 302          }
 303        }
 304      }
 305    #endif
 10306    }
 307
 308    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 309    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 310    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 10311    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 312      uint tag;
 90313      while ((tag = input.ReadTag()) != 0) {
 40314      if ((tag & 7) == 4) {
 315        // Abort on any end group tag.
 0316        return;
 317      }
 40318      switch(tag) {
 319          default:
 0320            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 0321            break;
 10322          case 13: {
 10323            EndTime = input.ReadFloat();
 10324            break;
 325          }
 10326          case 21: {
 10327            TimeScale = input.ReadFloat();
 10328            break;
 329          }
 10330          case 26: {
 10331            interceptorSwarmConfigs_.AddEntriesFrom(ref input, _repeated_interceptorSwarmConfigs_codec);
 10332            break;
 333          }
 10334          case 34: {
 10335            threatSwarmConfigs_.AddEntriesFrom(ref input, _repeated_threatSwarmConfigs_codec);
 10336            break;
 337          }
 338        }
 40339      }
 10340    }
 341    #endif
 342
 343  }
 344
 345  #endregion
 346
 347}
 348
 349#endregion Designer generated code