Files
NazaraEngine/include/Nazara/Lua/LuaCoroutine.hpp
Gawaboumga bbac0838dd Include-What-You-Use (#137)
* IWYU Core

* IWYU Noise

* IWYU Utility

* IWYU Audio

* IWYU Platform

* IWYU Lua

* IWYU Network

* IWYU Physics2D

* IWYU Physics3D

* IWYU Renderer

* IWYU Graphics

* IWYU NDKServer

* IWYU Fix

* Try to fix compilation

* Other fixes
2017-10-01 11:17:09 +02:00

43 lines
973 B
C++

// Copyright (C) 2017 Jérôme Leclercq
// This file is part of the "Nazara Engine - Lua scripting module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_LUACOROUTINE_HPP
#define NAZARA_LUACOROUTINE_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Lua/LuaState.hpp>
namespace Nz
{
class NAZARA_LUA_API LuaCoroutine : public LuaState
{
friend class LuaState;
public:
LuaCoroutine(const LuaCoroutine&) = delete;
inline LuaCoroutine(LuaCoroutine&& instance);
~LuaCoroutine();
bool CanResume() const;
Ternary Resume(unsigned int argCount = 0);
LuaCoroutine& operator=(const LuaCoroutine&) = delete;
inline LuaCoroutine& operator=(LuaCoroutine&& instance);
private:
LuaCoroutine(lua_State* internalState, int refIndex);
bool Run(int argCount, int resultCount) override;
int m_ref;
};
}
#include <Nazara/Lua/LuaCoroutine.inl>
#endif // NAZARA_LUACOROUTINE_HPP