VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "Events"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa Events
Private numLanes As Integer
Private swimmers As New Collection  'Lista zawodników
'-----
Public Sub init(Filename As String, lanes As Integer)
  Dim f As Integer, s As String
  Dim sw As Swimmer
  Dim fl As New vbFile
  'Przeczytaj plik podczas inicjalizacji obiektu
  f = FreeFile
  numLanes = lanes
  Set swimmers = New Collection
  'Wczytaj dane o zawodnikach
  Filename = App.Path & "\" & Filename
  fl.OpenForRead Filename
  s = fl.readLine
                  
  While (Not fl.fEof)
    Set sw = New Swimmer    'Utwórz obiekt reprezentujący zawodnika
    sw.init s               'I zainicjuj go
    swimmers.Add sw         'Po czym dodaj do listy zawodników
    s = fl.readLine         'Wczytaj kolejnego
  Wend
  Close #f
End Sub
'-----
Public Function getSwimmers() As Collection
  Set getSwimmers = swimmers
End Function
'-----
Public Function isPrelim() As Boolean
End Function
'-----
Public Function isFinal() As Boolean
End Function
'-----
Public Function isTimedFinal() As Boolean
End Function
'-----
Public Function getSeeding() As Seeding
End Function
