1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 12:39:53 +00:00
OpenMW/components/compiler/streamerrorhandler.hpp

39 lines
934 B
C++
Raw Normal View History

2010-06-27 19:20:21 +02:00
#ifndef COMPILER_STREAMERRORHANDLER_H_INCLUDED
#define COMPILER_STREAMERRORHANDLER_H_INCLUDED
#include <ostream>
#include "errorhandler.hpp"
namespace Compiler
{
/// \brief Error handler implementation: Write errors into logging stream
2010-06-27 19:20:21 +02:00
class StreamErrorHandler : public ErrorHandler
{
std::string mContext;
2010-06-27 19:20:21 +02:00
// not implemented
StreamErrorHandler (const StreamErrorHandler&);
StreamErrorHandler& operator= (const StreamErrorHandler&);
virtual void report (const std::string& message, const TokenLoc& loc, Type type);
///< Report error to the user.
virtual void report (const std::string& message, Type type);
///< Report a file related error
public:
void setContext(const std::string& context);
2010-06-27 19:20:21 +02:00
// constructors
StreamErrorHandler ();
2011-01-05 22:18:21 +01:00
///< constructor
2010-06-27 19:20:21 +02:00
};
}
#endif