Changeset 66 for Include/Classes
- Timestamp:
- Jan 17, 2007, 3:44:54 AM (18 years ago)
- Location:
- Include/Classes/System/Diagnostics
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Diagnostics/Trace.ab
r58 r66 1 2 3 ' リスナコレクション4 Class TraceListenerCollection5 ppListeners As **TraceListener6 count As Long7 Public8 9 Sub TraceListenerCollection()10 ppListeners = _System_malloc( 1 )11 End Sub12 Sub ~TraceListenerCollection()13 Dim i As Long14 For i = 0 To ELM( count )15 Delete ppListeners[i]16 Next17 _System_free( ppListeners )18 End Sub19 20 '----------------------------------------------------------------21 ' パブリック メソッド22 '----------------------------------------------------------------23 24 ' リスナを追加25 Sub Add( listener As TraceListener ) As Long26 ppListeners = _System_realloc( ppListeners, ( count + 1 ) * SizeOf( *TraceListener ) )27 ppListeners[count] = New TraceListener( listener )28 count++29 End Sub30 31 ' 複数のリスナを追加32 Sub AddRange( listeners As TraceListenerCollection )33 ' TODO: 実装34 End Sub35 36 ' リストからすべてのリスナを削除37 Sub Clear()38 ' TODO: 実装39 End Sub40 41 ' 指定したリスナのインデックスを取得42 Function IndexOf( listener As TraceListener )43 ' TODO: 実装44 End Function45 46 ' リスナを挿入47 Sub Insert( index As Long, listener As TraceListener )48 ' TODO: 実装49 End Sub50 51 ' リスナを削除52 Function Remove( name As String )53 ' TODO: 実装54 End Function55 Function Remove( listener As TraceListener )56 ' TODO: 実装57 End Function58 59 60 '----------------------------------------------------------------61 ' パブリック プロパティ62 '----------------------------------------------------------------63 64 ' インデクサ ( Getter )65 Function Operator[] ( index As Long ) As TraceListener66 If index < 0 or count <= index Then67 ' TODO: エラー処理68 debug69 End If70 71 Dim tempListener As TraceListener( ByVal ppListeners[index] )72 Return tempListener73 End Function74 75 ' 保有するリスナの数を取得する76 Function Count() As Long77 Return count78 End Function79 End Class80 1 81 2 Class Trace … … 181 102 182 103 End Class 104 105 Dim _System_defaultTraceListener As DefaultTraceListener 106 Trace.Listeners.Add( _System_defaultTraceListener ) -
Include/Classes/System/Diagnostics/index.ab
r58 r66 1 #include "Debug.ab" 2 #include "Trace.ab" 3 #include "TraceListener.ab" 1 #require "Debug.ab" 2 #require "Trace.ab" 3 #require "TraceListener.ab" 4 #require "TraceListenerCollection.ab"
Note:
See TracChangeset
for help on using the changeset viewer.