All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Messages.h
Go to the documentation of this file.
1 #ifndef JOBOPTIONSVC_MESSAGES_H_
2 #define JOBOPTIONSVC_MESSAGES_H_
3 // ============================================================================
4 // STD & STL
5 // ============================================================================
6 #include <string>
7 #include <vector>
8 #include <iostream>
9 // ============================================================================
10 // Boost
11 // ============================================================================
12 
13 // ============================================================================
14 // Gaudi:
15 // ============================================================================
16 #include "GaudiKernel/MsgStream.h"
17 #include "Position.h"
18 // ============================================================================
19 namespace Gaudi { namespace Parsers {
20 class Messages final {
21  public:
22  Messages(MsgStream& stream): stream_(stream) {}
23  //Messages(const MsgStream& stream):stream_(stream){}
24  void AddInfo(const std::string& info) {
25  AddMessage(MSG::INFO, info);
26  }
27 
28  void AddWarning(const std::string& warning) {
29  AddMessage(MSG::WARNING, warning);
30  }
31 
32  void AddError(const std::string& error) {
33  AddMessage(MSG::ERROR, error);
34  }
35 
36  void AddInfo(const Position& pos, const std::string& info) {
37  AddMessage(MSG::INFO, pos, info);
38  }
39 
40  void AddWarning(const Position& pos, const std::string& warning) {
41  AddMessage(MSG::WARNING, pos, warning);
42  }
43 
44  void AddError(const Position& pos, const std::string& error) {
45  AddMessage(MSG::ERROR, pos, error);
46  }
47 
48  private:
49  void AddMessage(MSG::Level level, const std::string& message);
50 
51  void AddMessage(MSG::Level level, const Position& pos,
52  const std::string& message);
53  private:
57 };
58 
59 // ============================================================================
60 
61 // ============================================================================
62 } /* Gaudi */ } /* Parsers */
63 // ============================================================================
64 
65 #endif // JOBOPTIONSVC_MESSAGES_H_
std::string m_currentFilename
Name of last printed filename.
Definition: Messages.h:56
void AddMessage(MSG::Level level, const std::string &message)
Definition: Message.cpp:15
void AddInfo(const std::string &info)
Definition: Messages.h:24
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Messages(MsgStream &stream)
Definition: Messages.h:22
void AddWarning(const Position &pos, const std::string &warning)
Definition: Messages.h:40
void AddError(const Position &pos, const std::string &error)
Definition: Messages.h:44
STL class.
void AddInfo(const Position &pos, const std::string &info)
Definition: Messages.h:36
void AddError(const std::string &error)
Definition: Messages.h:32
void AddWarning(const std::string &warning)
Definition: Messages.h:28
MsgStream & stream_
Definition: Messages.h:54
Helper functions to set/get the application return code.
Definition: __init__.py:1