wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
IPreferentialTitleAccessor.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
9namespace 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 ~IPreferentialTitleAccessor() override = default;
32
33 private:
34 static nn::Result GetWrapper(details::IPreferentialTitleAccessorInternal *instance, TitleInfo *outTitleInfo, uint32_t *outTitleInfoSize, int maxTitleInfo, uint32_t u1) {
35 return instance->vtable->instance->Get(outTitleInfo, outTitleInfoSize, maxTitleInfo, u1);
36 }
37
38 details::IPreferentialTitleAccessorInternal *GetInternal() override {
39 return &mInstance;
40 }
41
42 void InitInternalVtable() {
43 mVTable = {.instance = this,
44 .GetFn = &GetWrapper};
45 mInstance.vtable = &mVTable;
46 }
47
48 details::IPreferentialTitleAccessorInternal mInstance{};
49 details::IPreferentialTitleAccessorInternalVTable mVTable{};
50 };
51
53} // namespace nn::sl
54
55#endif
Result value type used by nn libraries.
Definition result.h:68
~IPreferentialTitleAccessor() override=default
IPreferentialTitleAccessor & operator=(const IPreferentialTitleAccessor &other)
IPreferentialTitleAccessor & operator=(IPreferentialTitleAccessor &&src) noexcept
IPreferentialTitleAccessor(IPreferentialTitleAccessor &src)
virtual nn::Result Get(TitleInfo *outTitleInfo, uint32_t *outTitleInfoNum, int maxNumTitleInfos, uint32_t u1) const =0
details::IPreferentialTitleAccessorBase & GetDefaultPreferentialTitleAccessor()