📄 layer.cpp
字号:
///////////////////////////////////////////////////////////
// Layer.cpp
// Implementation of the Class Layer
// Created on: 18-二月-2009 17:17:32
// Original author: pangyj
///////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "Layer.h"
Layer::Layer():EntityObject(),cName(NULL){
iTypeFlag = tLayer;
}
Layer::Layer(const char * name):EntityObject()
{
cName = strdup(name);
iTypeFlag = tLayer;
}
void Layer::erase()
{
lit_node<unsigned long> * pCureNode = lSubEntities.get_head();
while (pCureNode)
{
curModelSpace()->erase(pCureNode->get_value());
pCureNode = pCureNode->next();
}
}
Layer::~Layer(){
}
bool Layer::hasIt(unsigned long id){
if (lSubEntities.findValue(id))
{
return true;
}
return false;
}
ErrorStatus Layer::name(const char* sname){
if (sname)
{
strcpy(cName,sname);
}
return eOk;
}
char* Layer::name()const{
return cName;
}
void Layer::list()const
{
cout<<"========================="<<endl;
cout<<"type=Layer ";
printf("name=%s\n",cName);
lit_node<unsigned long> * pCurNode = lSubEntities.get_head();
printf("there are %d entities on this layer,they are:\n",lSubEntities.count());
EntityObject::list();
int i = 0;
while (pCurNode)
{
printf("%d->id=%d\n",i,pCurNode->get_value());
pCurNode = pCurNode->next();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -