The Gaudi Framework  v30r3 (a5ef0a68)
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 {
21  namespace Parsers
22  {
23  class Messages final
24  {
25  public:
26  Messages( MsgStream& stream ) : stream_( stream ) {}
27  // Messages(const MsgStream& stream):stream_(stream){}
28  void AddInfo( const std::string& info ) { AddMessage( MSG::INFO, info ); }
29 
30  void AddWarning( const std::string& warning ) { AddMessage( MSG::WARNING, warning ); }
31 
32  void AddError( const std::string& error ) { AddMessage( MSG::ERROR, error ); }
33 
34  void AddInfo( const Position& pos, const std::string& info ) { AddMessage( MSG::INFO, pos, info ); }
35 
36  void AddWarning( const Position& pos, const std::string& warning ) { AddMessage( MSG::WARNING, pos, warning ); }
37 
38  void AddError( const Position& pos, const std::string& error ) { AddMessage( MSG::ERROR, pos, error ); }
39 
40  private:
41  void AddMessage( MSG::Level level, const std::string& message );
42 
43  void AddMessage( MSG::Level level, const Position& pos, const std::string& message );
44 
45  private:
49  };
50 
51  // ============================================================================
52 
53  // ============================================================================
54  } /* Gaudi */
55 } /* Parsers */
56 // ============================================================================
57 
58 #endif // JOBOPTIONSVC_MESSAGES_H_
std::string m_currentFilename
Name of last printed filename.
Definition: Messages.h:48
void AddMessage(MSG::Level level, const std::string &message)
Definition: Message.cpp:15
void AddInfo(const std::string &info)
Definition: Messages.h:28
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Messages(MsgStream &stream)
Definition: Messages.h:26
void AddWarning(const Position &pos, const std::string &warning)
Definition: Messages.h:36
void AddError(const Position &pos, const std::string &error)
Definition: Messages.h:38
STL class.
void AddInfo(const Position &pos, const std::string &info)
Definition: Messages.h:34
void AddError(const std::string &error)
Definition: Messages.h:32
void AddWarning(const std::string &warning)
Definition: Messages.h:30
MsgStream & stream_
Definition: Messages.h:46
Helper functions to set/get the application return code.
Definition: __init__.py:1