Go to the documentation of this file.00001 #ifndef JOBOPTIONSVC_MESSAGES_H_
00002 #define JOBOPTIONSVC_MESSAGES_H_
00003
00004
00005
00006 #include <string>
00007 #include <vector>
00008 #include <iostream>
00009
00010
00011
00012
00013
00014
00015
00016 #include "GaudiKernel/MsgStream.h"
00017 #include "Position.h"
00018
00019 namespace Gaudi { namespace Parsers {
00020 class Messages {
00021 public:
00022 Messages(MsgStream& stream): stream_(stream), m_currentFilename() {}
00023
00024 void AddInfo(const std::string& info) {
00025 AddMessage(MSG::INFO, info);
00026 }
00027
00028 void AddWarning(const std::string& warning) {
00029 AddMessage(MSG::WARNING, warning);
00030 }
00031
00032 void AddError(const std::string& error) {
00033 AddMessage(MSG::ERROR, error);
00034 }
00035
00036 void AddInfo(const Position& pos, const std::string& info) {
00037 AddMessage(MSG::INFO, pos, info);
00038 }
00039
00040 void AddWarning(const Position& pos, const std::string& warning) {
00041 AddMessage(MSG::WARNING, pos, warning);
00042 }
00043
00044 void AddError(const Position& pos, const std::string& error) {
00045 AddMessage(MSG::ERROR, pos, error);
00046 }
00047
00048 private:
00049 void AddMessage(MSG::Level level, const std::string& message);
00050
00051 void AddMessage(MSG::Level level, const Position& pos,
00052 const std::string& message);
00053 private:
00054 MsgStream& stream_;
00056 std::string m_currentFilename;
00057 };
00058
00059
00060
00061
00062 } }
00063
00064
00065 #endif // JOBOPTIONSVC_MESSAGES_H_