wut  v1.7.0
Wii U Toolchain
IWhiteListAccessor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
5 #include <nn/sl/sl_cpp.h>
6 #include <wut.h>
7 
8 #ifdef __cplusplus
9 
10 namespace nn::sl {
11 
13 
14  public:
16  InitInternalVtable();
17  }
18 
20  InitInternalVtable();
21  }
22 
24  InitInternalVtable();
25  return *this;
26  }
27 
29  InitInternalVtable();
30  return *this;
31  }
32 
33  ~IWhiteListAccessor() override = default;
34 
35  private:
36  static nn::Result GetWrapper(details::IWhiteListAccessorInternal *instance, nn::sl::WhiteList *outWhiteList) {
37  return instance->vtable->instance->Get(outWhiteList);
38  }
39 
40  details::IWhiteListAccessorInternal *GetInternal() override {
41  return &mInstance;
42  }
43 
44  void InitInternalVtable() {
45 
46  mVTable = {.instance = this,
47  .GetFn = &GetWrapper};
48  mInstance.vtable = &mVTable;
49  }
50 
52  details::IWhiteListAccessorInternalVTable mVTable{};
53  };
54 
56 } // namespace nn::sl
57 
58 #endif
Result value type used by nn libraries.
Definition: result.h:68
IWhiteListAccessor(IWhiteListAccessor &src)
IWhiteListAccessor & operator=(const IWhiteListAccessor &other)
IWhiteListAccessor & operator=(IWhiteListAccessor &&src) noexcept
~IWhiteListAccessor() override=default
virtual nn::Result Get(nn::sl::WhiteList *outWhiteList) const =0
struct nn::sl::details::IWhiteListAccessorInternal IWhiteListAccessorInternal
details::IWhiteListAccessorBase & GetDefaultWhiteListAccessor()