43 lines
850 B
C++
43 lines
850 B
C++
#pragma once
|
|
|
|
#include <angelscript.h>
|
|
#include <VirtualFileSystem.hpp>
|
|
|
|
|
|
namespace atlas::script::engine {
|
|
|
|
/**
|
|
* @brief The Atlas script engine
|
|
* @details a wrapper around the AngelScript engine
|
|
*/
|
|
class Engine {
|
|
public:
|
|
explicit Engine();
|
|
~Engine();
|
|
|
|
/**
|
|
* The AngelScript message handler
|
|
* @param message an AngelScript message
|
|
* @param args additionnal arguments
|
|
*/
|
|
static void asCallback(const asSMessageInfo *message, void *args);
|
|
|
|
/**
|
|
* get the AngelScript engine
|
|
* @return the AngelScript engine
|
|
*/
|
|
[[nodiscard]] asIScriptEngine* getAsEngine() const;
|
|
|
|
/**
|
|
* get the file system
|
|
* @return the file system
|
|
*/
|
|
[[nodiscard]] vfs::VirtualFileSystem* getFileSystem() const;
|
|
|
|
private:
|
|
asIScriptEngine* asEngine;
|
|
vfs::VirtualFileSystem* fileSystem;
|
|
};
|
|
|
|
}
|
|
|