CommonLibVR
BSResourceHandle.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
RE/B/BSResourceEntryDB.h
"
4
#include "
RE/N/NiSmartPointer.h
"
5
6
namespace
RE
7
{
8
class
NiNode;
9
10
namespace
BSModelDB
11
{
12
struct
DBTraits;
13
}
14
15
namespace
BSResource
16
{
17
template
<
class
T_Entry,
class
T_EntryDB>
18
class
RHandleType
19
{
20
public
:
21
using
U_Entry
= T_Entry;
22
using
U_EntryDB
= T_EntryDB;
23
24
[[nodiscard]] constexpr T_Entry*
get
() const noexcept
25
{
26
return
_entry
;
27
}
28
29
[[nodiscard]]
explicit
constexpr
operator
bool() const noexcept
30
{
31
return
static_cast<
bool
>
(
_entry
);
32
}
33
34
[[nodiscard]] constexpr T_Entry&
operator*
() const noexcept
35
{
36
assert(
static_cast<
bool
>
(*
this
));
37
return
*
_entry
;
38
}
39
40
[[nodiscard]] constexpr T_Entry*
operator->
() const noexcept
41
{
42
assert(
static_cast<
bool
>
(*
this
));
43
return
_entry
;
44
}
45
46
protected
:
47
// members
48
T_Entry*
_entry
;
// 00
49
};
50
}
51
52
using
ModelDBHandle
=
BSResource::RHandleType<BSResource::Entry<NiPointer<NiNode>
,
BSResource::EntryDBTraits<BSModelDB::DBTraits, BSResource::EntryDB<BSModelDB::DBTraits>
>::CArgs>,
BSResource::EntryDB<BSModelDB::DBTraits>
>;
53
}
BSResourceEntryDB.h
NiSmartPointer.h
RE::BSResource::EntryDBTraits
Definition:
BSResourceEntryDB.h:20
RE::BSResource::EntryDB
Definition:
BSResourceEntryDB.h:106
RE::BSResource::RHandleType
Definition:
BSResourceHandle.h:19
RE::BSResource::RHandleType::operator->
constexpr T_Entry * operator->() const noexcept
Definition:
BSResourceHandle.h:40
RE::BSResource::RHandleType::_entry
T_Entry * _entry
Definition:
BSResourceHandle.h:48
RE::BSResource::RHandleType::U_Entry
T_Entry U_Entry
Definition:
BSResourceHandle.h:21
RE::BSResource::RHandleType::operator*
constexpr T_Entry & operator*() const noexcept
Definition:
BSResourceHandle.h:34
RE::BSResource::RHandleType::get
constexpr T_Entry * get() const noexcept
Definition:
BSResourceHandle.h:24
RE::BSResource::RHandleType::U_EntryDB
T_EntryDB U_EntryDB
Definition:
BSResourceHandle.h:22
RE
Definition:
AbsorbEffect.h:6
CommonLibVR
include
RE
B
BSResourceHandle.h
Generated by
1.9.1