29 lines
471 B
C++
29 lines
471 B
C++
#pragma once
|
|
|
|
namespace ENT2DB
|
|
{
|
|
void export2Db();
|
|
void importByDb();
|
|
void extractSection();
|
|
|
|
template <class T>
|
|
static bool isEntity(AcDbEntity *pEnt)
|
|
{
|
|
if (!pEnt) return false;
|
|
if (pEnt->isKindOf(T::desc())) return true;
|
|
return false;
|
|
}
|
|
|
|
template <class T>
|
|
static bool isEntity(AcDbObjectId id)
|
|
{
|
|
AcDbObjectPointer<AcDbEntity> pEnt(id, AcDb::kForRead);
|
|
if (pEnt.openStatus() == Acad::eOk)
|
|
{
|
|
return isEntity<T>(pEnt);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|
|
} |