ObjectARX, AutoCAD. Среда программирования библиотеки C++


         

Remove protocol extension objects from


// AcRxClass objects.
//
AcDbEntity::desc()->addX(AsdkEntTemperature::desc(), pDefaultTemp);
AcDbRegion::desc()->addX(AsdkEntTemperature::desc(), pRegionTemp);
AcDbCircle::desc()->addX(AsdkEntTemperature::desc(), pCircleTemp);
acedRegCmds->addCommand("ASDK_TEMPERATURE_APP",
"ASDK_ENERGY", "ENERGY", ACRX_CMD_TRANSPARENT,
energy);
}
void
unloadApp()
{
delete acrxServiceDictionary->remove("AsdkTemperature");
acedRegCmds->removeGroup("ASDK_TEMPERATURE_APP");
// Remove protocol extension objects from the AcRxClass
// object tree. This must be done before removing the
// AsdkEntTemperature class from the ACRX runtime class
// hierarchy, so the AsdkEntTemperature::desc()
// still exists.
//
AcDbEntity::desc()->delX(AsdkEntTemperature::desc());
delete pDefaultTemp;
AcDbRegion::desc()->delX(AsdkEntTemperature::desc());
delete pRegionTemp;
AcDbCircle::desc()->delX(AsdkEntTemperature::desc());
delete pCircleTemp;
// Remove the AsdkEntTemperature class from the ARX
// runtime class hierarchy.
//
deleteAcRxClass(AsdkEntTemperature::desc());
}
AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* appId)
{
switch (msg) {
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(appId);
acrxDynamicLinker->registerAppMDIAware(appId);
initApp();
break;
case AcRx::kUnloadAppMsg:
unloadApp();
}
return AcRx::kRetOK;
}

Содержание  Назад  Вперед