wut  v1.7.0
Wii U Toolchain
IKillerNotificationAccessorDetails.h
Go to the documentation of this file.
1 #pragma once
2 
4 #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  class KillerNotificationSelector;
12  namespace details {
13  class IKillerNotificationAccessorBase;
15 
16  typedef nn::Result (*IKillerNotificationAccessor_GetFn)(IKillerNotificationAccessorInternal *, KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications);
17 
19  IKillerNotificationAccessorBase *instance; // Is normally padding
20  uint32_t info;
21  WUT_PADDING_BYTES(4);
22  uint32_t destructor;
23  WUT_PADDING_BYTES(4);
25  };
26  WUT_CHECK_SIZE(IKillerNotificationAccessorInternalVTable, 0x18);
27  WUT_CHECK_OFFSET(IKillerNotificationAccessorInternalVTable, 0x00, instance);
28  WUT_CHECK_OFFSET(IKillerNotificationAccessorInternalVTable, 0x14, GetFn);
29 
30  typedef struct WUT_PACKED IKillerNotificationAccessorInternal {
33  WUT_CHECK_SIZE(IKillerNotificationAccessorInternal, 0x04);
34  WUT_CHECK_OFFSET(IKillerNotificationAccessorInternal, 0x00, vtable);
35 
38 
39  public:
41  virtual ~IKillerNotificationAccessorBase() = default;
42 
43  virtual nn::Result Get(KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications) const = 0;
44 
45  private:
46  virtual details::IKillerNotificationAccessorInternal *GetInternal() = 0;
47  };
48 
50  public:
52  }
53  nn::Result Get(nn::sl::KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications) const override {
54  if (!mInstancePtr) {
56  }
57  return mInstancePtr->vtable->GetFn(mInstancePtr, outKillerNotifications, outKillerNotificationsNum, maxKillerNotifications);
58  }
59 
60  private:
62  return mInstancePtr;
63  }
64 
66  };
67 
68  } // namespace details
69 
70 } // namespace nn::sl
71 
72 #endif
Result value type used by nn libraries.
Definition: result.h:68
@ LEVEL_FATAL
Definition: result.h:73
@ RESULT_MODULE_NN_SL
Definition: result.h:114
virtual nn::Result Get(KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications) const =0
nn::Result Get(nn::sl::KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications) const override
KillerNotificationAccessorFromPtr(details::IKillerNotificationAccessorInternal *ptr)
nn::Result(* IKillerNotificationAccessor_GetFn)(IKillerNotificationAccessorInternal *, KillerNotification *outKillerNotifications, int *outKillerNotificationsNum, int maxKillerNotifications)
struct nn::sl::details::IKillerNotificationAccessorInternal IKillerNotificationAccessorInternal