Home > Getting Started Guide > Application Interface > Attributes
Attribute Derivation
The base C++ class, ATTRIB, provides the data and functionality that all attributes share. The developer creates specific classes of attributes by deriving those classes from ATTRIB and adding extra information and functionality.
Each attribute class generally has a .hxx header file that defines the class, includes necessary header files, and prototypes related functions. It also has a .cxx source file that implements all of the methods of the attribute class (that were not defined as inline methods within the body of the class in the .hxx header file). The cxx source file includes the .hxx class header file and also defines class specific macros.
Because both the header file and the implementation file are highly stylized, a number of attribute code macros are provided to simplify the derivation process. The macros also help to maintain compatibility with other attributes and entities. Refer to User Defined Attribute Macros and Predefined Attribute Macros for more information.
Organization attribute classes are always the first level of derivation from the ACIS class ATTRIB (refer to the following figure). They define no methods or data of their own, and are not instantiated. Specific attribute classes are derived from the organization class (that is, a secondlevel derivation from ATTRIB), define data and methods, and are instantiated. They may be categorized as simple, complex, or bridge attributes.
Figure. Attribute Derivation
Organization Attribute Class
Because the ability to share models between development environments is an important feature of ACIS, it is recommended that each developer first create an organization attribute class that is immediately descended from ATTRIB and has a unique name in the ACIS community. (The organization attribute class is also known as the master attribute.) This is accomplished by using a sentinel, which is a two or three character string that is embedded in the class name and identifies the development organization.
Note: Contact Spatial's customer support department to have a unique sentinel assigned to your ACIS development project.
The sole purpose of the organization class is to identify the development organization (company) owning that attribute. Organization classes cannot be instantiated.
Application specific attribute class derivations are distinguishable from classes of the same name created by other developers by their organization name in SAT files. By a similar mechanism, all attributes from a specific developer are easily detected in an attribute list attached to an ENTITY.
Specific Attribute Classes
Specific attribute classes are derived from the organization class. These may be ACIS system attributes or user-defined, application specific attributes. Specific attribute classes are instantiated.
For application specific attribute classes to behave similarly to ACIS attributes, each application specific attribute should include method functions for creation, deletion, transfer to and from disk (save and restore), and implement the appropriate notification methods. The roll back and bulletin board mechanisms built into ACIS apply to application specific attributes.
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.