zenilib: zenilib/jni/external/angle/src/compiler/preprocessor/Input.h 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
Input.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2011 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_INPUT_H_
8 #define COMPILER_PREPROCESSOR_INPUT_H_
9
10 #include <stddef.h>
11 #include <vector>
12
13 namespace pp
14 {
15
16 // Holds and reads input for Lexer.
17 class Input
18 {
19 public:
20 Input();
21 Input(size_t count, const char* const string[], const int length[]);
22
23 size_t count() const { return mCount; }
24 const char* string(size_t index) const { return mString[index]; }
25 size_t length(size_t index) const { return mLength[index]; }
26
27 size_t read(char* buf, size_t maxSize);
28
29 struct Location
30 {
31 size_t sIndex; // String index;
32 size_t cIndex; // Char index.
33
34 Location() : sIndex(0), cIndex(0) { }
35 };
36 const Location& readLoc() const { return mReadLoc; }
37
38 private:
39 // Input.
40 size_t mCount;
41 const char* const* mString;
42 std::vector<size_t> mLength;
43
44 Location mReadLoc;
45 };
46
47 } // namespace pp
48 #endif // COMPILER_PREPROCESSOR_INPUT_H_
49
pp::Input::Location::cIndex
size_t cIndex
Definition: Input.h:32
pp::Input::read
size_t read(char *buf, size_t maxSize)
Definition: Input.cpp:32
pp
png_sPLT_entryp pp
Definition: pngrutil.c:1375
pp::Input::string
const char * string(size_t index) const
Definition: Input.h:24
pp::Input::length
size_t length(size_t index) const
Definition: Input.h:25
pp::Input::readLoc
const Location & readLoc() const
Definition: Input.h:36
pp::Input::Location::sIndex
size_t sIndex
Definition: Input.h:31
length
GLsizei GLsizei * length
Definition: gl2ext.h:792
count
GLint GLsizei count
Definition: gl2ext.h:1011
index
GLuint index
Definition: glew.h:1800
pp::Input::Location::Location
Location()
Definition: Input.h:34
pp::Input::Input
Input()
Definition: Input.cpp:16
buf
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2539
pp::Input
Definition: Input.h:17
pp::Input::Location
Definition: Input.h:29
pp::Input::count
size_t count() const
Definition: Input.h:23