Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::wasm_ops::instruction_stream Class Reference

#include <wasm_sysio_binary_ops.hpp>

Collaboration diagram for sysio::chain::wasm_ops::instruction_stream:

Public Member Functions

 instruction_stream (size_t size)
 
void operator<< (const char c)
 
void set (size_t i, const char *arr)
 
size_t get_index ()
 
std::vector< U8get ()
 

Public Attributes

size_t idx
 
std::vector< U8data
 

Detailed Description

Definition at line 25 of file wasm_sysio_binary_ops.hpp.

Constructor & Destructor Documentation

◆ instruction_stream()

sysio::chain::wasm_ops::instruction_stream::instruction_stream ( size_t size)
inline

Definition at line 27 of file wasm_sysio_binary_ops.hpp.

27 : idx(0) {
28 data.resize(size);
29 }

Member Function Documentation

◆ get()

std::vector< U8 > sysio::chain::wasm_ops::instruction_stream::get ( )
inline

Definition at line 42 of file wasm_sysio_binary_ops.hpp.

42 {
43 std::vector<U8> ret = data;
44 ret.resize(idx);
45 return ret;
46 }
CK_RV ret
Here is the caller graph for this function:

◆ get_index()

size_t sysio::chain::wasm_ops::instruction_stream::get_index ( )
inline

Definition at line 41 of file wasm_sysio_binary_ops.hpp.

41{ return idx; }

◆ operator<<()

void sysio::chain::wasm_ops::instruction_stream::operator<< ( const char c)
inline

Definition at line 30 of file wasm_sysio_binary_ops.hpp.

30 {
31 if (idx >= data.size())
32 data.resize(data.size()*2);
33 data[idx++] = static_cast<U8>(c);
34 }
uint8_t U8
Definition BasicTypes.h:5

◆ set()

void sysio::chain::wasm_ops::instruction_stream::set ( size_t i,
const char * arr )
inline

Definition at line 35 of file wasm_sysio_binary_ops.hpp.

35 {
36 if (i+idx >= data.size())
37 data.resize(data.size()*2+i);
38 memcpy((char*)&data[idx], arr, i);
39 idx += i;
40 }
memcpy((char *) pInfo->slotDescription, s, l)
Here is the call graph for this function:

Member Data Documentation

◆ data

std::vector<U8> sysio::chain::wasm_ops::instruction_stream::data

Definition at line 49 of file wasm_sysio_binary_ops.hpp.

◆ idx

size_t sysio::chain::wasm_ops::instruction_stream::idx

Definition at line 48 of file wasm_sysio_binary_ops.hpp.


The documentation for this class was generated from the following file: