b311480e |
1 | -- Created on: 2001-01-06 |
2 | -- Created by: OCC Team |
973c2be1 |
3 | -- Copyright (c) 2001-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
7 | -- This library is free software; you can redistribute it and/or modify it under |
8 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | -- by the Free Software Foundation, with special exception defined in the file |
10 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | deferred class Printer from Message inherits TShared from MMgt |
17 | |
785a9540 |
18 | ---Purpose: Abstract interface class defining printer as output context for text messages |
19 | -- |
20 | -- The message, besides being text string, has associated gravity |
21 | -- level, which can be used by printer to decide either to process a message or ignore it. |
7fd59977 |
22 | |
23 | uses |
24 | |
785a9540 |
25 | Gravity from Message, |
26 | AsciiString from TCollection, |
27 | ExtendedString from TCollection |
28 | |
7fd59977 |
29 | is |
30 | |
785a9540 |
31 | Initialize returns Printer from Message; |
32 | ---Purpose: Empty constructor with Message_Info trace level |
33 | |
34 | GetTraceLevel (me) returns Gravity from Message; |
35 | ---C++: inline |
36 | ---Purpose: Return trace level used for filtering messages; |
37 | -- messages with lover gravity will be ignored. |
38 | |
39 | SetTraceLevel (me : mutable; |
40 | theTraceLevel : Gravity from Message); |
41 | ---C++: inline |
42 | ---Purpose: Set trace level used for filtering messages. |
43 | -- By default, trace level is Message_Info, so that all messages are output |
44 | |
45 | Send (me; |
46 | theString : ExtendedString from TCollection; |
47 | theGravity : Gravity from Message; |
48 | theToPutEol : Boolean) is deferred; |
49 | ---Purpose: Send a string message with specified trace level. |
50 | -- The parameter theToPutEol specified whether end-of-line should be added to the end of the message. |
51 | -- This method must be redefined in descentant. |
52 | |
53 | Send (me; |
54 | theString : CString; |
55 | theGravity : Gravity from Message; |
56 | theToPutEol : Boolean) is virtual; |
57 | ---Purpose: Send a string message with specified trace level. |
58 | -- The parameter theToPutEol specified whether end-of-line should be added to the end of the message. |
59 | -- Default implementation calls first method Send(). |
60 | |
61 | Send (me; |
62 | theString : AsciiString from TCollection; |
63 | theGravity : Gravity from Message; |
64 | theToPutEol : Boolean) is virtual; |
65 | ---Purpose: Send a string message with specified trace level. |
66 | -- The parameter theToPutEol specified whether end-of-line should be added to the end of the message. |
67 | -- Default implementation calls first method Send(). |
68 | |
69 | fields |
70 | |
71 | myTraceLevel : Gravity from Message is protected; |
7fd59977 |
72 | |
73 | end Printer; |