// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. //============================================================================= // Object that contains informations of signal seen // See sub classes for more information // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // // Date Id Modification // 2006-08-11 The Implemented IsEqual // 2006-10-05 The Implemented STA_Failed in GeoStates // 2006-10-05 The Added Assessment in GeoStates // 2006-10-06 Bas Added bApproved and bCalled // 2006-10-09 The Changed Assessment from property to var // 2006-10-25 The Implemented fraction threshold for report scoring // 2006-12-13 The Added function IsEqualSimple() // 2007-07-11 Wsl Created function Duplicate() //============================================================================= class SignalReport extends Object DependsOn(Signal); var bool bChanged; // If the signal report was first made and edited var bool bReported; // if the signal report was reported correctly var bool bApproved; // if the LAST report for this signal has been approved by the action center var bool bCalled; // if the player has called about the LAST report for this signal // with the action center (regardless whether it was approved or not) var bool bSignalReportUsedInScoreCalculations; //This variable is only used in the calculations of the score. When a SignalReport scores a point in score accuracy this variable is set to true. var GeoEnums.GeoStates Assessment; var GeoEnums.GeoStates GeoState; Enum GeoSizes { SIZE_VerySmall, SIZE_Small, SIZE_Medium, SIZE_MediumLarge, SIZE_Large, SIZE_VeryLarge, SIZE_NONE }; Enum GeoYesNo { GEO_Yes, GEO_No, GEO_NONE }; Enum Quantity { QUA_Little, QUA_Much, QUA_None }; Enum Speed { SPE_Slow, SPE_Fast, SPE_None }; enum WaveStrength { WAVE_Medium, WAVE_Fierce, WAVE_None }; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport Duplicate(class type) { return none; /// #### IMPLEMENTED IN SUBCLASSES, USING GetSignalReportDuplicate() #### /// } //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function SignalReport GetSignalReportDuplicate(class srClass) { local SignalReport returner; returner = new srClass; returner.bChanged = self.bChanged; returner.bCalled = self.bCalled; returner.bApproved = self.bApproved; returner.bReported = self.bReported; returner.bSignalReportUsedInScoreCalculations = self.bSignalReportUsedInScoreCalculations; returner.GeoState = self.GeoState; returner.Assessment = self.Assessment; return returner; } //============================================================================= // Date Id Modification // 2006-12-13 The Created //============================================================================= function bool IsEqualSimple(SignalReport ASignalReport, float AScoreFractionThreshold) { local int LCorrectCount; local int LPossibleCount; return IsEqual(ASignalReport, AScoreFractionThreshold, LCorrectCount, LPossibleCount); } //============================================================================= // Date Id Modification // 2006-08-11 The Created //============================================================================= function bool IsEqual(SignalReport ASignalReport, float AScoreFractionThreshold, out int ACorrectCount, out int APossibleCount) { local bool LIsEqual; ACorrectCount = 0; APossibleCount = 0; APossibleCount++; if (GeoState == ASignalReport.GeoState) { ACorrectCount++; }; LIsEqual = ((1.0 * ACorrectCount / APossibleCount) > AScoreFractionThreshold); //Log("SignalReport.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); //Log("SignalReport.IsEqual(): LIsEqual = "$LIsEqual); return (LIsEqual); } defaultproperties { bChanged=false bCalled=false bReported=false bApproved=false GeoState=STA_NONE Assessment=STA_NONE }