XNSim/XNCore/XNBaseFrameObject.h
2025-04-28 12:25:20 +08:00

96 lines
1.5 KiB
C++
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @file XNBaseFrameObject.h
* @author jinchao
* @brief 框架对象基类
* @version 1.0
* @date 2025-01-08
*
* @copyright Copyright (c) 2025 COMAC
*
*/
#pragma once
#include "XNObject.h"
class XNBaseFrameObjectPrivate;
/**
* @brief 框架对象基类
*/
class XNCORE_EXPORT XNBaseFrameObject : public XNObject
{
/**
* @brief 宏定义用于支持Qt的元对象系统
*/
Q_OBJECT
/**
* @brief 宏定义,用于禁用拷贝构造函数
*/
Q_DISABLE_COPY(XNBaseFrameObject)
/**
* @brief 宏定义,用于声明私有数据成员
*/
Q_DECLARE_PRIVATE(XNBaseFrameObject);
public:
/**
* @brief 构造函数
* @param parent 父对象
*/
XNBaseFrameObject(QObject *parent = nullptr);
/**
* @brief 析构函数
*/
virtual ~XNBaseFrameObject();
protected:
/**
* @brief 构造函数
* @param dd 私有数据成员
* @param parent 父对象
*/
XNBaseFrameObject(XNBaseFrameObjectPrivate &dd, QObject *parent = nullptr);
signals:
/**
* @brief 初始化
*/
void Initialize();
/**
* @brief 初始化失败
*/
void InitializeFailed();
/**
* @brief 准备执行
*/
void PrepareForExecute();
/**
* @brief 准备执行失败
*/
void PrepareForExecuteFailed();
public slots:
/**
* @brief 初始化
*/
virtual void OnInitialize() = 0;
/**
* @brief 准备执行
*/
virtual void OnPrepareForExecute() = 0;
public:
/**
* @brief 获取框架对象状态
* @return 框架对象状态
*/
XNFrameObjectStatus GetFrameObjectStatus();
};