InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MessageLog.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Burbidge
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __MessageLog_h__
25 #define __MessageLog_h__
26 
27 #include <iostream>
28 
29 class MessageLogImpl;
30 
31 //========================================================================================
32 // CLASS MessageLog
33 //========================================================================================
34 
36 {
37 public:
38  enum Manipulator { kNewLine, kTab, kFlush };
39  enum Translate { kDontTranslate, kTranslate, kBootStrapTranslate };
40 
41  MessageLog(std::ostream& stream, const int16& level);
42  virtual ~MessageLog();
43 
44  void SetImpl(MessageLogImpl* impl);
45 
46  MessageLog& Write(const Manipulator& manipulator);
47  MessageLog& Write(const PMString& msg, const PMString& label = "server", const Translate& translate = kTranslate);
48  MessageLog& Write(const PMString& msg, const ErrorCode& errorCode, const PMString& label = "server", const Translate& translate = kTranslate);
49 
50 private:
51  MessageLogImpl* fImpl;
52  std::ostream& fStream;
53  int16 fLevel;
54 };
55 
56 extern MessageLog gInfoLog;
57 extern MessageLog gWarnLog;
58 extern MessageLog gErrorLog;
59 
60 #endif