0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / Message / Message.hxx
CommitLineData
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>
26class Message_Messenger;
27class TCollection_AsciiString;
28class Message_Msg;
29class Message_MsgFile;
30class Message_Messenger;
31class Message_Algorithm;
32class Message_Printer;
33class Message_PrinterOStream;
34class Message_ProgressIndicator;
35class Message_ProgressScale;
36class Message_ProgressSentry;
37
38
39//! Defines
40//! - tools to work with messages
41//! - basic tools intended for progress indication
42class Message
43{
44public:
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
65protected:
66
67
68
69
70
71private:
72
73
74
75
76friend class Message_Msg;
77friend class Message_MsgFile;
78friend class Message_Messenger;
79friend class Message_Algorithm;
80friend class Message_Printer;
81friend class Message_PrinterOStream;
82friend class Message_ProgressIndicator;
83friend class Message_ProgressScale;
84friend class Message_ProgressSentry;
85
86};
87
88
89
90
91
92
93
94#endif // _Message_HeaderFile