VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Kids"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa Kids
Private kidList As Collection
Private index As Integer

Public Sub init(Filename As String)
  Dim sline As String             'Wiersz wczytany z pliku
  Dim vbf As New vbFile           'Instancja klasy File
  Dim kd As Kid
  Set kidList = New Collection
  vbf.OpenForRead Filename        'Otwórz plik
  While Not vbf.fEof              'Wczytaj wiersz
    sline = vbf.readLine
    Set kd = New Kid
    kd.init sline                 'Umieść dane w instancji klasy Kid
    kidList.Add kd                'I dodaj je do kolekcji
  Wend
  vbf.closeFile
End Sub

Public Function getIterator() As Iterator
  Dim kiter As New KidIterator    'Utwórz iterator
  kiter.init kidList              'Zainicjuj go
  Set getIterator = kiter         'I zwróć
End Function

Public Function getClubIterator(clb As String) As Iterator
  Dim kiter As New KidClubIterator 'Utwórz iterator
  kiter.init kidList, clb         'Zainicjuj go
  Set getClubIterator = kiter     'I zwróć
End Function
