#include "CFDStructDataManager.h" #include "CFDStructDataSolverTimeModeManager.h" #include "CFDStructDataSolverBasicModelManager.h" #include "CFDStructDataSolverKvislManager.h" #include "CFDStructDataSolverNumericalMethodManager.h" #include "CFDStructDataSolverSportsAttributesManager.h" #include "CFDStructDataSolverBoundaryConditionManager.h" #include "CFDStructDataSolverInitializationManager.h" #include "CFDStructDataSolverReferenceQuantityManager.h" #include "CFDStructDataSolverComputingControlManager.h" #include "CUIProperty/CUIConfig.h" CFDStructDataManager *CFDStructDataManager::m_instance = NULL; CFDStructDataManager::CFDStructDataManager() { this->initDataManagers(); } CFDStructDataManager *CFDStructDataManager::getInstance() { if (m_instance == nullptr) { m_instance = new CFDStructDataManager; } return m_instance; } CUIConfig *CFDStructDataManager::getActionParamUIConfig(QString s) { if (s == "actionTimeModeEdit") { qDebug("DataManager create TimeMode CUIConfig"); return m_solverTimeModeManager->getParamUIConfig(); } if (s == "actionBasicModelEdit") return m_solverBasicModeManager->getParamUIConfig(); if (s == "actionViscosityModelEdit") return m_solverKvislManager->getParamUIConfig(); if (s == "actionNumericalMethodsEdit") return m_solverNumericalMethodManager->getParamUIConfig(); // 运动属性 if (s == "actionMotionPropertiesEdit") return m_solverSportsAttributesManager->getParamUIConfig(); // Pressure-Inlet if (s == "actionPressureInletEdit") return m_solverBoundaryConditionManager->getParamUIConfig(); // 初始化 if (s == "actionInitializationEdit") return m_solverInitializationManager->getParamUIConfig(); // 参考量 if (s == "actionReferenceQuantityEdit") return m_solverReferenceQuantityManager->getParamUIConfig(); // 计算控制 if (s == "actionComputationalControlEdit") return m_solverComputingControlManager->getParamUIConfig(); qDebug() << "DataManager return null CUIConfig"; return nullptr; } void CFDStructDataManager::initDataManagers() { m_solverTimeModeManager = new CFDStructDataSolverTimeModeManager; m_solverBasicModeManager = new CFDStructDataSolverBasicModelManager; m_solverKvislManager = new CFDStructDataSolverKvislManager; m_solverNumericalMethodManager = new CFDStructDataSolverNumericalMethodManager; m_solverSportsAttributesManager = new CFDStructDataSolverSportsAttributesManager; m_solverBoundaryConditionManager = new CFDStructDataSolverBoundaryConditionManager; m_solverInitializationManager = new CFDStructDataSolverInitializationManager; m_solverReferenceQuantityManager = new CFDStructDataSolverReferenceQuantityManager; m_solverComputingControlManager = new CFDStructDataSolverComputingControlManager; }