source: Include/Classes/System/Diagnostics/Trace.ab@ 164

Last change on this file since 164 was 69, checked in by dai, 18 years ago

Trace/Debugクラスを実装(リスナ系にちょっとTODOが残っている…)。

File size: 3.4 KB
RevLine 
[45]1
[43]2Class Trace
[69]3 Static base As _System_TraceBase()
[44]4
[43]5Public
[44]6
[45]7 '----------------------------------------------------------------
8 ' パブリック メソッド
9 '----------------------------------------------------------------
[44]10
[45]11 ' アサート(コールスタックを表示)
[44]12 Static Sub Assert( condition As Boolean )
[69]13 base.Assert( condition )
[44]14 End Sub
[45]15
16 ' アサート(メッセージ文字列を表示)
[44]17 Static Sub Assert( condition As Boolean, message As String )
[69]18 base.Assert( condition, message )
[44]19 End Sub
20
[45]21 ' アサート(メッセージ文字列と詳細文字列を表示)
22 Static Sub Assert( condition As Boolean, message As String, detailMessage As String )
[69]23 base.Assert( condition, message, detailMessage )
[45]24 End Sub
25
26
[44]27 ' インデントレベルを上げる
28 Static Sub Indent()
[69]29 base.Indent()
[44]30 End Sub
31
32 ' インデントレベルを下げる
33 Static Sub Unindent()
[69]34 base.Unindent()
[44]35 End Sub
36
[69]37 ' 文字列を出力
38 Static Sub Write( value As Object )
39 base.Write( value )
40 End Sub
[58]41 Static Sub Write( message As String )
[69]42 base.Write( message )
[58]43 End Sub
[69]44 Static Sub Write( value As Object, category As String )
45 base.Write( value, category )
46 End Sub
47 Static Sub Write( message As String, category As String )
48 base.Write( message, category )
49 End Sub
[58]50
[44]51 ' 一行の文字列を出力
[69]52 Static Sub WriteLine( value As Object )
53 base.WriteLine( value )
54 End Sub
[43]55 Static Sub WriteLine( message As String )
[69]56 base.WriteLine( message )
[43]57 End Sub
[69]58 Static Sub WriteLine( value As Object, category As String )
59 base.WriteLine( value, category )
60 End Sub
61 Static Sub WriteLine( message As String, category As String )
62 base.WriteLine( message, category )
63 End Sub
[45]64
[69]65 ' 条件をもとに文字列を出力
66 Static Sub WriteIf( condition As Boolean, value As Object )
67 base.WriteIf( condition, value )
68 End Sub
69 Static Sub WriteIf( condition As Boolean, message As String )
70 base.WriteIf( condition, message )
71 End Sub
72 Static Sub WriteIf( condition As Boolean, value As Object, category As String )
73 base.WriteIf( condition, value, category )
74 End Sub
75 Static Sub WriteIf( condition As Boolean, message As String, category As String )
76 base.WriteIf( condition, message, category )
77 End Sub
[45]78
[69]79 ' 条件をもとに一行の文字列を出力
80 Static Sub WriteLineIf( condition As Boolean, message As String )
81 base.WriteLineIf( condition, message )
82 End Sub
83 Static Sub WriteLineIf( condition As Boolean, value As Object )
84 base.WriteLineIf( condition, value )
85 End Sub
86 Static Sub WriteLineIf( condition As Boolean, value As Object, category As String )
87 base.WriteLineIf( condition, value, category )
88 End Sub
89 Static Sub WriteLineIf( condition As Boolean, message As String, category As String )
90 base.WriteLineIf( condition, message, category )
91 End Sub
92
93
[45]94 '----------------------------------------------------------------
95 ' パブリック プロパティ
96 '----------------------------------------------------------------
97
98 ' IndentLevelプロパティ
99 Static Function IndentLevel() As Long
[69]100 Return base.IndentLevel
[45]101 End Function
[58]102 Static Sub IndentLevel( indentLevel As Long )
[69]103 base.IndentLevel = indentLevel
[45]104 End Sub
105
106 ' IndentSizeプロパティ
107 Static Function IndentSize() As Long
[69]108 Return base.IndentSize
[45]109 End Function
110 Static Sub IndentSize( size As Long )
[69]111 base.IndentSize = size
[45]112 End Sub
113
[69]114 ' Listenersプロパティ
115 Static Function Listeners() As TraceListenerCollection
116 Return base.Listeners
117 End Function
118
[43]119End Class
Note: See TracBrowser for help on using the repository browser.