Skip to main content

OpenTD .NET8 reference 2025 R2

OpenTD.Results.Dataset.ICompareData Interface Reference

Last update: 16.07.2025

Represents an algorithm for comparing all data of a single DataSubtype (T, TL, etc.) between two datasets. Objects that implement this interface can be used within Comparer.ComparisonMethods or Comparer.DefaultComparisonMethod. See PercentDifferenceCompareData for an example implementation. More...

Inheritance diagram for OpenTD.Results.Dataset.ICompareData:
OpenTD.Results.Dataset.CompareDataOpenTD.Results.Dataset.PercentDifferenceCompareDataOpenTD.Results.Dataset.PercentDifferenceCompareData

Public Member Functions

void Compare (string name, DataSubtype subtype, IEnumerable< string > commonNames, IEnumerable< long > commonIndicesA, IEnumerable< long > commonIndicesB, bool msgOnSuccess=true)
 This method implements the comparison algorithm.
 

Properties

IComparerInput ComparerInput [get, set]
 The Comparer will send data from the datasets through this member.
 
IComparerOutput ComparerOutput [get, set]
 Send output from the comparison to the Comparer through this member.
 

Detailed Description

Represents an algorithm for comparing all data of a single DataSubtype (T, TL, etc.) between two datasets. Objects that implement this interface can be used within Comparer.ComparisonMethods or Comparer.DefaultComparisonMethod. See PercentDifferenceCompareData for an example implementation.

See also
OpenTD.Results.Dataset.Comparer, OpenTD.Results.Dataset.DataSubtype, OpenTD.Results.Dataset.ICompareData, OpenTD.Results.Dataset.PercentDifferenceCompareData

Member Function Documentation

◆ Compare()

void OpenTD.Results.Dataset.ICompareData.Compare ( string name,
DataSubtype subtype,
IEnumerable< string > commonNames,
IEnumerable< long > commonIndicesA,
IEnumerable< long > commonIndicesB,
bool msgOnSuccess = true )

This method implements the comparison algorithm.

Parameters
nameThis is a descriptive name for the data being compared. Use it in ComparerOutput messages.
subtypeThis is the type of data (T, TL, etc.) to compare.
commonNamesThis is a list of Sinda names (MAIN.1, WALL.100, etc.) of entities that hold data of subtype and are common to both datasets. For example, if subtype is PL, then commonNames would be names of lumps that are common between the datasets. The comparison should be performed over all of the items in this list.
commonIndicesAThese are the internal indices to the commonNames list for Dataset A.
commonIndicesBThese are the internal indices to the commonNames list for Dataset B.
msgOnSuccessIf true, use ComparerOutput to write a message if this comparison is successful.

Implemented in OpenTD.Results.Dataset.CompareData, and OpenTD.Results.Dataset.PercentDifferenceCompareData.

Property Documentation

◆ ComparerInput

IComparerInput OpenTD.Results.Dataset.ICompareData.ComparerInput
getset

The Comparer will send data from the datasets through this member.

Implemented in OpenTD.Results.Dataset.CompareData.

◆ ComparerOutput

IComparerOutput OpenTD.Results.Dataset.ICompareData.ComparerOutput
getset

Send output from the comparison to the Comparer through this member.

Implemented in OpenTD.Results.Dataset.CompareData.


The documentation for this interface was generated from the following file:
  • C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/OpenTD/OpenTD.Results/Dataset/ICompareData.cs

Connect with Ansys