aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/config_builder/cfglazyinitializer.h
blob: d97edc284252005ce3e8c5ee407c2f85549449e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef CFGLAZYINITIALIZER_H
#define CFGLAZYINITIALIZER_H

#include "coreSQLiteStudio_global.h"
#include <QList>
#include <functional>

class API_EXPORT CfgLazyInitializer
{
    public:
        CfgLazyInitializer(std::function<void(void)> initFunc, const char* name);

        static void init();

    private:
        void doInitialize();

        std::function<void(void)> initFunc;

        static QList<CfgLazyInitializer*>* instances;
};

#endif // CFGLAZYINITIALIZER_H