Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Factory.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <Jolt/Core/RTTI.h>
9
11
14{
15public:
17
19 void * CreateObject(const char *inName);
20
22 const RTTI * Find(const char *inName);
23
25 const RTTI * Find(uint32 inHash);
26
28 bool Register(const RTTI *inRTTI);
29
31 bool Register(const RTTI **inRTTIs, uint inNumber);
32
34 void Clear();
35
37 Array<const RTTI *> GetAllClasses() const;
38
41
42private:
44
46
48 ClassNameMap mClassNameMap;
49
50 // Map of class hash to type info
51 ClassHashMap mClassHashMap;
52};
53
#define JPH_EXPORT
Definition Core.h:236
unsigned int uint
Definition Core.h:453
#define JPH_NAMESPACE_END
Definition Core.h:379
std::uint32_t uint32
Definition Core.h:456
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:31
Definition Array.h:36
This class is responsible for creating instances of classes based on their name or hash and is mainly...
Definition Factory.h:14
static Factory * sInstance
Singleton factory instance.
Definition Factory.h:40
Definition RTTI.h:122