Skip to main content
Namespace: OpenTD.Results.Dataset
Assembly: OpenTD.Results.dll
Data is returned from Datasets in the form of DataArrays, which in addition to containing the actual data, also know the physical dimension of the data, what units it is in, and have a reference to the Dataset it came from. Use the GetValues methods to get the data as lists of doubles, or use DataArrays directly as inputs to SimplePlots.

Inheritance

object ← DataArray

Derived

DerivedDataArray

Implements

IEnumerable<double>, IEnumerable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

DataArray(DataItemIdentifier, IEnumerable<double>, UnitsData)

Parameters

dataItem DataItemIdentifier values IEnumerable<double> units UnitsData

DataArray()

DataArray(IEnumerable<double>)

Initializes a new instance of the DataArray class, assuming dimensionless data.

Parameters

values IEnumerable<double> The values.

DataArray(DataSubtype, IEnumerable<double>, UnitsData, ItemIdentifier)

Parameters

subtype DataSubtype values IEnumerable<double> units UnitsData item ItemIdentifier

DataArray(DataArray)

Parameters

x DataArray

Fields

ValuesSI

Field Value

List<double>

Properties

AutoCommenter

Property Value

AutoCommenter

AutoNamer

Property Value

AutoNamer

Comment

Property Value

string

Count

The number of items in this DataArray.

Property Value

int

Dimension

The physical dimension of this data.

Property Value

UnitsData.UnitsType

InternalSuggestedComment

Property Value

string

InternalSuggestedName

Property Value

string

IsInteger

Returns true if the subtype of this data represents integer data.

Property Value

bool

Name

Property Value

string

SourceDataItem

Combines the SourceItem and Subtype. If either are null, this is null.

Property Value

DataItemIdentifier

SourceDataset

The source Dataset for this data.

Property Value

IDataset

SourceItem

Identifies the item (node, lump, register, etc.) this data came from.

Property Value

ItemIdentifier

Subtype

The DataSubtype (T, TL, PL, GTX, etc.)

Property Value

DataSubtype

this[int]

Property Value

double

Methods

CheckData()

GetEnumerator()

Returns an enumerator that iterates through the collection.

Returns

IEnumerator<double> An enumerator that can be used to iterate through the collection.

GetSelfSuggestedComment()

Returns

string

GetSelfSuggestedName()

Returns

string

GetValues()

Gets the data in the current WorkingUnits.

Returns

List<double> List<System.Double>.

See Also

Units.WorkingUnits

GetValues(UnitsData)

Gets the data in the units provided.

Parameters

units UnitsData The units to return the data in.

Returns

List<double> List<System.Double>.

SetValues(IEnumerable<double>, DataSubtype, UnitsData, ItemIdentifier)

Parameters

values IEnumerable<double> subtype DataSubtype units UnitsData item ItemIdentifier

ToString()

Returns a string that represents the current object.

Returns

string A string that represents the current object.

Operators

implicit operator List<double>(DataArray)

Parameters

x DataArray

Returns

List<double>

implicit operator List<DataArray>(DataArray)

Parameters

x DataArray

Returns

List<DataArray>

See Also

Dataset, IAutoName, SimplePlot