wut  v1.7.0
Wii U Toolchain
IAccountInfoAccessor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
5 #include <wut.h>
6 
7 #ifdef __cplusplus
8 
9 namespace nn::sl {
11 
12  public:
14  InitInternalVtable();
15  }
16 
18  InitInternalVtable();
19  }
20 
22  InitInternalVtable();
23  return *this;
24  }
25 
27  InitInternalVtable();
28  return *this;
29  }
30 
31  ~IAccountInfoAccessor() override = default;
32 
33  private:
34  static nn::Result GetWrapper(details::IAccountInfoAccessorInternal *instance, AccountInfo *outAccountInfo) {
35  return instance->vtable->instance->Get(outAccountInfo);
36  }
37 
38  details::IAccountInfoAccessorInternal *GetInternal() override {
39  return &mInstance;
40  }
41 
42  void InitInternalVtable() {
43  mVTable = {.instance = this,
44  .GetFn = &GetWrapper};
45  mInstance.vtable = &mVTable;
46  }
47 
49  details::IAccountInfoAccessorInternalVTable mVTable{};
50  };
51 
53 } // namespace nn::sl
54 
55 #endif
Result value type used by nn libraries.
Definition: result.h:68
IAccountInfoAccessor(IAccountInfoAccessor &src)
~IAccountInfoAccessor() override=default
IAccountInfoAccessor & operator=(const IAccountInfoAccessor &other)
IAccountInfoAccessor & operator=(IAccountInfoAccessor &&src) noexcept
virtual nn::Result Get(nn::sl::AccountInfo *) const =0
struct nn::sl::details::IAccountInfoAccessorInternal IAccountInfoAccessorInternal
details::IAccountInfoAccessorBase & GetDefaultAccountInfoAccessor()