2019-10-03 00:05:40 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* luaEngine Lua Engine for Qt
|
|
|
|
* Copyright (C) 2019 Syping
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef LUAENGINEIO_H
|
|
|
|
#define LUAENGINEIO_H
|
|
|
|
|
|
|
|
#include "LuaEngineIO_global.h"
|
2020-05-14 14:09:07 +02:00
|
|
|
#include "LuaEngineAddon.h"
|
2019-10-03 00:05:40 +02:00
|
|
|
#include "LuaEngine.h"
|
|
|
|
#include <QString>
|
|
|
|
#include <QObject>
|
|
|
|
|
2020-05-14 14:09:07 +02:00
|
|
|
class LUAENGINEIOSHARED_EXPORT LuaEngineIO : public LuaEngineAddon
|
2019-10-03 00:05:40 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static void pushClass(lua_State *L_p);
|
|
|
|
static void pushClass(LuaEngine *luaEngine);
|
2019-11-04 13:15:51 +01:00
|
|
|
static int checkDirectoryExists(lua_State *L_p);
|
|
|
|
static int checkFileExists(lua_State *L_p);
|
2019-10-24 09:07:32 +02:00
|
|
|
static int getDirectoryContent(lua_State *L_p);
|
2019-10-18 18:26:38 +02:00
|
|
|
static int getDirectoryPath(lua_State *L_p);
|
2019-10-24 09:07:32 +02:00
|
|
|
static int linkFile(lua_State *L_p);
|
2019-11-03 17:21:22 +01:00
|
|
|
static int jsonToTable(lua_State *L_p);
|
|
|
|
static int tableToJson(lua_State *L_p);
|
2019-10-03 00:05:40 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
lua_State *L;
|
|
|
|
static QString nameForPointer(void *pointer);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LUAENGINEIO_H
|