rbpf/Store.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "common/Store.h"
4 
5 namespace rBPF
6 {
7 class VirtualMachine;
8 
9 class LocalStore : public Store
10 {
11 public:
12  LocalStore(VirtualMachine& vm) : vm(vm)
13  {
14  }
15 
16  bool update(Key key, Value value) override;
17  bool fetch(Key key, Value& value) override;
18 
19 private:
20  VirtualMachine& vm;
21 };
22 
23 class GlobalStore : public Store
24 {
25 public:
26  bool update(Key key, Value value) override;
27  bool fetch(Key key, Value& value) override;
28 };
29 
30 } // namespace rBPF
void size_t const void * key
Definition: blake2s.h:33
Definition: bpf/rbpf/Store.h:23
bool update(Key key, Value value) override
Update value in store.
bool fetch(Key key, Value &value) override
Fetch value from store.
LocalStore(VirtualMachine &vm)
Definition: rbpf/Store.h:12
bool fetch(Key key, Value &value) override
Fetch value from store.
bool update(Key key, Value value) override
Update value in store.
Definition: rbpf/common/Store.h:8
uint32_t Key
Definition: rbpf/common/Store.h:10
uint32_t Value
Definition: rbpf/common/Store.h:11
Definition: rbpf/src/include/rbpf/VirtualMachine.h:18
Definition: bpf/rbpf/Store.h:7