// Copyright (C) 2015 Jérôme Leclercq // This file is part of the "Nazara Development Kit" // For conditions of distribution and use, see copyright notice in Prerequesites.hpp #pragma once #ifndef NDK_STATEMACHINE_HPP #define NDK_STATEMACHINE_HPP #include #include #include namespace Ndk { class StateMachine { public: inline StateMachine(); StateMachine(const StateMachine&) = delete; inline StateMachine(StateMachine&& fsm) = default; inline ~StateMachine(); inline void ChangeState(std::shared_ptr state); inline bool Update(float elapsedTime); inline StateMachine& operator=(StateMachine&& fsm) = default; StateMachine& operator=(const StateMachine&) = delete; private: std::shared_ptr m_currentState; std::shared_ptr m_nextState; }; } #include #endif // NDK_STATEMACHINE_HPP