Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/wabt/c-writer.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_C_WRITER_H_ 18 #define WABT_C_WRITER_H_ 19 20 #include <functional> 21 #include "wabt/common.h" 22 #include "wabt/feature.h" 23 #include "wabt/ir.h" 24 25 namespace wabt { 26 27 struct Module; 28 class Stream; 29 30 struct WriteCOptions { 31 std::string_view module_name; 32 Features features; 33 /* 34 * name_to_output_file_index takes const iterators to begin and end of a list 35 * of all functions in the module, number of imported functions, and number of 36 * .c outputs as argument, returns a vector where vector[i] the index of the 37 * .c output that funcs_begin + i goes into. Only called when --num-outputs is 38 * used. 39 */ 40 std::function<std::vector<size_t>( 41 std::vector<Func*>::const_iterator funcs_begin, 42 std::vector<Func*>::const_iterator funcs_end, 43 size_t num_imported_functions, 44 size_t num_outputs)> 45 name_to_output_file_index; 46 }; 47 48 Result WriteC(std::vector<Stream*>&& c_streams, 49 Stream* h_stream, 50 Stream* h_impl_stream, 51 const char* header_name, 52 const char* header_impl_name, 53 const Module*, 54 const WriteCOptions&); 55 56 } // namespace wabt 57 58 #endif /* WABT_C_WRITER_H_ */