mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-05-06 17:51:36 +02:00
Added a new init.h to make the initialization a less code.
This commit is contained in:
parent
ffd1f7eb68
commit
6182dfeda9
33
init.h
Normal file
33
init.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef FRAMEWORK_INIT_H
|
||||||
|
#define FRAMEWORK_INIT_H
|
||||||
|
|
||||||
|
#if DATABASES_ENABLED
|
||||||
|
#include "database_backends/db_init.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "platform/platform_initializer.h"
|
||||||
|
|
||||||
|
// Backends
|
||||||
|
#include "crypto_backends/hash_hashlib/setup.h"
|
||||||
|
|
||||||
|
void initialize_framework() {
|
||||||
|
#if DATABASES_ENABLED
|
||||||
|
initialize_database_backends();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
backend_hash_hashlib_install_providers();
|
||||||
|
|
||||||
|
PlatformInitializer::allocate_all();
|
||||||
|
}
|
||||||
|
|
||||||
|
void initialize_framework_args(int argc, char **argv, char **envp) {
|
||||||
|
initialize_framework();
|
||||||
|
|
||||||
|
PlatformInitializer::arg_setup(argc, argv, envp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void uninitialize_framework() {
|
||||||
|
PlatformInitializer::free_all();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user