| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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:
54 MsgStream& stream_;
56 std::string m_currentFilename;
57 };
58
59 // ============================================================================
60
61 // ============================================================================
62 } /* Gaudi */ } /* Parsers */
63 // ============================================================================
64
65 #endif // JOBOPTIONSVC_MESSAGES_H_
Gaudi::Parsers::Messages::m_currentFilename
std::string m_currentFilename
Name of last printed filename.
Definition: Messages.h:56
Gaudi::Parsers::Messages::AddMessage
void AddMessage(MSG::Level level, const std::string &message)
Definition: Message.cpp:15
Gaudi::Parsers::Messages::AddInfo
void AddInfo(const std::string &info)
Definition: Messages.h:24
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
MsgStream.h
Gaudi::Parsers::Messages::Messages
Messages(MsgStream &stream)
Definition: Messages.h:22
Gaudi::Parsers::Messages::AddWarning
void AddWarning(const Position &pos, const std::string &warning)
Definition: Messages.h:40
Gaudi::Parsers::Messages::AddError
void AddError(const Position &pos, const std::string &error)
Definition: Messages.h:44
std::string
STL class.
MSG::Level
Level
Definition: IMessageSvc.h:15
Gaudi::Parsers::Messages::AddInfo
void AddInfo(const Position &pos, const std::string &info)
Definition: Messages.h:36
Gaudi::Parsers::Messages
Definition: Messages.h:20
Gaudi::Parsers::Position
Definition: Position.h:12
Gaudi::Parsers::Messages::AddError
void AddError(const std::string &error)
Definition: Messages.h:32
Position.h
Gaudi::Parsers::Messages::AddWarning
void AddWarning(const std::string &warning)
Definition: Messages.h:28
MSG::ERROR
Definition: IMessageSvc.h:21
gaudirun.level
level
Definition: gaudirun.py:261
MSG::WARNING
Definition: IMessageSvc.h:20
Gaudi::Parsers::Messages::stream_
MsgStream & stream_
Definition: Messages.h:54
MSG::INFO
Definition: IMessageSvc.h:19
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1