- UID
- 3684
- 积分
- 844
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-4-8
- 最后登录
- 1970-1-1
|
发表于 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 |
|