wut  v1.7.0
Wii U Toolchain
IKillerNotificationAccessor.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 {
12 
13  public:
15  InitInternalVtable();
16  }
17 
19  InitInternalVtable();
20  }
21 
23  InitInternalVtable();
24  return *this;
25  }
26 
28  InitInternalVtable();
29  return *this;
30  }
31 
32  ~IKillerNotificationAccessor() override = default;
33 
34  private:
35  static nn::Result GetWrapper(details::IKillerNotificationAccessorInternal *instance, KillerNotification *outBuffer, int *outNum, int outBufferNum) {
36  return instance->vtable->instance->Get(outBuffer, outNum, outBufferNum);
37  }
38 
39  details::IKillerNotificationAccessorInternal *GetInternal() override {
40  return &mInstance;
41  }
42 
43  void InitInternalVtable() {
44  mVTable = {.instance = this,
45  .GetFn = &GetWrapper};
46  mInstance.vtable = &mVTable;
47  }
48 
50  details::IKillerNotificationAccessorInternalVTable mVTable{};
51  };
52 
54 } // namespace nn::sl
55 
56 #endif
Result value type used by nn libraries.
Definition: result.h:68
IKillerNotificationAccessor(IKillerNotificationAccessor &src)
IKillerNotificationAccessor & operator=(const IKillerNotificationAccessor &other)
~IKillerNotificationAccessor() override=default
IKillerNotificationAccessor & operator=(IKillerNotificationAccessor &&src) noexcept
virtual nn::Result Get(KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications) const =0
struct nn::sl::details::IKillerNotificationAccessorInternal IKillerNotificationAccessorInternal
details::IKillerNotificationAccessorBase & GetDefaultKillerNotificationAccessor()