2022-09-08 11:08:23 +08:00
|
|
|
/*********************************************************************
|
|
|
|
* \file SHSystem.h
|
|
|
|
* \author Daniel Chua Yee Chen
|
|
|
|
* \brief Declaration for the SHSytem abstract base class
|
|
|
|
*
|
|
|
|
* \copyright Copyright (c) 2021 DigiPen Institute of Technology. Reproduction
|
|
|
|
or disclosure of this file or its contents without the prior written
|
|
|
|
consent of DigiPen Institute of Technology is prohibited.
|
|
|
|
*********************************************************************/
|
|
|
|
|
2022-09-13 15:36:34 +08:00
|
|
|
#pragma once
|
2022-09-13 14:07:40 +08:00
|
|
|
|
2022-09-15 12:10:06 +08:00
|
|
|
#include "../SHECSMacros.h"
|
2022-09-17 23:32:29 +08:00
|
|
|
#include "SH_API.h"
|
2022-09-15 12:10:06 +08:00
|
|
|
|
2022-09-08 11:08:23 +08:00
|
|
|
namespace SHADE
|
|
|
|
{
|
2022-09-13 14:07:40 +08:00
|
|
|
|
2022-09-13 15:26:23 +08:00
|
|
|
class SHSystemManager;
|
2022-09-13 14:07:40 +08:00
|
|
|
|
2022-09-17 23:32:29 +08:00
|
|
|
class SH_API SHSystem
|
2022-09-08 11:08:23 +08:00
|
|
|
{
|
2022-09-15 12:10:06 +08:00
|
|
|
private:
|
|
|
|
SystemID systemID;
|
|
|
|
|
2022-09-08 11:08:23 +08:00
|
|
|
protected:
|
|
|
|
/*!*************************************************************************
|
|
|
|
* \brief
|
|
|
|
* Protected default constructor for SHSytem class
|
|
|
|
***************************************************************************/
|
|
|
|
SHSystem()= default;
|
2022-09-15 12:10:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-08 11:08:23 +08:00
|
|
|
|
|
|
|
public:
|
|
|
|
/*!*************************************************************************
|
|
|
|
* \brief
|
|
|
|
* Destructor for SHSytem class
|
|
|
|
***************************************************************************/
|
|
|
|
virtual ~SHSystem() = default;
|
|
|
|
|
|
|
|
/*!*************************************************************************
|
|
|
|
* \brief
|
|
|
|
* Pure virtual Init function. Derived class must implement this
|
|
|
|
***************************************************************************/
|
|
|
|
virtual void Init() = 0;
|
|
|
|
|
2022-09-14 10:32:50 +08:00
|
|
|
///*!*************************************************************************
|
|
|
|
// * \brief
|
|
|
|
// * Pure virtual Run function. Derived class must implement this
|
|
|
|
// * \param dt
|
|
|
|
// * Delta time
|
|
|
|
//***************************************************************************/
|
|
|
|
//virtual void Run(float dt) = 0;
|
2022-09-08 11:08:23 +08:00
|
|
|
|
|
|
|
/*!*************************************************************************
|
|
|
|
* \brief
|
|
|
|
* Pure virtual Exit function. Derived class must implement this
|
|
|
|
***************************************************************************/
|
|
|
|
virtual void Exit() = 0;
|
|
|
|
|
2022-09-15 12:10:06 +08:00
|
|
|
friend class SHSystemManager;
|
2022-09-13 15:26:23 +08:00
|
|
|
|
2022-09-15 12:10:06 +08:00
|
|
|
inline SystemID GetSystemID(void) const noexcept { return systemID; }
|
|
|
|
inline SystemVersionID GetSystemVersion(void) const noexcept { return static_cast<SystemVersionID>(systemID >> sizeof(SystemVersionID) * CHAR_BIT); }
|
2022-09-13 15:26:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-09-15 12:10:06 +08:00
|
|
|
|
2022-09-13 15:36:34 +08:00
|
|
|
}
|