#pragma once #include #include #include "_base/BaseJsModule.hpp" class AtlasJsModule : public QObject { Q_OBJECT public: explicit AtlasJsModule(QJSEngine* engine, QObject* parent = nullptr); /** * Import an Atlas submodule * @param name the name of the module to import * @return the module */ Q_INVOKABLE QJSValue require(const QString& name); /** * Get the version of the Atlas Javascript engine * @return the Atlas version */ Q_INVOKABLE static QJSValueList getVersion(); private: /// the parent JavaScript engine QJSEngine* engine; /// the submodules contained in this module std::map> submodules; };