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/FITKInterfaceGeometry/FITKVirtualTopoManager.h

190 lines
6.2 KiB
C

/**
*
* @file FITKVirtualTopoManager.h
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*
*/
#ifndef _FITK_VIRTUAL_TOPO_MANAGER_H___
#define _FITK_VIRTUAL_TOPO_MANAGER_H___
#include "FITKInterfaceGeometryAPI.h"
#include "FITKAbsVirtualTopo.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
#include <QHash>
#include <QMutex>
namespace Interface
{
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
class FITKInterfaceGeometryAPI FITKShapeVirtualTopoManager
: public Core::FITKAbstractDataManager<FITKAbsVirtualTopo>
{
public:
/**
* @brief Construct a new FITKShapeVirtualTopoManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
explicit FITKShapeVirtualTopoManager() = default;
/**
* @brief Destroy the FITKShapeVirtualTopoManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
virtual ~FITKShapeVirtualTopoManager() = default;
};
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
class FITKInterfaceGeometryAPI FITKVirtualTopoManager : public Core::FITKAbstractDataObject
{
public:
/**
* @brief Construct a new FITKVirtualTopoManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
explicit FITKVirtualTopoManager();
/**
* @brief Destroy the FITKVirtualTopoManager object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
virtual ~FITKVirtualTopoManager();
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void clear();
/**
* @brief
* @param[] topoObj My Param doc
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void setRootObj(FITKAbsVirtualTopo* topoObj);
/**
* @brief
* @return FITKAbsVirtualTopo*
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
FITKAbsVirtualTopo* getRootObj();
/**
* @brief
* @param[i] tobj
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void appendVirtualTopoObj(FITKAbsVirtualTopo* tobj);
/**
* @brief
* @param[i] tobj
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void appendVirtualTopoObj(FITKAbsVirtualTopo* tobj , Interface::FITKGeoEnum::VTopoShapeType st);
/**
* @brief
* @param[i] tobj
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void appendVirtualTopoObjs(const QList< FITKAbsVirtualTopo*>& tobj);
/**
* @brief
* @param[i] st
* @param[i] tobj
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void appendVirtualTopoObjs(Interface::FITKGeoEnum::VTopoShapeType st, const QList<Core::FITKAbstractDataObject*>& tobj);
/**
* @brief
* @param[i] shape OCCTopoDS_Shape
* @param[i] type
* @return FITKAbsVirtualTopo*
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
FITKAbsVirtualTopo* getVirtualTopo(void* shape, FITKGeoEnum::VTopoShapeType type);
/**
* @brief type
* @param[i] type
* @return FITKShapeVirtualTopoManager*
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
FITKShapeVirtualTopoManager* getShapeVirtualTopoManager(FITKGeoEnum::VTopoShapeType type);
/**
* @brief type
* @param[i] type
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
int getShapeVirtualTopoCount(FITKGeoEnum::VTopoShapeType type);
/**
* @brief
* @return int
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
int getAllShapeVirtualTopoCount();
/**
* @brief
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-10
*/
QList<FITKGeoEnum::VTopoShapeType> getTopoTypes();
/**
* @brief - ID
* @param destIdID
* @param srcType
* @return
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-09-11
*/
FITKAbsVirtualTopo* findDownInternal(int destId, FITKGeoEnum::VTopoShapeType srcType);
private:
/**
* @brief 线
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
QMutex _mutex;
/**
* @brief id
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
int _rootTopoObj{ -1 };
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
QHash<FITKGeoEnum::VTopoShapeType, FITKShapeVirtualTopoManager*> _shapeVirtualTopos{};
};
}
#endif