zenilib: zenilib/jni/external/angle/src/compiler/InfoSink.cpp Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
InfoSink.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2002-2010 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 #include "compiler/InfoSink.h"
8
9 void TInfoSinkBase::prefix(TPrefixType p) {
10 switch(p) {
11 case EPrefixNone:
12 break;
13 case EPrefixWarning:
14 sink.append("WARNING: ");
15 break;
16 case EPrefixError:
17 sink.append("ERROR: ");
18 break;
19 case EPrefixInternalError:
20 sink.append("INTERNAL ERROR: ");
21 break;
22 case EPrefixUnimplemented:
23 sink.append("UNIMPLEMENTED: ");
24 break;
25 case EPrefixNote:
26 sink.append("NOTE: ");
27 break;
28 default:
29 sink.append("UNKOWN ERROR: ");
30 break;
31 }
32 }
33
34 void TInfoSinkBase::location(int file, int line) {
35 TPersistStringStream stream;
36 if (line)
37 stream << file << ":" << line;
38 else
39 stream << file << ":? ";
40 stream << ": ";
41
42 sink.append(stream.str());
43 }
44
45 void TInfoSinkBase::location(const TSourceLoc& loc) {
46 location(loc.first_file, loc.first_line);
47 }
48
49 void TInfoSinkBase::message(TPrefixType p, const TSourceLoc& loc, const char* m) {
50 prefix(p);
51 location(loc);
52 sink.append(m);
53 sink.append("\n");
54 }
sink
GLsizei GLenum GLboolean sink
Definition: glew.h:4448
TInfoSinkBase::message
void message(TPrefixType p, const TSourceLoc &loc, const char *m)
Definition: InfoSink.cpp:49
TPrefixType
TPrefixType
Definition: InfoSink.h:23
EPrefixError
Definition: InfoSink.h:26
stream
GLuint GLuint stream
Definition: glew.h:6573
EPrefixNote
Definition: InfoSink.h:29
file
FILE * file
Definition: visualinfo.c:88
EPrefixNone
Definition: InfoSink.h:24
EPrefixWarning
Definition: InfoSink.h:25
p
GLfloat GLfloat p
Definition: glew.h:14938
EPrefixInternalError
Definition: InfoSink.h:27
TPersistStringStream
#define TPersistStringStream
Definition: Common.h:54
TSourceLoc::first_file
int first_file
Definition: Common.h:18
EPrefixUnimplemented
Definition: InfoSink.h:28
TSourceLoc
Definition: Common.h:17
InfoSink.h
TSourceLoc::first_line
int first_line
Definition: Common.h:19
TInfoSinkBase::location
void location(int file, int line)
Definition: InfoSink.cpp:34
TInfoSinkBase::prefix
void prefix(TPrefixType p)
Definition: InfoSink.cpp:9
m
const GLdouble * m
Definition: glew.h:8385