Changeset View
Changeset View
Standalone View
Standalone View
src/qmljsc/moduleloading/moduleloading.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 44 | public: | |||
---|---|---|---|---|---|
45 | /** | 45 | /** | ||
46 | * Initializes module loading. | 46 | * Initializes module loading. | ||
47 | * Creates a AbstractModuleLoader object and runs it through QThreadPool. | 47 | * Creates a AbstractModuleLoader object and runs it through QThreadPool. | ||
48 | * Beware, that it is an asynchronous function and returns a valid but | 48 | * Beware, that it is an asynchronous function and returns a valid but | ||
49 | * uncompleted Module as soon as loading *started* (not when finished). | 49 | * uncompleted Module as soon as loading *started* (not when finished). | ||
50 | * | 50 | * | ||
51 | * This function is to be called from the compile-unit thread. | 51 | * This function is to be called from the compile-unit thread. | ||
52 | */ | 52 | */ | ||
53 | static IR::Module *loadModule(IR::ImportDescription import); | 53 | static IR::Module *loadModule(QString name, int versionMajor, int versionMinor); | ||
54 | 54 | | |||
55 | static void registerModuleLoader(ModuleLoaderFactoryFunc factory); | 55 | static void registerModuleLoader(ModuleLoaderFactoryFunc factory); | ||
56 | 56 | | |||
57 | private: | 57 | private: | ||
58 | static QHash<IR::ImportDescription, IR::Module*> s_loadedModules; | 58 | static QHash<QString, IR::Module*> s_loadedModules; | ||
59 | static QVector<ModuleLoaderFactoryFunc> s_moduleLoaderFactories; | 59 | static QVector<ModuleLoaderFactoryFunc> s_moduleLoaderFactories; | ||
60 | }; | 60 | }; | ||
61 | 61 | | |||
62 | } // namespace QMLJSc | 62 | } // namespace QMLJSc | ||
63 | 63 | | |||
64 | #endif // MODULELOADING_H | 64 | #endif // MODULELOADING_H | ||
65 | 65 | |