Добавил:
Upload
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:VB-2012 / 2-cеместр / Дневники / Самостоятельная работа / Деревья / BTNODE
.CLS VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "BtreeNode"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
' ************************************************
' BtNode.CLS
'
' BtreeNode class for B-tree example program.
' ************************************************
' Copyright (C) 1997 John Wiley & Sons, Inc.
' All rights reserved. See additional copyright
' information in RIGHTS.TXT.
' ************************************************
Option Explicit
Public NumKeys As Integer ' # keys in use.
Private m_Key(1 To KEYS_PER_NODE) As String ' Key values.
Private m_Child(0 To KEYS_PER_NODE) As BtreeNode ' Child pointers.
Property Get Key(ByVal Index As Integer) As String
Key = m_Key(Index)
End Property
Property Get Child(ByVal Index As Integer) As BtreeNode
Set Child = m_Child(Index)
End Property
Property Let Key(ByVal Index As Integer, value As String)
m_Key(Index) = value
End Property
Property Set Child(ByVal Index As Integer, value As BtreeNode)
Set m_Child(Index) = value
End Property
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "BtreeNode"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
' ************************************************
' BtNode.CLS
'
' BtreeNode class for B-tree example program.
' ************************************************
' Copyright (C) 1997 John Wiley & Sons, Inc.
' All rights reserved. See additional copyright
' information in RIGHTS.TXT.
' ************************************************
Option Explicit
Public NumKeys As Integer ' # keys in use.
Private m_Key(1 To KEYS_PER_NODE) As String ' Key values.
Private m_Child(0 To KEYS_PER_NODE) As BtreeNode ' Child pointers.
Property Get Key(ByVal Index As Integer) As String
Key = m_Key(Index)
End Property
Property Get Child(ByVal Index As Integer) As BtreeNode
Set Child = m_Child(Index)
End Property
Property Let Key(ByVal Index As Integer, value As String)
m_Key(Index) = value
End Property
Property Set Child(ByVal Index As Integer, value As BtreeNode)
Set m_Child(Index) = value
End Property
Соседние файлы в папке Деревья