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.
71 lines
2.2 KiB
C++
71 lines
2.2 KiB
C++
#ifndef NMPEBIRESULTPROPERTYCATALOG_H
|
|
#define NMPEBIRESULTPROPERTYCATALOG_H
|
|
|
|
#include "nmData_global.h"
|
|
|
|
#include <QList>
|
|
#include <QString>
|
|
|
|
/** @brief 结果属性的数据时态。 */
|
|
enum NM_PEBI_RESULT_PROPERTY_TIME_TYPE
|
|
{
|
|
NM_PebiResultProperty_Static = 0,
|
|
NM_PebiResultProperty_Dynamic
|
|
};
|
|
|
|
/** @brief 结果属性的生产来源,不与界面文字或 VTK 类型绑定。 */
|
|
enum NM_PEBI_RESULT_PROPERTY_SOURCE
|
|
{
|
|
NM_PebiResultPropertySource_StaticCalculation = 0,
|
|
NM_PebiResultPropertySource_SolverOutput
|
|
};
|
|
|
|
/** @brief 结果属性与几何元素的逻辑关联。 */
|
|
enum NM_PEBI_RESULT_PROPERTY_ASSOCIATION
|
|
{
|
|
NM_PebiResultPropertyAssociation_CellData = 0
|
|
};
|
|
|
|
/** @brief 结果属性建议采用的数值范围策略。 */
|
|
enum NM_PEBI_RESULT_PROPERTY_RANGE_POLICY
|
|
{
|
|
NM_PebiResultPropertyRange_CurrentArray = 0,
|
|
NM_PebiResultPropertyRange_AllFrames
|
|
};
|
|
|
|
/** @brief 一项稳定结果属性的非界面契约。 */
|
|
struct NM_DATA_EXPORT nmPebiResultPropertyDescriptor
|
|
{
|
|
nmPebiResultPropertyDescriptor();
|
|
|
|
QString m_sPropertyId; ///< 不参与翻译的稳定业务 ID。
|
|
QString m_sDisplayNameSourceText; ///< 供后续界面翻译的英文源文本。
|
|
QString m_sBaseUnit; ///< 数据层基准单位;无量纲时为空。
|
|
QString m_sDefaultDisplayUnit; ///< 默认显示单位;无量纲时为空。
|
|
NM_PEBI_RESULT_PROPERTY_TIME_TYPE m_eTimeType;
|
|
NM_PEBI_RESULT_PROPERTY_SOURCE m_eSource;
|
|
NM_PEBI_RESULT_PROPERTY_ASSOCIATION m_eAssociation;
|
|
NM_PEBI_RESULT_PROPERTY_RANGE_POLICY m_eRangePolicy;
|
|
};
|
|
|
|
/**
|
|
* @brief 提供第一批 PEBI 结果属性的稳定只读目录。
|
|
*
|
|
* 目录只描述数据契约,不创建 LUT、VTK 数组或界面控件。旧工程中的
|
|
* 插值键 k/phi/h 由计算服务独立解释,不能使用本目录放宽其合法范围。
|
|
*/
|
|
class NM_DATA_EXPORT nmPebiResultPropertyCatalog
|
|
{
|
|
public:
|
|
static QList<nmPebiResultPropertyDescriptor> descriptors();
|
|
static bool findDescriptor(
|
|
const QString& sPropertyId,
|
|
nmPebiResultPropertyDescriptor& oDescriptor);
|
|
static bool isKnownProperty(const QString& sPropertyId);
|
|
|
|
private:
|
|
nmPebiResultPropertyCatalog();
|
|
};
|
|
|
|
#endif // NMPEBIRESULTPROPERTYCATALOG_H
|