CommonLibSSE NG
Interfaces.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "SKSE/Impl/Stubs.h"
4 #include "SKSE/Version.h"
5 
6 namespace RE
7 {
8  class GFxMovieView;
9  class GFxValue;
10  class InventoryEntryData;
11 
12  namespace BSScript
13  {
14  namespace Internal
15  {
16  class VirtualMachine;
17  }
18 
19  class IVirtualMachine;
20  }
21 }
22 
23 namespace SKSE
24 {
25  struct PluginInfo;
26 
28  {
29  public:
30  [[nodiscard]] std::uint32_t EditorVersion() const;
31  [[nodiscard]] bool IsEditor() const;
32  [[nodiscard]] REL::Version RuntimeVersion() const;
33  [[nodiscard]] std::uint32_t SKSEVersion() const;
34 
35  protected:
36  [[nodiscard]] const detail::SKSEInterface* GetProxy() const;
37  };
38 
40  {
41  public:
42  enum : std::uint32_t
43  {
44  kInvalid = 0,
52  kTotal
53  };
54 
55  [[nodiscard]] PluginHandle GetPluginHandle() const;
56  const PluginInfo* GetPluginInfo(const char* a_name) const;
57  [[nodiscard]] std::uint32_t GetReleaseIndex() const;
58  [[nodiscard]] void* QueryInterface(std::uint32_t a_id) const;
59  };
60 
62  {
63  public:
64  using RegCallback = bool(RE::GFxMovieView* a_view, RE::GFxValue* a_root);
65  using RegInvCallback = void(RE::GFxMovieView* a_view, RE::GFxValue* a_object, RE::InventoryEntryData* a_item);
66 
67  enum
68  {
69  kVersion = 2
70  };
71 
72  [[nodiscard]] std::uint32_t Version() const;
73 
74  bool Register(RegCallback* a_callback, const char* a_name) const;
75  void Register(RegInvCallback* a_callback) const;
76 
77  protected:
78  [[nodiscard]] const detail::SKSEScaleformInterface* GetProxy() const;
79  };
80 
82  {
83  public:
84  using EventCallback = void(SerializationInterface* a_intfc);
85  using FormDeleteCallback = void(RE::VMHandle a_handle);
86 
87  enum
88  {
89  kVersion = 4
90  };
91 
92  [[nodiscard]] std::uint32_t Version() const;
93 
94  void SetUniqueID(std::uint32_t a_uid) const;
95 
96  void SetFormDeleteCallback(FormDeleteCallback* a_callback) const;
97  void SetLoadCallback(EventCallback* a_callback) const;
98  void SetRevertCallback(EventCallback* a_callback) const;
99  void SetSaveCallback(EventCallback* a_callback) const;
100 
101  bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const void* a_buf, std::uint32_t a_length) const;
102 
103  template <
104  class T,
105  std::enable_if_t<
106  std::negation_v<
107  std::is_pointer<T>>,
108  int> = 0>
109  inline bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const T& a_buf) const
110  {
111  return WriteRecord(a_type, a_version, std::addressof(a_buf), sizeof(T));
112  }
113 
114  template <
115  class T,
116  std::size_t N,
117  std::enable_if_t<
118  std::is_array_v<T>,
119  int> = 0>
120  inline bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const T (&a_buf)[N]) const
121  {
122  return WriteRecord(a_type, a_version, std::addressof(a_buf), sizeof(T) * N);
123  }
124 
125  [[nodiscard]] bool OpenRecord(std::uint32_t a_type, std::uint32_t a_version) const;
126 
127  bool WriteRecordData(const void* a_buf, std::uint32_t a_length) const;
128 
129  template <
130  class T,
131  std::enable_if_t<
132  std::negation_v<
133  std::is_pointer<T>>,
134  int> = 0>
135  inline bool WriteRecordData(const T& a_buf) const
136  {
137  return WriteRecordData(std::addressof(a_buf), sizeof(T));
138  }
139 
140  template <
141  class T,
142  std::size_t N,
143  std::enable_if_t<
144  std::is_array_v<T>,
145  int> = 0>
146  inline bool WriteRecordData(const T (&a_buf)[N]) const
147  {
148  return WriteRecordData(std::addressof(a_buf), sizeof(T) * N);
149  }
150 
151  bool GetNextRecordInfo(std::uint32_t& a_type, std::uint32_t& a_version, std::uint32_t& a_length) const;
152 
153  std::uint32_t ReadRecordData(void* a_buf, std::uint32_t a_length) const;
154 
155  template <
156  class T,
157  std::enable_if_t<
158  std::negation_v<
159  std::is_pointer<T>>,
160  int> = 0>
161  inline std::uint32_t ReadRecordData(T& a_buf) const
162  {
163  return ReadRecordData(std::addressof(a_buf), sizeof(T));
164  }
165 
166  template <
167  class T,
168  std::size_t N,
169  std::enable_if_t<
170  std::is_array_v<T>,
171  int> = 0>
172  inline std::uint32_t ReadRecordData(T (&a_buf)[N]) const
173  {
174  return ReadRecordData(std::addressof(a_buf), sizeof(T) * N);
175  }
176 
177  bool ResolveFormID(RE::FormID a_oldFormID, RE::FormID& a_newFormID) const;
178  bool ResolveHandle(RE::VMHandle a_oldHandle, RE::VMHandle& a_newHandle) const;
179 
180  protected:
181  [[nodiscard]] const detail::SKSESerializationInterface* GetProxy() const;
182  };
183 
185  {
186  public:
187  using TaskFn = std::function<void()>;
188 
189  enum
190  {
191  kVersion = 2
192  };
193 
194  [[nodiscard]] std::uint32_t Version() const;
195 
196  void AddTask(TaskFn a_task) const;
197  void AddTask(TaskDelegate* a_task) const;
198  void AddUITask(TaskFn a_task) const;
199  void AddUITask(UIDelegate_v1* a_task) const;
200 
201  protected:
202  class Task : public detail::TaskDelegate
203  {
204  public:
205  Task(TaskFn&& a_fn);
206 
207  void Run() override;
208  void Dispose() override;
209 
210  private:
211  TaskFn _fn;
212  };
213 
215  {
216  public:
217  UITask(TaskFn&& a_fn);
218 
219  void Run() override;
220  void Dispose() override;
221 
222  private:
223  TaskFn _fn;
224  };
225 
226  [[nodiscard]] const detail::SKSETaskInterface* GetProxy() const;
227  };
228 
230  {
231  public:
234 
235  enum
236  {
237  kVersion = 1
238  };
239 
240  [[nodiscard]] std::uint32_t Version() const;
241 
242  template <class Last>
243  bool Register(Last a_last) const
244  {
245  return Register_Impl(a_last);
246  }
247 
248  template <class First, class... Rest>
249  bool Register(First a_first, Rest... a_rest) const
250  {
251  return Register_Impl(a_first) && Register(a_rest...);
252  }
253 
254  protected:
255  [[nodiscard]] const detail::SKSEPapyrusInterface* GetProxy() const;
256 
257  private:
258  bool Register_Impl(RegFunction1* a_fn) const;
259  bool Register_Impl(RegFunction2* a_fn) const;
260  };
261 
263  {
264  public:
265  struct Message
266  {
267  const char* sender;
268  std::uint32_t type;
269  std::uint32_t dataLen;
270  void* data;
271  };
272 
273  using EventCallback = void(Message* a_msg);
274 
275  enum
276  {
277  kVersion = 2
278  };
279 
280  enum : std::uint32_t
281  {
291 
292  kTotal
293  };
294 
295  enum class Dispatcher : std::uint32_t
296  {
297  kModEvent = 0,
298  kCameraEvent,
300  kActionEvent,
302 
303  kTotal
304  };
305 
306  [[nodiscard]] std::uint32_t Version() const;
307 
308  bool Dispatch(std::uint32_t a_messageType, void* a_data, std::uint32_t a_dataLen, const char* a_receiver) const;
309  [[nodiscard]] void* GetEventDispatcher(Dispatcher a_dispatcherID) const;
310  bool RegisterListener(EventCallback* a_callback) const;
311  bool RegisterListener(const char* a_sender, EventCallback* a_callback) const;
312 
313  protected:
314  [[nodiscard]] const detail::SKSEMessagingInterface* GetProxy() const;
315  };
316 
318  {
319  public:
320  enum
321  {
322  kVersion = 1
323  };
324 
325  [[nodiscard]] std::uint32_t Version() const;
326 
327  [[nodiscard]] SKSEDelayFunctorManager& GetDelayFunctorManager() const;
328  [[nodiscard]] SKSEObjectRegistry& GetObjectRegistry() const;
329  [[nodiscard]] SKSEPersistentObjectStorage& GetPersistentObjectStorage() const;
330 
331  private:
332  [[nodiscard]] const detail::SKSEObjectInterface* GetProxy() const;
333  };
334 
336  {
337  public:
338  enum
339  {
340  kVersion = 1
341  };
342 
343  [[nodiscard]] std::uint32_t Version() const;
344 
345  [[nodiscard]] void* AllocateFromBranchPool(std::size_t a_size) const;
346  [[nodiscard]] void* AllocateFromLocalPool(std::size_t a_size) const;
347 
348  private:
349  [[nodiscard]] const detail::SKSETrampolineInterface* GetProxy() const;
350  };
351 
352  struct PluginInfo
353  {
354  enum
355  {
356  kVersion = 1
357  };
358 
359  std::uint32_t infoVersion;
360  const char* name;
361  std::uint32_t version;
362  };
363 
365  {
366  public:
367  enum
368  {
369  kVersion = 1,
370  };
371 
372  constexpr void AuthorEmail(std::string_view a_email) noexcept { SetCharBuffer(a_email, std::span{ supportEmail }); }
373  constexpr void AuthorName(std::string_view a_name) noexcept { SetCharBuffer(a_name, std::span{ author }); }
374 
375  constexpr void CompatibleVersions(std::initializer_list<REL::Version> a_versions) noexcept
376  {
377  assert(a_versions.size() < std::size(compatibleVersions) - 1);
378  std::transform(
379  a_versions.begin(),
380  a_versions.end(),
381  std::begin(compatibleVersions),
382  [](const REL::Version& a_version) noexcept { return a_version.pack(); });
383  }
384 
385  constexpr void MinimumRequiredXSEVersion(REL::Version a_version) noexcept { xseMinimum = a_version.pack(); }
386  constexpr void PluginName(std::string_view a_plugin) noexcept { SetCharBuffer(a_plugin, std::span{ pluginName }); }
387  constexpr void PluginVersion(REL::Version a_version) noexcept { pluginVersion = a_version.pack(); }
388  constexpr void HasNoStructUse(bool a_value = true) noexcept { noStructUse = a_value; }
389  constexpr void UsesNoStructs(bool a_value = true) noexcept { noStructUse = a_value; }
390  constexpr void UsesAddressLibrary(bool a_value = true) noexcept { addressLibrary = a_value; }
391  constexpr void UsesSigScanning(bool a_value = true) noexcept { sigScanning = a_value; }
392  constexpr void UsesStructsPost629(bool a_value = true) noexcept { structsPost629 = a_value; }
393 
394  const std::uint32_t dataVersion{ kVersion };
395  std::uint32_t pluginVersion = 0;
396  char pluginName[256] = {};
397  char author[256] = {};
398  char supportEmail[252] = {};
399  bool noStructUse : 1 = false;
400  std::uint8_t padding1 : 7 = 0;
401  std::uint8_t padding2 = 0;
402  std::uint16_t padding3 = 0;
403  bool addressLibrary: 1 = false;
404  bool sigScanning: 1 = false;
405  bool structsPost629 : 1 = false;
406  std::uint8_t padding4: 5 = 0;
407  std::uint8_t padding5 = 0;
408  std::uint16_t padding6 = 0;
409  std::uint32_t compatibleVersions[16] = {};
410  std::uint32_t xseMinimum = 0;
411 
412  private:
413  static constexpr void SetCharBuffer(
414  std::string_view a_src,
415  std::span<char> a_dst) noexcept
416  {
417  assert(a_src.size() < a_dst.size());
418  std::fill(a_dst.begin(), a_dst.end(), '\0');
419  std::copy(a_src.begin(), a_src.end(), a_dst.begin());
420  }
421  };
422  static_assert(offsetof(PluginVersionData, dataVersion) == 0x000);
423  static_assert(offsetof(PluginVersionData, pluginVersion) == 0x004);
424  static_assert(offsetof(PluginVersionData, pluginName) == 0x008);
425  static_assert(offsetof(PluginVersionData, author) == 0x108);
426  static_assert(offsetof(PluginVersionData, supportEmail) == 0x208);
427  static_assert(offsetof(PluginVersionData, padding2) == 0x305);
428  static_assert(offsetof(PluginVersionData, padding3) == 0x306);
429  static_assert(offsetof(PluginVersionData, padding5) == 0x309);
430  static_assert(offsetof(PluginVersionData, padding6) == 0x30A);
431  static_assert(offsetof(PluginVersionData, compatibleVersions) == 0x30C);
432  static_assert(offsetof(PluginVersionData, xseMinimum) == 0x34C);
433  static_assert(sizeof(PluginVersionData) == 0x350);
434 
436  {
441  };
442 
443  enum class StructCompatibility : std::uint32_t
444  {
445  Dependent = 0,
446  Independent = 1
447  };
448 
450  {
451  public:
452  template <std::size_t N>
453  class String
454  {
455  public:
456  constexpr String() = default;
457 
458  constexpr String(std::string_view a_string) noexcept
459  {
460  std::span<char> buffer(_buffer, N);
461  std::fill(buffer.begin(), buffer.end(), '\0');
462  std::copy(a_string.begin(), a_string.end(), buffer.begin());
463  }
464 
465  constexpr String(const char* a_string) noexcept
466  {
467  std::string_view string(a_string);
468  std::span<char> buffer(_buffer, N);
469  std::fill(buffer.begin(), buffer.end(), '\0');
470  std::copy(string.begin(), string.end(), buffer.begin());
471  }
472 
473  [[nodiscard]] constexpr operator const char*() const noexcept
474  {
475  return _buffer;
476  }
477 
478  [[nodiscard]] constexpr operator std::string_view() const noexcept
479  {
480  return _buffer;
481  }
482 
483  private:
484  char _buffer[N]{};
485  };
486 
488  {
489  public:
491 
492  constexpr VersionNumber(value_type a_major = 1, value_type a_minor = 0, value_type a_patch = 0,
493  value_type a_build = 0) noexcept :
494  _packed(REL::Version{ a_major, a_minor, a_patch, a_build }.pack())
495  {}
496 
497  constexpr VersionNumber(REL::Version a_version) noexcept :
498  _packed(a_version.pack()) {}
499 
500  constexpr VersionNumber& operator=(REL::Version a_version) noexcept
501  {
502  _packed = a_version.pack();
503  return *this;
504  }
505 
506  [[nodiscard]] constexpr operator REL::Version() const noexcept
507  {
508  return REL::Version::unpack(_packed);
509  }
510 
511  [[nodiscard]] constexpr explicit operator std::uint32_t() const noexcept
512  {
513  return _packed;
514  }
515 
516  private:
517  std::uint32_t _packed{};
518  };
519 
521  {
522  public:
523  static constexpr std::size_t MaxCompatibleVersions = 16;
524 
525  constexpr RuntimeCompatibility() = default;
526 
527  template <class... Args>
528  requires(sizeof...(Args) <= MaxCompatibleVersions && (std::convertible_to<Args, VersionNumber> && ...))
529  constexpr RuntimeCompatibility(Args... a_compatibleVersions) noexcept :
530  _addressLibrary(false), _compatibleVersions({ VersionNumber(a_compatibleVersions)... })
531  {
532  }
533 
534  constexpr RuntimeCompatibility(VersionIndependence a_versionIndependence, bool a_requiresPost629Structs = false) noexcept :
535  _addressLibrary(a_versionIndependence == VersionIndependence::AddressLibrary),
536  _signatureScanning(a_versionIndependence == VersionIndependence::SignatureScanning),
537  _structsPost629(a_requiresPost629Structs) {}
538 
539  [[nodiscard]] constexpr bool UsesAddressLibrary() const noexcept
540  {
541  return _addressLibrary;
542  }
543 
544  [[nodiscard]] constexpr bool UsesSignatureScanning() const noexcept
545  {
546  return _signatureScanning;
547  }
548 
549  [[nodiscard]] constexpr bool Targets629Structs() const noexcept
550  {
551  return _structsPost629;
552  }
553 
554  [[nodiscard]] constexpr bool IsVersionIndependent() const noexcept
555  {
557  }
558 
559  [[nodiscard]] constexpr std::array<VersionNumber, 16> GetCompatibleRuntimeVersions() const noexcept
560  {
561  return _compatibleVersions;
562  }
563 
564  private:
565  const bool _addressLibrary : 1 = true;
566  const bool _signatureScanning: 1 = false;
567  const bool _structsPost629 : 1 = false;
568  [[maybe_unused]] const std::uint8_t _pad0: 5 = 0;
569  [[maybe_unused]] const std::uint8_t _pad1{ 0 };
570  [[maybe_unused]] const std::uint16_t _pad2{ 0 };
571  std::array<VersionNumber, 16> _compatibleVersions{};
572  };
573  static_assert(sizeof(RuntimeCompatibility) == 0x44);
574 
576  {
580  const VersionNumber Version{ 1, 0, 0, 0 };
581 
585  const String<256> Name{};
586 
591 
596 
608 
619 
624  };
625  static_assert(offsetof(PluginDeclarationInfo, Version) == 0x000);
626  static_assert(offsetof(PluginDeclarationInfo, Name) == 0x004);
627  static_assert(offsetof(PluginDeclarationInfo, Author) == 0x104);
628  static_assert(offsetof(PluginDeclarationInfo, SupportEmail) == 0x204);
629  static_assert(offsetof(PluginDeclarationInfo, StructCompatibility) == 0x300);
630  static_assert(offsetof(PluginDeclarationInfo, RuntimeCompatibility) == 0x304);
631  static_assert(offsetof(PluginDeclarationInfo, MinimumSKSEVersion) == 0x348);
632 
633  constexpr PluginDeclaration(PluginDeclarationInfo info) noexcept :
634  _data(std::move(info)) {}
635 
636  [[nodiscard]] constexpr REL::Version GetVersion() const noexcept
637  {
638  return _data.Version;
639  }
640 
641  [[nodiscard]] constexpr std::string_view GetName() const noexcept
642  {
643  return _data.Name;
644  }
645 
646  [[nodiscard]] constexpr std::string_view GetAuthor() const noexcept
647  {
648  return _data.Author;
649  }
650 
651  [[nodiscard]] constexpr std::string_view GetSupportEmail() const noexcept
652  {
653  return _data.SupportEmail;
654  }
655 
656  [[nodiscard]] constexpr StructCompatibility GetStructCompatibility() const noexcept
657  {
658  return _data.StructCompatibility;
659  }
660 
661  [[nodiscard]] constexpr const RuntimeCompatibility& GetRuntimeCompatibility() const noexcept
662  {
663  return _data.RuntimeCompatibility;
664  }
665 
666  [[nodiscard]] constexpr REL::Version GetMinimumSKSEVersion() const noexcept
667  {
668  return _data.MinimumSKSEVersion;
669  }
670 
671  [[nodiscard]] static const PluginDeclaration* GetSingleton() noexcept;
672 
673  private:
674  enum
675  {
676  kVersion = 1,
677  };
678 
679  [[maybe_unused]] const std::uint32_t _dataVersion{ kVersion };
680  [[maybe_unused]] const PluginDeclarationInfo _data;
681  };
682  static_assert(sizeof(PluginDeclaration) == 0x350);
683 }
684 
685 #define SKSEPluginInfo(...) \
686  extern "C" [[maybe_unused]] __declspec(dllexport) constinit ::SKSE::PluginDeclaration SKSEPlugin_Version({ __VA_ARGS__ }); \
687  extern "C" [[maybe_unused]] __declspec(dllexport) bool SKSEPlugin_Query(::SKSE::QueryInterface*, ::SKSE::PluginInfo* pluginInfo) \
688  { \
689  pluginInfo->infoVersion = ::SKSE::PluginInfo::kVersion; \
690  pluginInfo->name = SKSEPlugin_Version.GetName().data(); \
691  pluginInfo->version = static_cast<std::uint32_t>(SKSEPlugin_Version.GetVersion().pack()); \
692  return true; \
693  }
694 
695 #define SKSEPluginLoad(...) extern "C" [[maybe_unused]] __declspec(dllexport) bool SKSEPlugin_Load(__VA_ARGS__)
Definition: Version.h:6
static constexpr Version unpack(std::uint32_t a_packedVersion) noexcept
Definition: Version.h:112
std::uint16_t value_type
Definition: Version.h:8
Definition: IVirtualMachine.h:39
Definition: VirtualMachine.h:46
Definition: GFxMovieView.h:24
Definition: GFxValue.h:92
Definition: InventoryEntryData.h:15
Definition: Interfaces.h:40
void * QueryInterface(std::uint32_t a_id) const
@ kTrampoline
Definition: Interfaces.h:51
@ kMessaging
Definition: Interfaces.h:49
@ kPapyrus
Definition: Interfaces.h:46
@ kSerialization
Definition: Interfaces.h:47
@ kObject
Definition: Interfaces.h:50
@ kTask
Definition: Interfaces.h:48
@ kInvalid
Definition: Interfaces.h:44
@ kScaleform
Definition: Interfaces.h:45
@ kTotal
Definition: Interfaces.h:52
const PluginInfo * GetPluginInfo(const char *a_name) const
PluginHandle GetPluginHandle() const
std::uint32_t GetReleaseIndex() const
Definition: Interfaces.h:263
@ kTotal
Definition: Interfaces.h:292
@ kPostPostLoad
Definition: Interfaces.h:283
@ kPostLoad
Definition: Interfaces.h:282
@ kPreLoadGame
Definition: Interfaces.h:284
@ kSaveGame
Definition: Interfaces.h:286
@ kNewGame
Definition: Interfaces.h:289
@ kDataLoaded
Definition: Interfaces.h:290
@ kInputLoaded
Definition: Interfaces.h:288
@ kDeleteGame
Definition: Interfaces.h:287
@ kPostLoadGame
Definition: Interfaces.h:285
Dispatcher
Definition: Interfaces.h:296
std::uint32_t Version() const
void * GetEventDispatcher(Dispatcher a_dispatcherID) const
bool Dispatch(std::uint32_t a_messageType, void *a_data, std::uint32_t a_dataLen, const char *a_receiver) const
bool RegisterListener(const char *a_sender, EventCallback *a_callback) const
const detail::SKSEMessagingInterface * GetProxy() const
bool RegisterListener(EventCallback *a_callback) const
@ kVersion
Definition: Interfaces.h:277
void(Message *a_msg) EventCallback
Definition: Interfaces.h:273
Definition: Interfaces.h:318
SKSEDelayFunctorManager & GetDelayFunctorManager() const
SKSEPersistentObjectStorage & GetPersistentObjectStorage() const
std::uint32_t Version() const
@ kVersion
Definition: Interfaces.h:322
SKSEObjectRegistry & GetObjectRegistry() const
Definition: Interfaces.h:230
bool Register(First a_first, Rest... a_rest) const
Definition: Interfaces.h:249
std::uint32_t Version() const
@ kVersion
Definition: Interfaces.h:237
const detail::SKSEPapyrusInterface * GetProxy() const
bool(RE::BSScript::Internal::VirtualMachine *a_vm) RegFunction1
Definition: Interfaces.h:232
bool(RE::BSScript::IVirtualMachine *a_vm) RegFunction2
Definition: Interfaces.h:233
bool Register(Last a_last) const
Definition: Interfaces.h:243
constexpr bool Targets629Structs() const noexcept
Definition: Interfaces.h:549
constexpr RuntimeCompatibility(VersionIndependence a_versionIndependence, bool a_requiresPost629Structs=false) noexcept
Definition: Interfaces.h:534
constexpr std::array< VersionNumber, 16 > GetCompatibleRuntimeVersions() const noexcept
Definition: Interfaces.h:559
static constexpr std::size_t MaxCompatibleVersions
Definition: Interfaces.h:523
constexpr bool IsVersionIndependent() const noexcept
Definition: Interfaces.h:554
requires(sizeof...(Args)<=MaxCompatibleVersions &&(std::convertible_to< Args, VersionNumber > &&...)) const expr RuntimeCompatibility(Args... a_compatibleVersions) noexcept
Definition: Interfaces.h:528
constexpr bool UsesAddressLibrary() const noexcept
Definition: Interfaces.h:539
constexpr bool UsesSignatureScanning() const noexcept
Definition: Interfaces.h:544
Definition: Interfaces.h:454
constexpr String(const char *a_string) noexcept
Definition: Interfaces.h:465
constexpr String(std::string_view a_string) noexcept
Definition: Interfaces.h:458
constexpr String()=default
Definition: Interfaces.h:488
constexpr VersionNumber & operator=(REL::Version a_version) noexcept
Definition: Interfaces.h:500
constexpr VersionNumber(value_type a_major=1, value_type a_minor=0, value_type a_patch=0, value_type a_build=0) noexcept
Definition: Interfaces.h:492
typename REL::Version::value_type value_type
Definition: Interfaces.h:490
constexpr VersionNumber(REL::Version a_version) noexcept
Definition: Interfaces.h:497
Definition: Interfaces.h:28
std::uint32_t EditorVersion() const
REL::Version RuntimeVersion() const
const detail::SKSEInterface * GetProxy() const
std::uint32_t SKSEVersion() const
bool IsEditor() const
Definition: Interfaces.h:62
void(RE::GFxMovieView *a_view, RE::GFxValue *a_object, RE::InventoryEntryData *a_item) RegInvCallback
Definition: Interfaces.h:65
void Register(RegInvCallback *a_callback) const
@ kVersion
Definition: Interfaces.h:69
bool Register(RegCallback *a_callback, const char *a_name) const
const detail::SKSEScaleformInterface * GetProxy() const
std::uint32_t Version() const
bool(RE::GFxMovieView *a_view, RE::GFxValue *a_root) RegCallback
Definition: Interfaces.h:64
Definition: Interfaces.h:82
bool ResolveHandle(RE::VMHandle a_oldHandle, RE::VMHandle &a_newHandle) const
void SetLoadCallback(EventCallback *a_callback) const
@ kVersion
Definition: Interfaces.h:89
void SetFormDeleteCallback(FormDeleteCallback *a_callback) const
std::uint32_t ReadRecordData(T &a_buf) const
Definition: Interfaces.h:161
bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const T(&a_buf)[N]) const
Definition: Interfaces.h:120
void(SerializationInterface *a_intfc) EventCallback
Definition: Interfaces.h:84
bool WriteRecordData(const T &a_buf) const
Definition: Interfaces.h:135
void(RE::VMHandle a_handle) FormDeleteCallback
Definition: Interfaces.h:85
std::uint32_t ReadRecordData(void *a_buf, std::uint32_t a_length) const
void SetRevertCallback(EventCallback *a_callback) const
bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const T &a_buf) const
Definition: Interfaces.h:109
void SetUniqueID(std::uint32_t a_uid) const
bool WriteRecordData(const void *a_buf, std::uint32_t a_length) const
bool GetNextRecordInfo(std::uint32_t &a_type, std::uint32_t &a_version, std::uint32_t &a_length) const
void SetSaveCallback(EventCallback *a_callback) const
std::uint32_t ReadRecordData(T(&a_buf)[N]) const
Definition: Interfaces.h:172
const detail::SKSESerializationInterface * GetProxy() const
bool ResolveFormID(RE::FormID a_oldFormID, RE::FormID &a_newFormID) const
bool WriteRecordData(const T(&a_buf)[N]) const
Definition: Interfaces.h:146
std::uint32_t Version() const
bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const void *a_buf, std::uint32_t a_length) const
bool OpenRecord(std::uint32_t a_type, std::uint32_t a_version) const
Definition: Interfaces.h:203
void Dispose() override
Definition: Interfaces.h:215
Definition: Interfaces.h:185
void AddUITask(UIDelegate_v1 *a_task) const
std::function< void()> TaskFn
Definition: Interfaces.h:187
void AddTask(TaskFn a_task) const
void AddUITask(TaskFn a_task) const
@ kVersion
Definition: Interfaces.h:191
void AddTask(TaskDelegate *a_task) const
const detail::SKSETaskInterface * GetProxy() const
std::uint32_t Version() const
Definition: Interfaces.h:336
std::uint32_t Version() const
@ kVersion
Definition: Interfaces.h:340
void * AllocateFromLocalPool(std::size_t a_size) const
void * AllocateFromBranchPool(std::size_t a_size) const
Definition: Stubs.h:99
Definition: Stubs.h:106
Definition: ID.h:6
Definition: AbsorbEffect.h:6
std::uint32_t FormID
Definition: BSCoreTypes.h:5
std::uint64_t VMHandle
Definition: BSCoreTypes.h:7
string(const CharT(&)[N]) -> string< CharT, N - 1 >
Definition: API.h:14
std::uint32_t PluginHandle
Definition: Stubs.h:11
VersionIndependence
Definition: Interfaces.h:436
StructCompatibility
Definition: Interfaces.h:444
Definition: Interfaces.h:266
std::uint32_t dataLen
Definition: Interfaces.h:269
const char * sender
Definition: Interfaces.h:267
std::uint32_t type
Definition: Interfaces.h:268
void * data
Definition: Interfaces.h:270
const String< 256 > Name
Definition: Interfaces.h:585
const VersionNumber MinimumSKSEVersion
Definition: Interfaces.h:623
const StructCompatibility StructCompatibility
Definition: Interfaces.h:607
const String< 256 > Author
Definition: Interfaces.h:590
const VersionNumber Version
Definition: Interfaces.h:580
const String< 252 > SupportEmail
Definition: Interfaces.h:595
const RuntimeCompatibility RuntimeCompatibility
Definition: Interfaces.h:618
Definition: Interfaces.h:450
constexpr const RuntimeCompatibility & GetRuntimeCompatibility() const noexcept
Definition: Interfaces.h:661
constexpr std::string_view GetAuthor() const noexcept
Definition: Interfaces.h:646
constexpr PluginDeclaration(PluginDeclarationInfo info) noexcept
Definition: Interfaces.h:633
constexpr std::string_view GetName() const noexcept
Definition: Interfaces.h:641
constexpr REL::Version GetMinimumSKSEVersion() const noexcept
Definition: Interfaces.h:666
static const PluginDeclaration * GetSingleton() noexcept
constexpr REL::Version GetVersion() const noexcept
Definition: Interfaces.h:636
constexpr std::string_view GetSupportEmail() const noexcept
Definition: Interfaces.h:651
constexpr StructCompatibility GetStructCompatibility() const noexcept
Definition: Interfaces.h:656
Definition: Interfaces.h:353
std::uint32_t version
Definition: Interfaces.h:361
const char * name
Definition: Interfaces.h:360
std::uint32_t infoVersion
Definition: Interfaces.h:359
@ kVersion
Definition: Interfaces.h:356
Definition: Interfaces.h:365
@ kVersion
Definition: Interfaces.h:369
std::uint8_t padding5
Definition: Interfaces.h:407
constexpr void HasNoStructUse(bool a_value=true) noexcept
Definition: Interfaces.h:388
std::uint16_t padding6
Definition: Interfaces.h:408
constexpr void UsesNoStructs(bool a_value=true) noexcept
Definition: Interfaces.h:389
std::uint8_t padding4
Definition: Interfaces.h:406
bool structsPost629
Definition: Interfaces.h:405
constexpr void MinimumRequiredXSEVersion(REL::Version a_version) noexcept
Definition: Interfaces.h:385
constexpr void PluginName(std::string_view a_plugin) noexcept
Definition: Interfaces.h:386
std::uint16_t padding3
Definition: Interfaces.h:402
std::uint32_t pluginVersion
Definition: Interfaces.h:395
std::uint32_t xseMinimum
Definition: Interfaces.h:410
constexpr void CompatibleVersions(std::initializer_list< REL::Version > a_versions) noexcept
Definition: Interfaces.h:375
char pluginName[256]
Definition: Interfaces.h:396
constexpr void AuthorEmail(std::string_view a_email) noexcept
Definition: Interfaces.h:372
bool addressLibrary
Definition: Interfaces.h:403
constexpr void UsesStructsPost629(bool a_value=true) noexcept
Definition: Interfaces.h:392
std::uint8_t padding1
Definition: Interfaces.h:400
constexpr void PluginVersion(REL::Version a_version) noexcept
Definition: Interfaces.h:387
char author[256]
Definition: Interfaces.h:397
std::uint8_t padding2
Definition: Interfaces.h:401
bool sigScanning
Definition: Interfaces.h:404
constexpr void AuthorName(std::string_view a_name) noexcept
Definition: Interfaces.h:373
bool noStructUse
Definition: Interfaces.h:399
std::uint32_t compatibleVersions[16]
Definition: Interfaces.h:409
constexpr void UsesAddressLibrary(bool a_value=true) noexcept
Definition: Interfaces.h:390
const std::uint32_t dataVersion
Definition: Interfaces.h:394
char supportEmail[252]
Definition: Interfaces.h:398
constexpr void UsesSigScanning(bool a_value=true) noexcept
Definition: Interfaces.h:391
Definition: Stubs.h:27
Definition: Stubs.h:47
Definition: Stubs.h:85