- Some underlying features for RTTI
- Macro for automatically generating this_t - Semantics with static_constructor.h, now FENNEC_PRIVATE_STATIC_CONSTRUCTOR for .cpp files and FENNEC_CLASS_STATIC_CONSTRUCTOR for a class in any source file type.
This commit is contained in:
@@ -21,32 +21,10 @@
|
||||
namespace fennec
|
||||
{
|
||||
|
||||
template<typename CtorT>
|
||||
static constexpr void insert_driver(list<platform::driver<CtorT>>& drvrs, CtorT ctor, int priority) {
|
||||
using list_t = list<platform::driver<CtorT>>;
|
||||
using iter_t = typename list_t::iterator;
|
||||
|
||||
iter_t it = drvrs.begin();
|
||||
while (it != drvrs.end()) {
|
||||
if (priority >= it->priority) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
drvrs.insert(it, { priority, ctor });
|
||||
}
|
||||
|
||||
void platform::initialize() {
|
||||
}
|
||||
|
||||
void platform::shutdown() {
|
||||
}
|
||||
|
||||
window* platform::create_window(const window::config&) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void platform::register_window_driver(window_driver&& driver) {
|
||||
globals.windows.insert(fennec::forward<window_driver>(driver));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
#include <fennec/lang/filesystem/file.h>
|
||||
#include <fennec/platform/linux/platform.h>
|
||||
|
||||
#include <fennec/langcpp/startup.h>
|
||||
#include <fennec/langcpp/static_constructor.h>
|
||||
|
||||
namespace fennec
|
||||
{
|
||||
|
||||
FENNEC_STATIC_CONSTRUCTOR(_init_linux) {
|
||||
FENNEC_PRIVATE_STATIC_CONSTRUCTOR(_init_linux) {
|
||||
static linux_platform platform;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user