CVB.Net 14.0
InfoCollection< TParent, TInfo > Class Template Referenceabstract

Generic collection of information objects. More...

Inherits IEnumerable< TInfo >, and IEnumerable.

Inherited by TrainingSet.TrainingSetObjectInfoCollection< TParent, TInfo >.

Public Member Functions

TInfo[] ToArray ()
 Converts this collection into an array. More...
 

Protected Member Functions

 InfoCollection (TParent parent)
 Constructor. More...
 
abstract int GetCount ()
 Function with which the collection queries the number of elements More...
 
abstract TInfo GetInfo (int index)
 Function with which the collection retrieves the information object with the given index. More...
 

Protected Attributes

readonly TParent Parent
 Parent image reference helps keeping track of the lifetime and provides the information basis for index access
 

Properties

int Count [get]
 Number of elements in the collection. More...
 

Detailed Description

Generic collection of information objects.

Template Parameters
TInfoType of the information container.
TParentType of the collection parent.
Type Constraints
TParent :INativeHandle 

Constructor & Destructor Documentation

◆ InfoCollection()

InfoCollection ( TParent  parent)
protected

Constructor.

Parameters
parentThe parent object.

Member Function Documentation

◆ GetCount()

abstract int GetCount ( )
protectedpure virtual

Function with which the collection queries the number of elements

Returns
The number of entries in the collection.

Implemented in ImagePlaneCollection, Classifier.ClassInformationCollection, SampleImageList.ClassInformationCollection, Classifier.ModelInformationCollection, and SampleList.LabelInfoCollection< TLabelInformation, TData >.

◆ GetInfo()

abstract TInfo GetInfo ( int  index)
protectedpure virtual

Function with which the collection retrieves the information object with the given index.

Parameters
indexIndex at which to retrieve
Returns
retrieved object
Exceptions
ArgumentOutOfRangeExceptionIf the index exceeds the range [0...Count[.

Implemented in ImagePlaneCollection, Classifier.ClassInformationCollection, SampleImageList.ClassInformationCollection, Classifier.ModelInformationCollection, and SampleRegressionImageList.ImageRegressionInfoCollection.

◆ ToArray()

TInfo[] ToArray ( )

Converts this collection into an array.

Returns
Array containing the members of this collection.

Property Documentation

◆ Count

int Count
get

Number of elements in the collection.

Exceptions
ObjectDisposedExceptionIf the parent object has already been disposed of