You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Kernel/FITKCore/FITKOperatorRepoPrivate.h

92 lines
2.6 KiB
C

/**
*
* @file FITKOperatorRepoPrivate.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*
*/
#ifndef _FITK_OPERATOR_REPO_PRIVATE_H__
#define _FITK_OPERATOR_REPO_PRIVATE_H__
#include "FITKAbstractObject.hpp"
#include <QObject>
#include <QHash>
#include <QString>
#include <functional>
namespace Core
{
class FITKAbstractOperator;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
class FITKOperatorRepoPrivate : public QObject, public FITKAbstractObject
{
Q_OBJECT
public:
/**
* @brief Construct a new FITKOperatorRepoPrivate object
* @param[i] funs HashFITKOperatorRepo
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
explicit FITKOperatorRepoPrivate(QHash<QString,std::function<FITKAbstractOperator*()>>& funs);
/**
* @brief Destroy the FITKOperatorRepoPrivate object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
virtual ~FITKOperatorRepoPrivate();
/**
* @brief operator
* @param[i] key
* @return FITKAbstractOperator*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
FITKAbstractOperator* getOperator(const QString & key);
private:
/**
* @brief
* @param[i] key
* @return FITKAbstractOperator*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
FITKAbstractOperator* createOperator(const QString & key);
private slots:
/**
* @brief operator
* @param[i] oper
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
void operatorDestoryedSlot(FITKAbstractOperator* oper);
private:
/**
* @brief operator
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
QHash<QString, std::function<FITKAbstractOperator*()>>& _createFuns;
/**
* @brief operator
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-04
*/
QHash<QString, FITKAbstractOperator*> _existOperators{};
};
}
#endif