Files
envi-code/SourceCode/Code2026/tg_shs/shs_pipewire/PipeSystemProcessor.h
T

32 lines
1.1 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#ifndef __PIPESYSTEMPROCESSOR_H__
2026-09-28 15:28:50 +08:00
#define __PIPESYSTEMPROCESSOR_H__
#include "AttachmentPrototype.h"
2026-10-04 00:04:20 +08:00
// 为管线系统赋予唯一的索引值,便于反应器中处理管线关系
2026-09-28 15:28:50 +08:00
class TDbPipePrototype;
class PipeSystemProcessor
{
2026-10-04 00:04:20 +08:00
public: /*在反应器中使用,给不同系统一个唯一的整数索引值,以区分不同系统(只能用于当前数据库)*/
2026-09-28 15:28:50 +08:00
static void InitSysInedex();
2026-10-04 00:04:20 +08:00
// 根据管线id获得系统索引
2026-09-28 15:28:50 +08:00
static int GetSysIndex(const AcDbObjectId &idPipe);
static int GetSysIndex(const TDbPipePrototype *pPipe);
static int GetDbSysIndex(const CString &sSysName);
private:
2026-10-04 00:04:20 +08:00
// 获得系统索引
2026-09-28 15:28:50 +08:00
static int GetSysIndex(const CString &sSysName);
2026-10-04 00:04:20 +08:00
// 将系统类型转换为系统名
2026-09-28 15:28:50 +08:00
static CString SysTypeToSysName(TPipeSys::SysType sysType);
private:
2026-10-04 00:04:20 +08:00
// 系统名对应的索引
2026-09-28 15:28:50 +08:00
static std::map<CString, int> m_mapSysIndex;
static std::map<CString, int> m_mapDbSysIndex;
2026-10-04 00:04:20 +08:00
// 管线对应的系统索引
2026-09-28 15:28:50 +08:00
static std::map<AcDbObjectId, int> m_mapPipeSysIndex;
static std::map<AcDbObjectId, int> m_mapDbPipeSysIndex;
2026-10-04 00:04:20 +08:00
// 系统索引
2026-09-28 15:28:50 +08:00
static int m_nSysIndex;
};
#endif