Changeset 246 for Include/Classes/System/Diagnostics/Debug.ab
- Timestamp:
- May 12, 2007, 6:31:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Diagnostics/Debug.ab
r69 r246 1 Namespace System 2 Namespace Diagnostics 3 4 1 5 #ifdef _DEBUG 2 6 3 Class Debug4 Static base As _System_TraceBase()5 6 Public7 8 '----------------------------------------------------------------9 ' パブリック メソッド10 '----------------------------------------------------------------11 12 ' アサート(コールスタックを表示)13 Static Sub Assert( condition As Boolean )14 base.Assert( condition )15 End Sub16 17 ' アサート(メッセージ文字列を表示)18 Static Sub Assert( condition As Boolean, message As String )19 base.Assert( condition, message )20 End Sub21 22 ' アサート(メッセージ文字列と詳細文字列を表示)23 Static Sub Assert( condition As Boolean, message As String, detailMessage As String )24 base.Assert( condition, message, detailMessage )25 End Sub26 27 28 ' インデントレベルを上げる29 Static Sub Indent()30 base.Indent()31 End Sub32 33 ' インデントレベルを下げる34 Static Sub Unindent()35 base.Unindent()36 End Sub37 38 ' 文字列を出力39 Static Sub Write( value As Object )40 base.Write( value )41 End Sub42 Static Sub Write( message As String )43 base.Write( message )44 End Sub45 Static Sub Write( value As Object, category As String )46 base.Write( value, category )47 End Sub48 Static Sub Write( message As String, category As String )49 base.Write( message, category )50 End Sub51 52 ' 一行の文字列を出力53 Static Sub WriteLine( value As Object )54 base.WriteLine( value )55 End Sub56 Static Sub WriteLine( message As String )57 base.WriteLine( message )58 End Sub59 Static Sub WriteLine( value As Object, category As String )60 base.WriteLine( value, category )61 End Sub62 Static Sub WriteLine( message As String, category As String )63 base.WriteLine( message, category )64 End Sub65 66 ' 条件をもとに文字列を出力67 Static Sub WriteIf( condition As Boolean, value As Object )68 base.WriteIf( condition, value )69 End Sub70 Static Sub WriteIf( condition As Boolean, message As String )71 base.WriteIf( condition, message )72 End Sub73 Static Sub WriteIf( condition As Boolean, value As Object, category As String )74 base.WriteIf( condition, value, category )75 End Sub76 Static Sub WriteIf( condition As Boolean, message As String, category As String )77 base.WriteIf( condition, message, category )78 End Sub79 80 ' 条件をもとに一行の文字列を出力81 Static Sub WriteLineIf( condition As Boolean, message As String )82 base.WriteLineIf( condition, message )83 End Sub84 Static Sub WriteLineIf( condition As Boolean, value As Object )85 base.WriteLineIf( condition, value )86 End Sub87 Static Sub WriteLineIf( condition As Boolean, value As Object, category As String )88 base.WriteLineIf( condition, value, category )89 End Sub90 Static Sub WriteLineIf( condition As Boolean, message As String, category As String )91 base.WriteLineIf( condition, message, category )92 End Sub93 94 95 '----------------------------------------------------------------96 ' パブリック プロパティ97 '----------------------------------------------------------------98 99 ' IndentLevelプロパティ100 Static Function IndentLevel() As Long101 Return base.IndentLevel102 End Function103 Static Sub IndentLevel( indentLevel As Long )104 base.IndentLevel = indentLevel105 End Sub106 107 ' IndentSizeプロパティ108 Static Function IndentSize() As Long109 Return base.IndentSize110 End Function111 Static Sub IndentSize( size As Long )112 base.IndentSize = size113 End Sub114 115 ' Listenersプロパティ116 Static Function Listeners() As TraceListenerCollection117 Return base.Listeners118 End Function119 End Class7 Class Debug 8 Static base As _System_TraceBase() 9 10 Public 11 12 '---------------------------------------------------------------- 13 ' パブリック メソッド 14 '---------------------------------------------------------------- 15 16 ' アサート(コールスタックを表示) 17 Static Sub Assert( condition As Boolean ) 18 base.Assert( condition ) 19 End Sub 20 21 ' アサート(メッセージ文字列を表示) 22 Static Sub Assert( condition As Boolean, message As String ) 23 base.Assert( condition, message ) 24 End Sub 25 26 ' アサート(メッセージ文字列と詳細文字列を表示) 27 Static Sub Assert( condition As Boolean, message As String, detailMessage As String ) 28 base.Assert( condition, message, detailMessage ) 29 End Sub 30 31 32 ' インデントレベルを上げる 33 Static Sub Indent() 34 base.Indent() 35 End Sub 36 37 ' インデントレベルを下げる 38 Static Sub Unindent() 39 base.Unindent() 40 End Sub 41 42 ' 文字列を出力 43 Static Sub Write( value As Object ) 44 base.Write( value ) 45 End Sub 46 Static Sub Write( message As String ) 47 base.Write( message ) 48 End Sub 49 Static Sub Write( value As Object, category As String ) 50 base.Write( value, category ) 51 End Sub 52 Static Sub Write( message As String, category As String ) 53 base.Write( message, category ) 54 End Sub 55 56 ' 一行の文字列を出力 57 Static Sub WriteLine( value As Object ) 58 base.WriteLine( value ) 59 End Sub 60 Static Sub WriteLine( message As String ) 61 base.WriteLine( message ) 62 End Sub 63 Static Sub WriteLine( value As Object, category As String ) 64 base.WriteLine( value, category ) 65 End Sub 66 Static Sub WriteLine( message As String, category As String ) 67 base.WriteLine( message, category ) 68 End Sub 69 70 ' 条件をもとに文字列を出力 71 Static Sub WriteIf( condition As Boolean, value As Object ) 72 base.WriteIf( condition, value ) 73 End Sub 74 Static Sub WriteIf( condition As Boolean, message As String ) 75 base.WriteIf( condition, message ) 76 End Sub 77 Static Sub WriteIf( condition As Boolean, value As Object, category As String ) 78 base.WriteIf( condition, value, category ) 79 End Sub 80 Static Sub WriteIf( condition As Boolean, message As String, category As String ) 81 base.WriteIf( condition, message, category ) 82 End Sub 83 84 ' 条件をもとに一行の文字列を出力 85 Static Sub WriteLineIf( condition As Boolean, message As String ) 86 base.WriteLineIf( condition, message ) 87 End Sub 88 Static Sub WriteLineIf( condition As Boolean, value As Object ) 89 base.WriteLineIf( condition, value ) 90 End Sub 91 Static Sub WriteLineIf( condition As Boolean, value As Object, category As String ) 92 base.WriteLineIf( condition, value, category ) 93 End Sub 94 Static Sub WriteLineIf( condition As Boolean, message As String, category As String ) 95 base.WriteLineIf( condition, message, category ) 96 End Sub 97 98 99 '---------------------------------------------------------------- 100 ' パブリック プロパティ 101 '---------------------------------------------------------------- 102 103 ' IndentLevelプロパティ 104 Static Function IndentLevel() As Long 105 Return base.IndentLevel 106 End Function 107 Static Sub IndentLevel( indentLevel As Long ) 108 base.IndentLevel = indentLevel 109 End Sub 110 111 ' IndentSizeプロパティ 112 Static Function IndentSize() As Long 113 Return base.IndentSize 114 End Function 115 Static Sub IndentSize( size As Long ) 116 base.IndentSize = size 117 End Sub 118 119 ' Listenersプロパティ 120 Static Function Listeners() As TraceListenerCollection 121 Return base.Listeners 122 End Function 123 End Class 120 124 121 125 #else 122 126 123 Class Debug124 Static base As _System_TraceBase()125 126 Public127 128 '----------------------------------------------------------------129 ' パブリック メソッド130 '----------------------------------------------------------------131 132 ' アサート(コールスタックを表示)133 Static Sub Assert( condition As Boolean )134 'base.Assert( condition )135 End Sub136 137 ' アサート(メッセージ文字列を表示)138 Static Sub Assert( condition As Boolean, message As String )139 'base.Assert( condition, message )140 End Sub141 142 ' アサート(メッセージ文字列と詳細文字列を表示)143 Static Sub Assert( condition As Boolean, message As String, detailMessage As String )144 'base.Assert( condition, message, detailMessage )145 End Sub146 147 148 ' インデントレベルを上げる149 Static Sub Indent()150 base.Indent()151 End Sub152 153 ' インデントレベルを下げる154 Static Sub Unindent()155 base.Unindent()156 End Sub157 158 ' 文字列を出力159 Static Sub Write( value As Object )160 'base.Write( value )161 End Sub162 Static Sub Write( message As String )163 'base.Write( message )164 End Sub165 Static Sub Write( value As Object, category As String )166 'base.Write( value, category )167 End Sub168 Static Sub Write( message As String, category As String )169 'base.Write( message, category )170 End Sub171 172 ' 一行の文字列を出力173 Static Sub WriteLine( value As Object )174 'base.WriteLine( value )175 End Sub176 Static Sub WriteLine( message As String )177 'base.WriteLine( message )178 End Sub179 Static Sub WriteLine( value As Object, category As String )180 'base.WriteLine( value, category )181 End Sub182 Static Sub WriteLine( message As String, category As String )183 'base.WriteLine( message, category )184 End Sub185 186 ' 条件をもとに文字列を出力187 Static Sub WriteIf( condition As Boolean, value As Object )188 'base.WriteIf( condition, value )189 End Sub190 Static Sub WriteIf( condition As Boolean, message As String )191 'base.WriteIf( condition, message )192 End Sub193 Static Sub WriteIf( condition As Boolean, value As Object, category As String )194 'base.WriteIf( condition, value, category )195 End Sub196 Static Sub WriteIf( condition As Boolean, message As String, category As String )197 'base.WriteIf( condition, message, category )198 End Sub199 200 ' 条件をもとに一行の文字列を出力201 Static Sub WriteLineIf( condition As Boolean, message As String )202 'base.WriteLineIf( condition, message )203 End Sub204 Static Sub WriteLineIf( condition As Boolean, value As Object )205 'base.WriteLineIf( condition, value )206 End Sub207 Static Sub WriteLineIf( condition As Boolean, value As Object, category As String )208 'base.WriteLineIf( condition, value, category )209 End Sub210 Static Sub WriteLineIf( condition As Boolean, message As String, category As String )211 'base.WriteLineIf( condition, message, category )212 End Sub213 214 215 '----------------------------------------------------------------216 ' パブリック プロパティ217 '----------------------------------------------------------------218 219 ' IndentLevelプロパティ220 Static Function IndentLevel() As Long221 Return base.IndentLevel222 End Function223 Static Sub IndentLevel( indentLevel As Long )224 base.IndentLevel = indentLevel225 End Sub226 227 ' IndentSizeプロパティ228 Static Function IndentSize() As Long229 Return base.IndentSize230 End Function231 Static Sub IndentSize( size As Long )232 base.IndentSize = size233 End Sub234 235 ' Listenersプロパティ236 Static Function Listeners() As TraceListenerCollection237 Return base.Listeners238 End Function239 End Class127 Class Debug 128 Static base As _System_TraceBase() 129 130 Public 131 132 '---------------------------------------------------------------- 133 ' パブリック メソッド 134 '---------------------------------------------------------------- 135 136 ' アサート(コールスタックを表示) 137 Static Sub Assert( condition As Boolean ) 138 'base.Assert( condition ) 139 End Sub 140 141 ' アサート(メッセージ文字列を表示) 142 Static Sub Assert( condition As Boolean, message As String ) 143 'base.Assert( condition, message ) 144 End Sub 145 146 ' アサート(メッセージ文字列と詳細文字列を表示) 147 Static Sub Assert( condition As Boolean, message As String, detailMessage As String ) 148 'base.Assert( condition, message, detailMessage ) 149 End Sub 150 151 152 ' インデントレベルを上げる 153 Static Sub Indent() 154 base.Indent() 155 End Sub 156 157 ' インデントレベルを下げる 158 Static Sub Unindent() 159 base.Unindent() 160 End Sub 161 162 ' 文字列を出力 163 Static Sub Write( value As Object ) 164 'base.Write( value ) 165 End Sub 166 Static Sub Write( message As String ) 167 'base.Write( message ) 168 End Sub 169 Static Sub Write( value As Object, category As String ) 170 'base.Write( value, category ) 171 End Sub 172 Static Sub Write( message As String, category As String ) 173 'base.Write( message, category ) 174 End Sub 175 176 ' 一行の文字列を出力 177 Static Sub WriteLine( value As Object ) 178 'base.WriteLine( value ) 179 End Sub 180 Static Sub WriteLine( message As String ) 181 'base.WriteLine( message ) 182 End Sub 183 Static Sub WriteLine( value As Object, category As String ) 184 'base.WriteLine( value, category ) 185 End Sub 186 Static Sub WriteLine( message As String, category As String ) 187 'base.WriteLine( message, category ) 188 End Sub 189 190 ' 条件をもとに文字列を出力 191 Static Sub WriteIf( condition As Boolean, value As Object ) 192 'base.WriteIf( condition, value ) 193 End Sub 194 Static Sub WriteIf( condition As Boolean, message As String ) 195 'base.WriteIf( condition, message ) 196 End Sub 197 Static Sub WriteIf( condition As Boolean, value As Object, category As String ) 198 'base.WriteIf( condition, value, category ) 199 End Sub 200 Static Sub WriteIf( condition As Boolean, message As String, category As String ) 201 'base.WriteIf( condition, message, category ) 202 End Sub 203 204 ' 条件をもとに一行の文字列を出力 205 Static Sub WriteLineIf( condition As Boolean, message As String ) 206 'base.WriteLineIf( condition, message ) 207 End Sub 208 Static Sub WriteLineIf( condition As Boolean, value As Object ) 209 'base.WriteLineIf( condition, value ) 210 End Sub 211 Static Sub WriteLineIf( condition As Boolean, value As Object, category As String ) 212 'base.WriteLineIf( condition, value, category ) 213 End Sub 214 Static Sub WriteLineIf( condition As Boolean, message As String, category As String ) 215 'base.WriteLineIf( condition, message, category ) 216 End Sub 217 218 219 '---------------------------------------------------------------- 220 ' パブリック プロパティ 221 '---------------------------------------------------------------- 222 223 ' IndentLevelプロパティ 224 Static Function IndentLevel() As Long 225 Return base.IndentLevel 226 End Function 227 Static Sub IndentLevel( indentLevel As Long ) 228 base.IndentLevel = indentLevel 229 End Sub 230 231 ' IndentSizeプロパティ 232 Static Function IndentSize() As Long 233 Return base.IndentSize 234 End Function 235 Static Sub IndentSize( size As Long ) 236 base.IndentSize = size 237 End Sub 238 239 ' Listenersプロパティ 240 Static Function Listeners() As TraceListenerCollection 241 Return base.Listeners 242 End Function 243 End Class 240 244 241 245 #endif 246 247 End Namespace 248 End Namespace
Note:
See TracChangeset
for help on using the changeset viewer.