42cf5bc1 |
1 | // Created on: 1999-07-29 |
2 | // Created by: Roman LYGIN |
3 | // Copyright (c) 1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Message_HeaderFile |
18 | #define _Message_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Integer.hxx> |
25 | #include <Standard_Real.hxx> |
26 | class Message_Messenger; |
27 | class TCollection_AsciiString; |
28 | class Message_Msg; |
29 | class Message_MsgFile; |
30 | class Message_Messenger; |
31 | class Message_Algorithm; |
32 | class Message_Printer; |
33 | class Message_PrinterOStream; |
34 | class Message_ProgressIndicator; |
35 | class Message_ProgressScale; |
36 | class Message_ProgressSentry; |
37 | |
38 | |
39 | //! Defines |
40 | //! - tools to work with messages |
41 | //! - basic tools intended for progress indication |
42 | class Message |
43 | { |
44 | public: |
45 | |
46 | DEFINE_STANDARD_ALLOC |
47 | |
48 | |
49 | //! Defines default messenger for OCCT applications. |
50 | //! This is global static instance of the messenger. |
51 | //! By default, it contains single printer directed to cout. |
52 | //! It can be customized according to the application needs. |
53 | Standard_EXPORT static const Handle(Message_Messenger)& DefaultMessenger(); |
54 | |
55 | //! Returns the string filled with values of hours, minutes and seconds. |
56 | //! Example: |
57 | //! 1. (5, 12, 26.3345) returns "05h:12m:26.33s", |
58 | //! 2. (0, 6, 34.496 ) returns "06m:34.50s", |
59 | //! 3. (0, 0, 4.5 ) returns "4.50s" |
60 | Standard_EXPORT static TCollection_AsciiString FillTime (const Standard_Integer Hour, const Standard_Integer Minute, const Standard_Real Second); |
61 | |
62 | |
63 | |
64 | |
65 | protected: |
66 | |
67 | |
68 | |
69 | |
70 | |
71 | private: |
72 | |
73 | |
74 | |
75 | |
76 | friend class Message_Msg; |
77 | friend class Message_MsgFile; |
78 | friend class Message_Messenger; |
79 | friend class Message_Algorithm; |
80 | friend class Message_Printer; |
81 | friend class Message_PrinterOStream; |
82 | friend class Message_ProgressIndicator; |
83 | friend class Message_ProgressScale; |
84 | friend class Message_ProgressSentry; |
85 | |
86 | }; |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | #endif // _Message_HeaderFile |