#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 g_LayerMgr;