blob: 4ce817f206e5ae122b620bb2d981d64101805e95 [file] [log] [blame]
Adam Lesinski282e1812014-01-23 18:17:42 -08001#ifndef SOURCEPOS_H
2#define SOURCEPOS_H
3
4#include <utils/String8.h>
5#include <stdio.h>
6
7using namespace android;
8
9class SourcePos
10{
11public:
12 String8 file;
13 int line;
14
15 SourcePos(const String8& f, int l);
16 SourcePos(const SourcePos& that);
17 SourcePos();
18 ~SourcePos();
19
Adam Lesinskia01a9372014-03-20 18:04:57 -070020 void error(const char* fmt, ...) const;
21 void warning(const char* fmt, ...) const;
22 void printf(const char* fmt, ...) const;
Adam Lesinski282e1812014-01-23 18:17:42 -080023
24 static bool hasErrors();
25 static void printErrors(FILE* to);
26};
27
28
29#endif // SOURCEPOS_H