λ61
Loading...
Searching...
No Matches
l61::ScriptEngine::FileBackedScriptEnvironment Class Reference

#include <FileBackedScriptEnvironment.hpp>

Inheritance diagram for l61::ScriptEngine::FileBackedScriptEnvironment:
l61::ScriptEngine::ScriptEnvironment l61::Object l61::ScriptEngine::RunnableScriptEnvironment l61::ScriptEngine::BuildScript

Public Member Functions

const std::string & getScriptFilePath () const
std::string toString () const override
 Returns a human-readable string representation of the object.
 FileBackedScriptEnvironment (const std::string &scriptFilePath, l61_stat &scriptCtx)
 ~FileBackedScriptEnvironment () override=default
Public Member Functions inherited from l61::ScriptEngine::ScriptEnvironment
template<class T>
void addValue (const std::string &key, T &&value)
template<class T>
getValue (const std::string &key)
template<class T>
void setValue (const std::string &key, const T &value)
bool has (const std::string &key)
sol::table makeTable (const std::string &name)
 ScriptEnvironment (const ScriptEnvironment &)=delete
 ScriptEnvironment (ScriptEnvironment &&)=delete
ScriptEnvironmentoperator= (const ScriptEnvironment &)=delete
void specialRun (const std::function< void(sol::state &)> &func) override
void exec (const std::string &code) final
 for user input
void attachDebugger (AbstractScriptDebugger *debugger) override
sol::protected_function_result runCodeBlock (const std::string &luaCode) override
 ~ScriptEnvironment () override
Public Member Functions inherited from l61::Object
virtual ~Object ()=default
virtual std::size_t hashCode () const
 Returns a hash code for the object.
std::string typeName () const
 Returns the demangled name of the type.
const std::type_info & typeInfo () const
 Returns RTTI type information object.
virtual nlohmann::json toJsonValue () const
 Serializes the object into JSON form.
 operator std::string () const
 Explicit conversion operator to std::string.
 operator nlohmann::json () const
 Explicit conversion operator to nlohmann::json.

Private Attributes

const std::string scriptFilePath

Additional Inherited Members

Protected Member Functions inherited from l61::ScriptEngine::ScriptEnvironment
void lib61_setup ()
sol::state & getLuaCtx () override
l61_statgetScriptCtx ()
 ScriptEnvironment (l61_stat &scriptCtx)
Static Protected Member Functions inherited from l61::ScriptEngine::ScriptEnvironment
static sol::table lua_mountLib (sol::this_state state, const std::string &libraryName)

Constructor & Destructor Documentation

◆ FileBackedScriptEnvironment()

l61::ScriptEngine::FileBackedScriptEnvironment::FileBackedScriptEnvironment ( const std::string & scriptFilePath,
l61_stat & scriptCtx )
explicit

◆ ~FileBackedScriptEnvironment()

l61::ScriptEngine::FileBackedScriptEnvironment::~FileBackedScriptEnvironment ( )
overridedefault

Member Function Documentation

◆ getScriptFilePath()

const std::string & l61::ScriptEngine::FileBackedScriptEnvironment::getScriptFilePath ( ) const

◆ toString()

std::string l61::ScriptEngine::FileBackedScriptEnvironment::toString ( ) const
overridevirtual

Returns a human-readable string representation of the object.

Derived classes should override this to provide a meaningful textual description of their internal state. Default implementation may just return the type name or placeholder text.

Returns
std::string textual representation of the object.

Reimplemented from l61::Object.

Member Data Documentation

◆ scriptFilePath

const std::string l61::ScriptEngine::FileBackedScriptEnvironment::scriptFilePath
private

The documentation for this class was generated from the following files: