42cf5bc1 |
1 | // Created on: 2007-07-31 |
2 | // Created by: OCC Team |
3 | // Copyright (c) 2007-2014 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
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 |
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. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _Draw_Printer_HeaderFile |
17 | #define _Draw_Printer_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_Type.hxx> |
21 | |
22 | #include <Standard_Address.hxx> |
23 | #include <Message_Printer.hxx> |
24 | #include <Draw_Interpretor.hxx> |
25 | #include <Message_Gravity.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <Standard_CString.hxx> |
28 | class TCollection_ExtendedString; |
29 | class TCollection_AsciiString; |
30 | |
31 | |
32 | class Draw_Printer; |
33 | DEFINE_STANDARD_HANDLE(Draw_Printer, Message_Printer) |
34 | |
35 | //! Implementation of Printer class with output |
36 | //! (Message_Messenge) directed to Draw_Interpretor |
37 | class Draw_Printer : public Message_Printer |
38 | { |
39 | |
40 | public: |
41 | |
42 | |
43 | //! Creates a printer connected to the interpretor. |
44 | Standard_EXPORT Draw_Printer(const Draw_Interpretor& theTcl); |
45 | |
46 | //! Send a string message with specified trace level. |
47 | //! The parameter putEndl specified whether end-of-line |
48 | //! should be added to the end of the message. |
49 | //! This method must be redefined in descentant. |
50 | Standard_EXPORT virtual void Send (const TCollection_ExtendedString& theString, const Message_Gravity theGravity, const Standard_Boolean putEndl) const Standard_OVERRIDE; |
51 | |
52 | //! Send a string message with specified trace level. |
53 | //! The parameter putEndl specified whether end-of-line |
54 | //! should be added to the end of the message. |
55 | //! Default implementation calls first method Send(). |
56 | Standard_EXPORT virtual void Send (const Standard_CString theString, const Message_Gravity theGravity, const Standard_Boolean putEndl) const Standard_OVERRIDE; |
57 | |
58 | //! Send a string message with specified trace level. |
59 | //! The parameter putEndl specified whether end-of-line |
60 | //! should be added to the end of the message. |
61 | //! Default implementation calls first method Send(). |
62 | Standard_EXPORT virtual void Send (const TCollection_AsciiString& theString, const Message_Gravity theGravity, const Standard_Boolean putEndl) const Standard_OVERRIDE; |
63 | |
64 | |
65 | |
66 | |
92efcf78 |
67 | DEFINE_STANDARD_RTTIEXT(Draw_Printer,Message_Printer) |
42cf5bc1 |
68 | |
69 | protected: |
70 | |
71 | |
72 | |
73 | |
74 | private: |
75 | |
76 | |
77 | Standard_Address myTcl; |
78 | |
79 | |
80 | }; |
81 | |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | #endif // _Draw_Printer_HeaderFile |