CommonLibSSE NG
Loading...
Searching...
No Matches
TempEffectTraits.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
RE/B/BSTempEffect.h
"
4
#include "
RE/B/BSTempEffectDebris.h
"
5
#include "
RE/B/BSTempEffectGeometryDecal.h
"
6
#include "
RE/B/BSTempEffectParticle.h
"
7
#include "
RE/B/BSTempEffectSPG.h
"
8
#include "
RE/B/BSTempEffectSimpleDecal.h
"
9
#include "
RE/B/BSTempEffectWeaponBlood.h
"
10
#include "
RE/B/BSTerrainEffect.h
"
11
#include "
RE/M/ModelReferenceEffect.h
"
12
#include "
RE/R/ReferenceEffect.h
"
13
#include "
RE/S/ShaderReferenceEffect.h
"
14
#include "
RE/S/SummonPlacementEffect.h
"
15
16
#define TEMPEFFECT_TRAITS(a_elem) \
17
case a_elem::TYPE: \
18
if constexpr (std::is_convertible_v<const a_elem*, const T*>) { \
19
return static_cast<const a_elem*>(this); \
20
} \
21
break
22
23
namespace
RE
24
{
25
template
<
class
T,
class
>
26
T*
BSTempEffect::As
() noexcept
27
{
28
return
const_cast<
T*
>
(
29
static_cast<
const
BSTempEffect
*
>
(
this
)->As<T>());
30
}
31
32
template
<
class
T,
class
>
33
const
T*
BSTempEffect::As
() const noexcept
34
{
35
switch
(
GetType
()) {
36
TEMPEFFECT_TRAITS
(
BSTerrainEffect
);
37
TEMPEFFECT_TRAITS
(
BSTempEffectWeaponBlood
);
38
TEMPEFFECT_TRAITS
(
BSTempEffectSimpleDecal
);
39
TEMPEFFECT_TRAITS
(
BSTempEffectGeometryDecal
);
40
TEMPEFFECT_TRAITS
(
BSTempEffectParticle
);
41
TEMPEFFECT_TRAITS
(
BSTempEffectDebris
);
42
TEMPEFFECT_TRAITS
(
BSTempEffectSPG
);
43
TEMPEFFECT_TRAITS
(
BSTempEffect
);
44
TEMPEFFECT_TRAITS
(
ReferenceEffect
);
45
TEMPEFFECT_TRAITS
(
ModelReferenceEffect
);
46
TEMPEFFECT_TRAITS
(
ShaderReferenceEffect
);
47
TEMPEFFECT_TRAITS
(
SummonPlacementEffect
);
48
default
:
49
break
;
50
}
51
52
return
nullptr
;
53
}
54
}
55
56
#undef TEMPEFFECT_TRAITS
BSTempEffect.h
BSTempEffectDebris.h
BSTempEffectGeometryDecal.h
BSTempEffectParticle.h
BSTempEffectSPG.h
BSTempEffectSimpleDecal.h
BSTempEffectWeaponBlood.h
BSTerrainEffect.h
ModelReferenceEffect.h
ReferenceEffect.h
ShaderReferenceEffect.h
SummonPlacementEffect.h
TEMPEFFECT_TRAITS
#define TEMPEFFECT_TRAITS(a_elem)
Definition
TempEffectTraits.h:16
RE::BSTempEffectDebris
Definition
BSTempEffectDebris.h:11
RE::BSTempEffectGeometryDecal
Definition
BSTempEffectGeometryDecal.h:17
RE::BSTempEffect
Definition
BSTempEffect.h:29
RE::BSTempEffect::As
T * As() noexcept
Definition
TempEffectTraits.h:26
RE::BSTempEffect::GetType
virtual TEMP_EFFECT_TYPE GetType() const
RE::BSTempEffectParticle
Definition
BSTempEffectParticle.h:19
RE::BSTempEffectSPG
Definition
BSTempEffectSPG.h:12
RE::BSTempEffectSimpleDecal
Definition
BSTempEffectSimpleDecal.h:18
RE::BSTempEffectWeaponBlood
Definition
BSTempEffectWeaponBlood.h:11
RE::BSTerrainEffect
Definition
BSTerrainEffect.h:18
RE::ModelReferenceEffect
Definition
ModelReferenceEffect.h:20
RE::ReferenceEffect
Definition
ReferenceEffect.h:12
RE::ShaderReferenceEffect
Definition
ShaderReferenceEffect.h:20
RE::SummonPlacementEffect
Definition
SummonPlacementEffect.h:22
RE
Definition
AbsorbEffect.h:6
CommonLibSSE-NG
include
RE
T
TempEffectTraits.h
Generated by
1.9.7