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/FITKGeoOCCIOHDF5/FITKOCCIOHDF5Interface.h

188 lines
5.1 KiB
C

/*****************************************************************//**
*
* @file FITKOCCIOHDF5Interface.h
* @brief HDF5
* @author fulipeng (flipengqd@yeah.net)
* @date 2024-09-09
*
*********************************************************************/
#ifndef _FITKOCCIOHDF5Interface_H__
#define _FITKOCCIOHDF5Interface_H__
#include <QObject>
#include "FITKGeoOCCIOHDF5API.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 fulipeng (fulipengqd@yeah.net)
* @date 2024-03-12
*/
class FITKGEOOCCIOHDF5API FITKOCCIOHDF5Interface : public QObject, public AppFrame::FITKComponentInterface
{
Q_OBJECT
public:
FITKOCCIOHDF5Interface() = default;
virtual ~FITKOCCIOHDF5Interface() = default;
/**
* @brief
* @param fileName
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
void setFileName(const QString& fileName);
/**
* @brief
* @param state 1 2
* @return
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
bool openFileStream(int state);
/**
* @brief
* @return
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
bool closeFileStream();
/**
* @brief return "FITKAbaqusHDF5IO"
* @return QString
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
virtual QString getComponentName() override;
/**
* @brief
* @param dataObject
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
void setDataObject(Core::FITKAbstractDataObject* dataObject);
/**
* @brief
* @param indexPort 1 2
* @return
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
virtual bool exec(const int indexPort) override;
/**
* @brief
* @return bool
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
bool isSuccess();
/**
* @brief
* @return true false
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
bool isRunning();
/**
* @brief 线true线
* @param r 线
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
void setRunInThread(bool r = true);
/**
* @brief
* @return true false
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
bool read();
/**
* @brief
* @return true false
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
bool write();
signals:
/**
* @brief 线
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
void ioThreadFinishedSig();
private slots:
/**
* @brief 线
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
void ioThreadFinishedSlot();
private:
/**
* @brief
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
QString _fileName{};
/**
* @brief H5
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
H5::H5File* _h5File{};
/**
* @brief
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-09-09
*/
Core::FITKAbstractDataObject* _dataObject{};
/**
* @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 //