Files
envi-code/SourceCode/Code2026/EarthWormCmd/LayerMgr.h
T
2026-09-28 15:28:50 +08:00

37 lines
656 B
C++

#pragma once
#include "singleton.h"
class CLayerMgr
{
public:
struct Layer
{
CString name;
CString linetype;
int colorIdx;
int isHidden;
int isFrozen;
int isLocked;
int isOff;
int isPlottable;
int lw;
};
public:
CLayerMgr();
~CLayerMgr();
public:
static bool isExistInLayerTbl(LPCTSTR pszLayer);
public:
Acad::ErrorStatus setLayer(AcDbObjectId &id, LPCTSTR pszLayer);
Acad::ErrorStatus setLayer(AcDbEntity *pEnt, LPCTSTR pszLayer);
Acad::ErrorStatus getLayer(LPCTSTR pszLayer, AcDbObjectId &id);
private:
Acad::ErrorStatus initLayer(LPCTSTR pszLayer, AcDbObjectId *pId = NULL);
};
typedef Singleton<CLayerMgr> g_LayerMgr;