Remove duplicate doc comments from watch classes
This commit is contained in:
parent
76cf9127d4
commit
204bd32817
|
@ -42,29 +42,16 @@ namespace BizHawk.Client.Common
|
|||
WatchDisplayType.Binary,
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Get a list a <see cref="WatchDisplayType"/> that can be used for this <see cref="ByteWatch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes()
|
||||
{
|
||||
return ValidTypes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the previous value; set it to the current one
|
||||
/// </summary>
|
||||
public override void ResetPrevious()
|
||||
{
|
||||
_previous = GetByte();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to sets the value into the <see cref="MemoryDomain"/>
|
||||
/// at the current <see cref="Watch"/> address
|
||||
/// </summary>
|
||||
/// <param name="value">Value to set</param>
|
||||
/// <returns>True if value successfully sets; otherwise, false</returns>
|
||||
public override bool Poke(string value)
|
||||
{
|
||||
try
|
||||
|
@ -87,9 +74,6 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the Watch (read it from <see cref="MemoryDomain"/>
|
||||
/// </summary>
|
||||
public override void Update(PreviousType previousType)
|
||||
{
|
||||
switch (previousType)
|
||||
|
@ -132,40 +116,18 @@ namespace BizHawk.Client.Common
|
|||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of difference
|
||||
/// between current value and the previous one
|
||||
/// </summary>
|
||||
public override string Diff => $"{_value - _previous:+#;-#;0}";
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the Watch is valid, false otherwise
|
||||
/// </summary>
|
||||
public override bool IsValid => Domain.Size == 0 || Address < Domain.Size;
|
||||
|
||||
/// <summary>
|
||||
/// Get the maximum possible value
|
||||
/// </summary>
|
||||
public override uint MaxValue => byte.MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// Get the current value
|
||||
/// </summary>
|
||||
public override int Value => GetByte();
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of the current value
|
||||
/// </summary>
|
||||
public override string ValueString => FormatValue(GetByte());
|
||||
|
||||
/// <summary>
|
||||
/// Get the previous value
|
||||
/// </summary>
|
||||
public override uint Previous => _previous;
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of the previous value
|
||||
/// </summary>
|
||||
public override string PreviousStr => FormatValue(_previous);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,27 +46,14 @@ namespace BizHawk.Client.Common
|
|||
WatchDisplayType.Float,
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of <see cref="WatchDisplayType"/> that can be used for a <see cref="DWordWatch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes()
|
||||
{
|
||||
return ValidTypes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset the previous value; set it to the current one
|
||||
/// </summary>
|
||||
public override void ResetPrevious()
|
||||
=> _previous = GetDWord();
|
||||
|
||||
/// <summary>
|
||||
/// Try to sets the value into the <see cref="MemoryDomain"/>
|
||||
/// at the current <see cref="Watch"/> address
|
||||
/// </summary>
|
||||
/// <param name="value">Value to set</param>
|
||||
/// <returns>True if value successfully sets; otherwise, false</returns>
|
||||
public override bool Poke(string value)
|
||||
{
|
||||
try
|
||||
|
@ -92,9 +79,6 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the Watch (read it from <see cref="MemoryDomain"/>
|
||||
/// </summary>
|
||||
public override void Update(PreviousType previousType)
|
||||
{
|
||||
switch (previousType)
|
||||
|
@ -156,40 +140,18 @@ namespace BizHawk.Client.Common
|
|||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of difference
|
||||
/// between current value and the previous one
|
||||
/// </summary>
|
||||
public override string Diff => $"{_value - (long)_previous:+#;-#;0}";
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the Watch is valid, false otherwise
|
||||
/// </summary>
|
||||
public override bool IsValid => Domain.Size == 0 || Address < (Domain.Size - 3);
|
||||
|
||||
/// <summary>
|
||||
/// Get the maximum possible value
|
||||
/// </summary>
|
||||
public override uint MaxValue => uint.MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// Get the current value
|
||||
/// </summary>
|
||||
public override int Value => (int)GetDWord();
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of the current value
|
||||
/// </summary>
|
||||
public override string ValueString => FormatValue(GetDWord());
|
||||
|
||||
/// <summary>
|
||||
/// Get the previous value
|
||||
/// </summary>
|
||||
public override uint Previous => _previous;
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of the previous value
|
||||
/// </summary>
|
||||
public override string PreviousStr => FormatValue(_previous);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,11 +56,6 @@ namespace BizHawk.Client.Common
|
|||
/// </summary>
|
||||
public override string PreviousStr => "";
|
||||
|
||||
/// <summary>
|
||||
/// TTransform the current instance into a displayable (short representation) string
|
||||
/// It's used by the "Display on screen" option in the RamWatch window
|
||||
/// </summary>
|
||||
/// <returns>A well formatted string representation</returns>
|
||||
public override string ToDisplayString()
|
||||
{
|
||||
return string.IsNullOrEmpty(Notes)
|
||||
|
@ -68,10 +63,6 @@ namespace BizHawk.Client.Common
|
|||
: Notes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transforms the current instance into a string
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="string"/> representation of the current <see cref="Watch"/></returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return $"0\tS\t_\t1\t\t{Notes.Trim('\r', '\n')}";
|
||||
|
|
|
@ -43,26 +43,13 @@ namespace BizHawk.Client.Common
|
|||
WatchDisplayType.FixedPoint_12_4,
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Get a list a <see cref="WatchDisplayType"/> that can be used for this <see cref="WordWatch"/>
|
||||
/// </summary>
|
||||
/// <returns>An enumeration that contains all valid <see cref="WatchDisplayType"/></returns>
|
||||
public override IEnumerable<WatchDisplayType> AvailableTypes() => ValidTypes;
|
||||
|
||||
/// <summary>
|
||||
/// Reset the previous value; set it to the current one
|
||||
/// </summary>
|
||||
public override void ResetPrevious()
|
||||
{
|
||||
_previous = GetWord();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to sets the value into the <see cref="MemoryDomain"/>
|
||||
/// at the current <see cref="Watch"/> address
|
||||
/// </summary>
|
||||
/// <param name="value">Value to set</param>
|
||||
/// <returns>True if value successfully sets; otherwise, false</returns>
|
||||
public override bool Poke(string value)
|
||||
{
|
||||
try
|
||||
|
@ -86,9 +73,6 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the Watch (read it from <see cref="MemoryDomain"/>
|
||||
/// </summary>
|
||||
public override void Update(PreviousType previousType)
|
||||
{
|
||||
switch (previousType)
|
||||
|
@ -137,40 +121,18 @@ namespace BizHawk.Client.Common
|
|||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of difference
|
||||
/// between current value and the previous one
|
||||
/// </summary>
|
||||
public override string Diff => $"{_value - _previous:+#;-#;0}";
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the Watch is valid, false otherwise
|
||||
/// </summary>
|
||||
public override bool IsValid => Domain.Size == 0 || Address < (Domain.Size - 1);
|
||||
|
||||
/// <summary>
|
||||
/// Get the maximum possible value
|
||||
/// </summary>
|
||||
public override uint MaxValue => ushort.MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current value
|
||||
/// </summary>
|
||||
public override int Value => GetWord();
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of the current value
|
||||
/// </summary>
|
||||
public override string ValueString => FormatValue(GetWord());
|
||||
|
||||
/// <summary>
|
||||
/// Get the previous value
|
||||
/// </summary>
|
||||
public override uint Previous => _previous;
|
||||
|
||||
/// <summary>
|
||||
/// Get a string representation of the previous value
|
||||
/// </summary>
|
||||
public override string PreviousStr => FormatValue(_previous);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue