Entity Derivation Macros
List of: Discussion Topic
Subjects: Attributes, C++ Interface, Entity, Extending ACIS
Contents: Application Development Manual

The entity is a fundamental concept in ACIS, and the ENTITY class is the fundamental data structure in ACIS that supports roll back, copy, save/restore and error recovery. All persistent data types in an ACIS model are derived from ENTITY or are directly controlled by an ENTITY derived class. Derived ENTITYs make up the foundation of ACIS. Derivation of new ENTITY classes is also a common means of extending ACIS, and application developers can derive classes from ENTITY to define their own persistent data types. Attributes are special entities containing user-defined data that can be attached to other entities. ATTRIB is a derived class of ENTITY and is the base class for implementing attributes.

In exchange for the power of classes derived from ENTITY, the application programmer bears the burden of properly implementing a large number of functions (virtual functions of ENTITY). Fortunately ACIS provides a number of macros (defined in entity.hxx), that ease this burden considerably. There are macros to fully or partially implement each of the required virtual functions. Macros specific to attributes are defined in at_macro.hxx.

The use of these macros also protects the programmer from possible changes to the function signatures in different versions of ACIS. For example, in ACIS Release 5.0, a new argument was added to the copy_scan function. Only code that actually uses the type information needed to be modified. The majority of derived ENTITYs could simply be recompiled with the revised header file.

This chapter describes the macros used when deriving classes from ENTITY (or ATTRIB), the functions generated by the macros, when those functions are called, and how the developer should implement the code specific to his own ENTITY derivations. Attribute derivation is discussed in more detail in the attributes overview chapter of the Kernel Component Manual.
PDF/APPDEV/09ENT.PDF
HTM/DATA/ACIS/APPDEV/09ENT/0000.HTM