MCPcopy Create free account
hub / github.com/WasmVM/WasmVM / Section

Class Section

src/lib/encode/encode.hpp:16–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14constexpr char magic[] = "\x00\x61\x73\x6d\x01\x00\x00\x00";
15
16class Section {
17public:
18 void write(std::ostream& stream);
19protected:
20 Section(const byte_t id);
21 const byte_t id;
22 std::stringstream buffer;
23
24 struct Stream {
25 Stream(std::ostream& stream);
26
27 template <typename T>
28 Stream& operator<<(T value);
29
30 template <typename T>
31 Stream& operator<<(const std::vector<T> values){
32 *this << (u32_t)values.size();
33 for(T value : values){
34 *this << value;
35 }
36 return *this;
37 }
38
39 Stream& operator<<(std::stringstream& value);
40 private:
41 std::ostream& stream;
42 };
43};
44
45struct Type : public Section {
46 Type(const std::vector<FuncType>& types);

Callers 1

decode.cppFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected