文档详情

AUTOCAD二次开发之ObjectARX.ppt

发布:2017-12-17约4.25万字共237页下载文档
文本预览下载声明
* * * * * * * * * * * * AcRxClass are runtime class identifiers for AcRxObject derived classes. Every object will have an object of this class in the inheritance tree... Class Factory – allows you to create an objects of a particular class with ::create Method Protocol Extensions – Sort of like inheritance by containment, except that the inherited class confirms to predefined AutoCAD interface. It applies to all objects of a particular class. * * * * * Object implementing filer protocol created * 1. Class identifier is read from filer 2. Class is instantiated by AcRxClass class factory 3. Filer is passed to the newly created object 4. Database object calls back into the filer * * * * * * * * * * * * * * * * * Subject - knows its observers. Any number of Observer objects may observe a subject - provides an interface for attaching and detaching Observer objects Observer - defines an updating interface for objects that should be notified of changes in a subject ConcreteSubject - stores state of interest to ConcreteObserver objects - sends a notification to its observers when its state changes ConcreteObserver - maintains a reference to a ConcreteSubject - stores state that should stay consistent with the subject’s - implements the Observer updating interface to keep its state consistent with the subject’s * * * * 反应器类从AcRxObject类中派生而来,而不是从AcDbObjct类派生而来。反应器的类型不同,接收的事件也不相同。反应器不是数据库对象,它与数据库没有隶属关系,因此它并没有对象ID。 * * * * * * * * * * * * * * * * * * * * * * * * * * * This talks about AcRxObject which all objects derives from. AcRx object provides RTTI. * * * * * * * * * * AcTransaction::getObject() takes ObjectId and OpenMode * * * * * Owner: AcDbObject::ownerId() Show with arxdbg 硬所有:必须包含于 硬指针:必须用到 * *   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Iterator - Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation. * * * * C/C++运行库(Run-time Libra
显示全部
相似文档