Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/wabt/lexer-source.h
1 /* 2 * Copyright 2017 WebAssembly Community Group participants 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef WABT_LEXER_SOURCE_H_ 18 #define WABT_LEXER_SOURCE_H_ 19 20 #include <cstddef> 21 #include <memory> 22 #include <string> 23 #include <vector> 24 25 #include "wabt/common.h" 26 #include "wabt/range.h" 27 28 namespace wabt { 29 30 class LexerSource { 31 public: 32 LexerSource(const void* data, Offset size); 33 34 std::unique_ptr<LexerSource> Clone(); 35 Result Tell(Offset* out_offset); 36 size_t Fill(void* dest, size_t size); 37 Result ReadRange(OffsetRange, std::vector<char>* out_data); 38 Result Seek(Offset offset); 39 40 WABT_DISALLOW_COPY_AND_ASSIGN(LexerSource); 41 42 const void* data() { return data_; } 43 Offset size() { return size_; } 44 45 private: 46 const void* data_; 47 Offset size_; 48 Offset read_offset_; 49 }; 50 51 } // namespace wabt 52 53 #endif // WABT_LEXER_SOURCE_H_