CommonLibVR
hkReferencedObject.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/H/hkBaseObject.h"
4 
5 namespace RE
6 {
7  class hkClass;
8  class hkStatisticsCollector;
9 
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_hkReferencedObject;
14  inline static constexpr auto VTABLE = VTABLE_hkReferencedObject;
15 
16  enum class LockMode
17  {
18  kNone = 0,
19  kAuto,
20  kManual
21  };
22 
23  enum
24  {
25  kMemSize = 0x7FFF
26  };
27 
29  ~hkReferencedObject() override = default; // 00
30 
31  // add
32  virtual const hkClass* GetClassType() const; // 01 - { return 0; }
33  virtual void CalcContentStatistics(hkStatisticsCollector* a_collector, const hkClass* a_class) const; // 02
34 
35  void AddReference() const;
36  std::int32_t GetAllocatedSize() const;
37  std::int32_t GetReferenceCount() const;
38  void RemoveReference() const;
39 
40  // members
41  std::uint16_t memSizeAndFlags; // 08
42  volatile mutable std::int16_t referenceCount; // 0A
43  std::uint32_t pad0C; // 0C
44  private:
45  KEEP_FOR_RE()
46  };
47  static_assert(sizeof(hkReferencedObject) == 0x10);
48 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: hkBaseObject.h:6
Definition: hkReferencedObject.h:11
static constexpr auto VTABLE
Definition: hkReferencedObject.h:14
~hkReferencedObject() override=default
void AddReference() const
std::uint32_t pad0C
Definition: hkReferencedObject.h:43
virtual const hkClass * GetClassType() const
volatile std::int16_t referenceCount
Definition: hkReferencedObject.h:42
static constexpr auto RTTI
Definition: hkReferencedObject.h:13
LockMode
Definition: hkReferencedObject.h:17
std::int32_t GetAllocatedSize() const
void RemoveReference() const
@ kMemSize
Definition: hkReferencedObject.h:25
std::int32_t GetReferenceCount() const
std::uint16_t memSizeAndFlags
Definition: hkReferencedObject.h:41
virtual void CalcContentStatistics(hkStatisticsCollector *a_collector, const hkClass *a_class) const
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_hkReferencedObject(static_cast< std::uint64_t >(685129))
constexpr std::array< REL::ID, 1 > VTABLE_hkReferencedObject
Definition: Offsets_VTABLE.h:13863