Where Online Learning is simpler!
The C and C++ Include Header Files
cat -n /usr/include/wabt/binary-writer-spec.h
1 /* 2 * Copyright 2016 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_BINARY_WRITER_SPEC_H_ 18 #define WABT_BINARY_WRITER_SPEC_H_ 19 20 #include <functional> 21 #include <utility> 22 #include <vector> 23 24 #include "wabt/binary-writer.h" 25 #include "wabt/common.h" 26 #include "wabt/ir.h" 27 28 namespace wabt { 29 30 struct FilenameMemoryStreamPair { 31 FilenameMemoryStreamPair(std::string_view filename, 32 std::unique_ptr<MemoryStream> stream) 33 : filename(filename), stream(std::move(stream)) {} 34 std::string filename; 35 std::unique_ptr<MemoryStream> stream; 36 }; 37 38 using WriteBinarySpecStreamFactory = 39 std::function<Stream*(std::string_view filename)>; 40 41 Result WriteBinarySpecScript(Stream* json_stream, 42 WriteBinarySpecStreamFactory module_stream_factory, 43 Script*, 44 std::string_view source_filename, 45 std::string_view module_filename_noext, 46 const WriteBinaryOptions&); 47 48 // Convenience function for producing MemoryStream outputs all modules. 49 Result WriteBinarySpecScript( 50 Stream* json_stream, 51 Script*, 52 std::string_view source_filename, 53 std::string_view module_filename_noext, 54 const WriteBinaryOptions&, 55 std::vector<FilenameMemoryStreamPair>* out_module_streams, 56 Stream* log_stream = nullptr); 57 58 } // namespace wabt 59 60 #endif /* WABT_BINARY_WRITER_SPEC_H_ */