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/FITKInterfaceModel/FITKModelSet.h

202 lines
6.2 KiB
C

/**
*
* @file FITKModelSet.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*
*/
#ifndef _FITKMODELSET__H__
#define _FITKMODELSET__H__
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractModelComponent.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
#include "FITKModelEnum.h"
#include <QList>
namespace Interface
{
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
class FITKInerfaceModelAPI FITKModelSet : public FITKAbstractModelComponent,
public Core::FITKAbstractDataManager<FITKModelSet>
{
FITKCLASS(Interface, FITKModelSet);
// FITKSafeDownCastA(FITKModelSet, Core::FITKAbstractDataObject);
public:
/**
* @brief Construct a new FITKModelSet object
* @param[i] type
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
explicit FITKModelSet(FITKModelEnum::FITKModelSetType type) ;
explicit FITKModelSet() = default;
virtual ~FITKModelSet() = default;
/**
* @brief
* @return FITKModelEnum::FITKModelSetType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
virtual FITKModelEnum::FITKModelSetType getModelSetType();
/**
* @brief
* @param[i] t FITKModelEnum::FITKModelSetType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
bool containsType(FITKModelEnum::FITKModelSetType t);
/**
* @brief
* @param[i] t FITKModelEnum::FITKModelSetType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
void setModelSetType(FITKModelEnum::FITKModelSetType t);
/**
* @brief
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
bool isInternal();
/**
* @brief generate
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
bool isGenerated();
/**
* @brief
* @param[i] internal
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
void setInternal(bool internal = true );
/**
* @brief generate
* @param[i] generated generate
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
void setGenerated(bool generated = true);
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
void clearMember();
/**
* @brief
* @param[i] mem ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
void appendMember(const int & mem);
/**
* @brief
* @param[i] mem ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
void setAbsoluteMember(const QList<int>& mem);
/**
* @brief
* @return const QList<int>&
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
const QList<int> & getMember() const;
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-29
*/
int getMemberCount();
/**
* @brief generate
* @return const QList<int>&
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
const QList<int> getAbsoluteMember() const;
/**
* @brief
* @return const QList<int>&
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
bool isCombination();
/**
* @brief
* @param[i] item
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-22
*/
virtual void appendDataObj(FITKAbstractDataObject* item) override;
/**
* @brief
* @param[o] sets
* @param[i] t
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-19
*/
void getAbsoluteSet(QList<FITKModelSet*> & sets, FITKModelEnum::FITKModelSetType t);
/**
* @brief ,
* @param[i] name
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-19
*/
virtual void setDataObjectName(const QString & name) override;
/**
* @brief ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-07
*/
int getFirstMemberID();
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
FITKModelEnum::FITKModelSetType _setType{ FITKModelEnum::FMSNone };
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
QList<int> _setMember{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
bool _internal{ false };
/**
* @brief generate
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
bool _generated{ false };
};
}
#endif