找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 384|回复: 1

[ARX函数]:有人重载过assertWriteEnabled()吗

[复制链接]
发表于 2003-5-27 20:05:38 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
谁能介绍一下如何重载assertWriteEnabled()
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2003-5-28 09:36:44 | 显示全部楼层
void

assertWriteEnabled(

Adesk::Boolean autoUndo = true,

Adesk::Boolean recordModified = true);

autoUndo Input Boolean indicating if automatic undo recording should be done or not
recordModified Input Boolean indicating if the graphics should be updated after changes are made and if notification should be sent out for "openedForModify", "modified", and "modifiedGraphics" (if appropriate)

This function is used only inside of member functions of classes derived from AcDbObject. It should only be used inside of member functions that modify the object's data (for example, dxfInFields()). When used, it should be the first function called inside the member function. Its purpose is to make sure that the object is indeed open for write (if it is not, then AutoCAD terminates), to trigger an immediate sending of "openedForModify" notification, to set up the notification mechanism so that, "modified" and "modifiedGraphics" (if the object is derived from AcDbEntity) are sent at the appropriate times. and to ensure that graphics get updated if the object is derived from AcDbEntity.

If autoUndo is Adesk::kFalse, then no Undo recording is performed. It is assumed the object manually writes out partial Undo records. If recordModified is Adesk::kFalse, then "modified" notification is not sent when the object is closed.

If this function is called while the object is not open AcDb::kForWrite, AutoCAD terminates (allowing the user to save changes).

不是虚函数,不可重载!可用他保证指针的正确打开方式,也可用他做部分undo
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-11-14 13:53 , Processed in 0.257054 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表