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/FITKBoundaryLocation.h

159 lines
4.4 KiB
C

/**
*
* @file FITKBoundaryLocation.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*
*/
#ifndef _FITKBOUNDARY_LOCATION_H__
#define _FITKBOUNDARY_LOCATION_H__
#include "FITKInterfacePhysicsAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
namespace Interface
{
class FITKAbstractModel;
class FITKAbstractModelComponent;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-13
*/
class FITKInterfacePhysicsAPI FITKBoundaryLocation
: public Core::FITKAbstractNDataObject
{
public:
/**
* @brief Construct a new FITKBoundaryLocation object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
explicit FITKBoundaryLocation() = default;
/**
* @brief Destroy the FITKBoundaryLocation object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
virtual ~FITKBoundaryLocation() = default;
/**
* @brief ID
* @param[i] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
void setModel(int id);
/**
* @brief
* @param[i] model
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
void setModel(FITKAbstractModel* model);
/**
* @brief ID
* @param[i] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
void setComponent(int id);
/**
* @brief
* @param[i] comp
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
void setComponent(FITKAbstractModelComponent* comp);
/**
* @brief id
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
int getModelID() const;
/**
* @brief ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
int getComponentID() const;
/**
* @brief
* @return FITKAbstractModel*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
FITKAbstractModel* getModelObj();
/**
* @brief
* @return FITKAbstractModelComponent*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
FITKAbstractModelComponent* getComponentObj();
/**
* @brief
* @return bool
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-22
*/
bool isValid();
template <class T>
/**
* @brief
* @return T*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
T* getTModelObj()
{
return dynamic_cast<T*> (this->getModelObj());
}
template <class T>
/**
* @brief
* @return T*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
T* getTComponentObj()
{
return dynamic_cast<T*> (this->getComponentObj());
}
/**
* @brief
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-17
*/
QString getLocationTextLabel();
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-03
*/
void operator = (const FITKBoundaryLocation& loc);
protected:
/**
* @brief ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
int _modelID{ -1 };
/**
* @brief ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-30
*/
int _componentID{ -1 };
};
}
#endif