All classes representing persistent objects in ACIS are derived from the ENTITY class. The ENTITY class does not represent any particular type of object within the modeler. Instead, the ENTITY class contains the data and functionality that are common to all classes that represent persistent objects. It is an abstract base class.
All ENTITYs have a common set of functionality, such as the ability to save themselves to a file, restore themselves from a file, copy themselves, and debug themselves. (Although they inherit this functionality, ENTITYs also can choose not to save themselves to a file, or to allow themselves to be copied or debugged.) All persistent ACIS model objects are instances of classes derived from the ENTITY class.
Each ENTITY contains a pointer to a bulletin. Whenever an ENTITY is created, modified or deleted, a record of the change is placed in a bulletin. Thus, ACIS maintains lists of every change to every ENTITY with every operation. This history mechanism allows ACIS to "undo" or "redo" operations. It also provides you with the means to determine what changes occurred during an operation. For more information on the history mechanism, refer to History and Roll.
Each ENTITY also contains a list of pointers to system-defined and user-defined attributes attached to the ENTITY. Not all instances of ENTITYs have attributes, but maintenance of a list of attributes is supported for every type of ENTITY.
The following section describes the ENTITY class and how the model geometry classes, model topology classes, and attribute classes (all derived from class ENTITY) are integrated together to form a model. For information about specific classes, refer to the library reference.
The ENTITY Class
The ENTITY class provides basic model management functionality for all persistent objects in an ACIS model. The principal components of the model derived from ENTITY are topology, geometry, and attributes. ENTITYs are always created on the heap and never on the stack (because they are maintained by the history mechanism, even after they are deleted).
- The ENTITY class defines data and methods that all of its children inherit.
- The behavior of the methods of the derived classes can differ from the default behavior in the base class. This provides a local instantiation (as opposed to inheritance) of much of the functionality that is common to all model objects. This local instantiation is supported by Entity Derivation Macros, which simplify deriving classes from the ENTITY class and make the implementation of these derived classes consistent.
Although the ENTITY class itself does not represent objects within the modeler, any class that represents a persistent model object in ACIS must be derived from ENTITY in order to inherit the common data and functionality that is mandatory in all persistent objects.
ACIS provides run-time mechanisms for identifying the type of any object derived from ENTITY, as well as its level of derivation. Refer to Identifying Model Objects and Model Objects for more information.
Classes Derived from ENTITY
The model data structure is based on instances of classes derived from ENTITY. The data structure allows consistent performance in generic operations such as entity debugging, roll back, attribute maintenance, and model archiving and restoration.
The classes derived from ENTITY that represent the topology of the models include:
In addition to these ten model topological classes, there are three tolerant modeling classes TEDGE, TCOEDGE, and TVERTEX, which are derived from EDGE, COEDGE, and VERTEX.
The classes derived from ENTITY that represent the geometry of the models include:
The specific geometric information in these subclasses is private. All access to the data members of these classes passes through member functions.
The ATTRIB class, derived from the ENTITY class, provides a parent class from which all system-derived attributes are defined and all user-defined attributes can be defined. Refer to Attribute for more information about using the ATTRIB class.
The inheritance relationships among the topology, geometry, and attribute classes are depicted in the following figure. The structure of the ACIS model is described in Model Objects.