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_Interface/FITKInterfacePhysics/FITKSectionAssign.h

195 lines
5.6 KiB
C

/**
*
* @file FITKMaterialAssign.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*
*/
#ifndef __FITKSECTION_ASSIGN_H__
#define __FITKSECTION_ASSIGN_H__
#include "FITKInterfacePhysicsAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataObject.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
namespace Interface
{
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
class FITKInterfacePhysicsAPI FITKSectionAssign : public Core::FITKAbstractDataObject
{
public:
/**
* @brief Construct a new FITKSectionAssign object
* @param[i] modelID ID
* @param[i] sectionID ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
explicit FITKSectionAssign(int modelID, int sectionID);
explicit FITKSectionAssign() = default;
/**
* @brief Destroy the FITKMaterialAssign object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual ~FITKSectionAssign() = default;
/**
* @brief ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual int getSectionID();
/**
* @brief ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual int getModelID();
/**
* @brief
* @param[i] modelID ID
* @param[i] sectionID section ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual void assign(int modelID, int sectionID);
/**
* @brief
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual bool isValid();
/**
* @brief
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual bool isAssignComponent();
template<class T>
/**
* @brief
* @return T*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
T* getTSectionObj()
{
return dynamic_cast<T*>(this->getSectionObj());
}
template<class T>
/**
* @brief
* @return T*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
T* getTModelObj()
{
return dynamic_cast<T*>(this->getModelObj());
}
/**
* @brief Section
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-27
*/
QString getSectionName();
/**
* @brief Section
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-27
*/
virtual QString getSectionType();
bool copy(FITKAbstractDataObject* obj) override;
/**
* @brief /
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-27
*/
QString getModelName();
protected:
/**
* @brief
* @return FITKAbstractDataObject*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
virtual FITKAbstractDataObject* getSectionObj();
/**
* @brief
* @return FITKAbstractDataObject*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
FITKAbstractDataObject* getModelObj();
protected:
/**
* @brief IDID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
int _modelID{ -1 };
/**
* @brief ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
int _sectionID{ -1 };
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-07
*/
class FITKInterfacePhysicsAPI FITKSectionAssignManager : public Core::FITKAbstractDataObject
, public Core::FITKAbstractDataManager<FITKSectionAssign>
{
public:
/**
* @brief Construct a new FITKSectionAssignManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-06
*/
explicit FITKSectionAssignManager() = default;
/**
* @brief Destroy the FITKSectionAssignManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-06
*/
virtual ~FITKSectionAssignManager() = default;
/**
* @brief
* @param[i] modelsetID ID
* @return FITKSectionAssign*
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-06-06
*/
FITKSectionAssign* getMaterialAssignByModelSetID(const int modelsetID);
};
}
#endif