Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
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 <iostream>
7 #include <string>
8 #include <vector>
9 // ============================================================================
10 // Boost
11 // ============================================================================
12 
13 // ============================================================================
14 // Gaudi:
15 // ============================================================================
16 #include "GaudiKernel/MsgStream.h"
17 #include "Position.h"
18 // ============================================================================
19 namespace Gaudi {
20  namespace Parsers {
21  class Messages final {
22  public:
23  Messages( MsgStream& stream ) : stream_( stream ) {}
24  // Messages(const MsgStream& stream):stream_(stream){}
25  void AddInfo( const std::string& info ) { AddMessage( MSG::INFO, info ); }
26 
27  void AddWarning( const std::string& warning ) { AddMessage( MSG::WARNING, warning ); }
28 
29  void AddError( const std::string& error ) { AddMessage( MSG::ERROR, error ); }
30 
31  void AddInfo( const Position& pos, const std::string& info ) { AddMessage( MSG::INFO, pos, info ); }
32 
33  void AddWarning( const Position& pos, const std::string& warning ) { AddMessage( MSG::WARNING, pos, warning ); }
34 
35  void AddError( const Position& pos, const std::string& error ) { AddMessage( MSG::ERROR, pos, error ); }
36 
37  private:
38  void AddMessage( MSG::Level level, const std::string& message );
39 
40  void AddMessage( MSG::Level level, const Position& pos, const std::string& message );
41 
42  private:
46  };
47 
48  // ============================================================================
49 
50  // ============================================================================
51  } // namespace Parsers
52 } // namespace Gaudi
53 // ============================================================================
54 
55 #endif // JOBOPTIONSVC_MESSAGES_H_
std::string m_currentFilename
Name of last printed filename.
Definition: Messages.h:45
void AddMessage(MSG::Level level, const std::string &message)
Definition: Message.cpp:15
void AddInfo(const std::string &info)
Definition: Messages.h:25
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Messages(MsgStream &stream)
Definition: Messages.h:23
void AddWarning(const Position &pos, const std::string &warning)
Definition: Messages.h:33
void AddError(const Position &pos, const std::string &error)
Definition: Messages.h:35
STL class.
void AddInfo(const Position &pos, const std::string &info)
Definition: Messages.h:31
void AddError(const std::string &error)
Definition: Messages.h:29
void AddWarning(const std::string &warning)
Definition: Messages.h:27
MsgStream & stream_
Definition: Messages.h:43
Helper functions to set/get the application return code.
Definition: __init__.py:1