zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DiagnosticsBase.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 #ifndef COMPILER_PREPROCESSOR_DIAGNOSTICS_H_
8 #define COMPILER_PREPROCESSOR_DIAGNOSTICS_H_
9 
10 #include <string>
11 
12 namespace pp
13 {
14 
15 struct SourceLocation;
16 
17 // Base class for reporting diagnostic messages.
18 // Derived classes are responsible for formatting and printing the messages.
20 {
21  public:
22  enum Severity
23  {
26  };
27  enum ID
28  {
65 
71  };
72 
73  virtual ~Diagnostics();
74 
75  void report(ID id, const SourceLocation& loc, const std::string& text);
76 
77  protected:
78  Severity severity(ID id);
80 
81  virtual void print(ID id,
82  const SourceLocation& loc,
83  const std::string& text) = 0;
84 };
85 
86 } // namespace pp
87 #endif // COMPILER_PREPROCESSOR_DIAGNOSTICS_H_
virtual ~Diagnostics()
png_sPLT_entryp pp
Definition: pngrutil.c:1375
void report(ID id, const SourceLocation &loc, const std::string &text)
virtual void print(ID id, const SourceLocation &loc, const std::string &text)=0
GLsizei const GLcharARB ** string
Definition: glew.h:5638
std::string message(ID id)
Severity severity(ID id)