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_Component/FITKFlowOFIOHDF5/FITKFlowOFIOHDF5Interface.h

174 lines
4.7 KiB
C

/**********************************************************************
* @file FITKFlowOFIOHDF5Interface.h
* @brief hdf5
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-07
*********************************************************************/
#ifndef _FITKFLOWOFHDF5INTERFACE_H__
#define _FITKFLOWOFHDF5INTERFACE_H__
#include <QObject>
#include "FITKFlowOFIOHDF5API.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
#include "FITK_Kernel/FITKAppFramework/FITKComponentInterface.h"
ForwardDeclarNS(Core, FITKAbstractDataObject);
ForwardDeclarNS(Interface, FITKAbstractIO);
ForwardDeclarNS(H5, Group);
ForwardDeclarNS(H5, DataType);
ForwardDeclarNS(H5, H5File);
namespace IO
{
/**
* @brief HDF5
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-09-07
*/
class FITKFLOWOFIOHDF5API FITKFlowOFIOHDF5Interface : public QObject, public AppFrame::FITKComponentInterface
{
Q_OBJECT
public:
using AppFrame::FITKComponentInterface::FITKComponentInterface;
virtual ~FITKFlowOFIOHDF5Interface() = default;
/**
* @brief
* @param fileName
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-04-10
*/
void setFileName(const QString& fileName);
/**
* @brief
* @param state 1 2
* @return
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-06-11
*/
bool openFileStream(int state);
/**
* @brief
* @return
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-06-11
*/
bool closeFileStream();
/**
* @brief return "FITKFlowOFHDF5IO"
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-10
*/
virtual QString getComponentName() override;
/**
* @brief
* @param indexPort 1 2
* @return
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-04-10
*/
virtual bool exec(const int indexPort) override;
/**
* @brief
* @return bool
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-04-10
*/
bool isSuccess();
/**
* @brief
* @return true false
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-04-12
*/
bool isRunning();
/**
* @brief 线true线
* @param r 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-11
*/
void setRunInThread(bool r = true);
/**
* @brief
* @return true false
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-04-12
*/
bool read();
/**
* @brief
* @return true false
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-04-12
*/
bool write();
signals:
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-10
*/
void ioThreadFinishedSig();
private slots:
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-10
*/
void ioThreadFinishedSlot();
private:
/**
* @brief
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-04-10
*/
QString _fileName{};
/**
* @brief H5
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-06-11
*/
H5::H5File* _h5File{};
/**
* @brief
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-05-27
*/
bool _success{ false };
/**
* @brief 线
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-05-27
*/
Interface::FITKAbstractIO * _io = nullptr;
/**
* @brief 线
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-05-27
*/
bool _runInThread{ true };
};
}
#endif