Changeset 147
- Timestamp:
- Mar 11, 2007, 4:40:51 AM (18 years ago)
- Location:
- Include/Classes/System/Diagnostics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Diagnostics/TraceListener.ab
r69 r147 30 30 ' コピーコンストラクタ 31 31 Sub TraceListener( ByRef listener As TraceListener ) 32 memcpy( VarPtr( This ), VarPtr( listener ), SizeOf( TraceListener ) ) 32 indentLevel = listener.indentLevel 33 indentSize = listener.indentSize 33 34 End Sub 34 35 -
Include/Classes/System/Diagnostics/TraceListenerCollection.ab
r79 r147 1 1 ' リスナコレクション 2 2 Class TraceListenerCollection 3 p pListeners As **TraceListener3 pListeners As *TraceListener 4 4 count As Long 5 5 Public 6 6 7 7 Sub TraceListenerCollection() 8 p pListeners = _System_malloc( 1 )8 pListeners = _System_malloc( 1 ) 9 9 End Sub 10 10 Sub ~TraceListenerCollection() 11 Dim i As Long 12 For i = 0 To ELM( count ) 13 Delete ppListeners[i] 14 Next 15 _System_free( ppListeners ) 11 _System_free( pListeners ) 16 12 End Sub 17 13 … … 22 18 ' リスナを追加 23 19 Sub Add( listener As TraceListener ) As Long 24 p pListeners = _System_realloc( ppListeners, ( count + 1 ) * SizeOf( *TraceListener) )25 p pListeners[count] = New TraceListener( listener )20 pListeners = _System_realloc( pListeners, ( count + 1 ) * SizeOf( LONG_PTR ) ) 21 pListeners[count] = listener 26 22 count++ 27 23 End Sub … … 61 57 62 58 ' インデクサ ( Getter ) 63 Function Operator[] ( index As Long ) ByRefAs TraceListener59 Function Operator[] ( index As Long ) As TraceListener 64 60 If index < 0 or count <= index Then 65 61 ' TODO: エラー処理 … … 67 63 End If 68 64 69 Return ByVal ppListeners[index]65 Return pListeners[index] 70 66 End Function 71 67 -
Include/Classes/System/Diagnostics/base.ab
r108 r147 12 12 ' コンストラクタ 13 13 Sub _System_TraceBase() 14 Dim _System_defaultTraceListener As DefaultTraceListener15 listeners.Add( _System_defaultTraceListener )14 Dim defaultTraceListener As DefaultTraceListener 15 listeners.Add( defaultTraceListener ) 16 16 17 17 indentLevel = 0 … … 65 65 Dim i As Long 66 66 For i = 0 To ELM( listeners.Count ) 67 Dim ByReflistener = listeners[i]67 Dim listener = listeners[i] 68 68 listener.Write( value ) 69 69 Next … … 72 72 Dim i As Long 73 73 For i = 0 To ELM( listeners.Count ) 74 Dim ByReflistener = listeners[i]74 Dim listener = listeners[i] 75 75 listener.Write( message ) 76 76 Next … … 79 79 Dim i As Long 80 80 For i = 0 To ELM( listeners.Count ) 81 Dim ByReflistener = listeners[i]81 Dim listener = listeners[i] 82 82 listener.Write( value, category ) 83 83 Next … … 86 86 Dim i As Long 87 87 For i = 0 To ELM( listeners.Count ) 88 Dim ByReflistener = listeners[i]88 Dim listener = listeners[i] 89 89 listener.Write( message, category ) 90 90 Next … … 95 95 Dim i As Long 96 96 For i = 0 To ELM( listeners.Count ) 97 Dim ByReflistener = listeners[i]97 Dim listener = listeners[i] 98 98 listener.WriteLine( value ) 99 99 Next … … 102 102 Dim i As Long 103 103 For i = 0 To ELM( listeners.Count ) 104 Dim ByReflistener = listeners[i]104 Dim listener = listeners[i] 105 105 listener.WriteLine( message ) 106 106 Next … … 109 109 Dim i As Long 110 110 For i = 0 To ELM( listeners.Count ) 111 Dim ByReflistener = listeners[i]111 Dim listener = listeners[i] 112 112 listener.WriteLine( value, category ) 113 113 Next … … 116 116 Dim i As Long 117 117 For i = 0 To ELM( listeners.Count ) 118 Dim ByReflistener = listeners[i]118 Dim listener = listeners[i] 119 119 listener.WriteLine( message, category ) 120 120 Next … … 125 125 Dim i As Long 126 126 For i = 0 To ELM( listeners.Count ) 127 Dim ByReflistener = listeners[i]127 Dim listener = listeners[i] 128 128 listener.WriteIf( condition, value ) 129 129 Next … … 132 132 Dim i As Long 133 133 For i = 0 To ELM( listeners.Count ) 134 Dim ByReflistener = listeners[i]134 Dim listener = listeners[i] 135 135 listener.WriteIf( condition, message ) 136 136 Next … … 139 139 Dim i As Long 140 140 For i = 0 To ELM( listeners.Count ) 141 Dim ByReflistener = listeners[i]141 Dim listener = listeners[i] 142 142 listener.WriteIf( condition, value, category ) 143 143 Next … … 146 146 Dim i As Long 147 147 For i = 0 To ELM( listeners.Count ) 148 Dim ByReflistener = listeners[i]148 Dim listener = listeners[i] 149 149 listener.WriteIf( condition, message, category ) 150 150 Next … … 155 155 Dim i As Long 156 156 For i = 0 To ELM( listeners.Count ) 157 Dim ByReflistener = listeners[i]157 Dim listener = listeners[i] 158 158 listener.WriteLineIf( condition, value ) 159 159 Next … … 162 162 Dim i As Long 163 163 For i = 0 To ELM( listeners.Count ) 164 Dim ByReflistener = listeners[i]164 Dim listener = listeners[i] 165 165 listener.WriteLineIf( condition, message ) 166 166 Next … … 169 169 Dim i As Long 170 170 For i = 0 To ELM( listeners.Count ) 171 Dim ByReflistener = listeners[i]171 Dim listener = listeners[i] 172 172 listener.WriteLineIf( condition, value, category ) 173 173 Next … … 176 176 Dim i As Long 177 177 For i = 0 To ELM( listeners.Count ) 178 Dim ByReflistener = listeners[i]178 Dim listener = listeners[i] 179 179 listener.WriteLineIf( condition, message, category ) 180 180 Next … … 195 195 Dim i As Long 196 196 For i = 0 To ELM( listeners.Count ) 197 Dim ByReflistener = listeners[i]197 Dim listener = listeners[i] 198 198 listener.IndentLevel = indentLevel 199 199 Next … … 209 209 Dim i As Long 210 210 For i = 0 To ELM( listeners.Count ) 211 Dim ByReflistener = listeners[i]211 Dim listener = listeners[i] 212 212 listener.IndentSize = indentSize 213 213 Next
Note:
See TracChangeset
for help on using the changeset viewer.