siplasplas
A library for C++ reflection and introspection
runtimeloader.hpp
1 #ifndef SIPLASPLAS_REFLECTION_DYNAMIC_RUNTIMELOADER_HPP
2 #define SIPLASPLAS_REFLECTION_DYNAMIC_RUNTIMELOADER_HPP
3 
4 #include <siplasplas/reflection/dynamic/export.hpp>
5 #include <siplasplas/reflection/dynamic/runtime.hpp>
6 #include <siplasplas/utility/dynamiclibrary.hpp>
7 #include <siplasplas/variant/optional.hpp>
8 
9 namespace cpp
10 {
11 
12 namespace dynamic_reflection
13 {
14 
19 class SIPLASPLAS_REFLECTION_DYNAMIC_EXPORT RuntimeLoader
20 {
21 public:
27  RuntimeLoader() = default;
28 
38  RuntimeLoader(const cpp::DynamicLibrary& library);
39 
53  void load(const cpp::DynamicLibrary& library);
54 
58  Runtime& runtime();
59 
60 private:
61  Optional<cpp::DynamicLibrary> _library;
63 
64  cpp::DynamicLibrary::Symbol& getRuntimeLoader();
65 };
66 
67 }
68 
69 }
70 
71 #endif // SIPLASPLAS_REFLECTION_DYNAMIC_RUNTIMELOADER_HPP
Represents a symbol loaded from a dynamic library.
Definition: dynamiclibrary.hpp:71
Definition: canary_allocator.hpp:7
Provides access to dynamic type and function information at runtime.
Definition: runtime.hpp:16
Provides a cross-platform interface to load symbols from shared libraries at runtime.
Definition: dynamiclibrary.hpp:27
Loads dynamic reflection information from an external library.
Definition: runtimeloader.hpp:19