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