Attributes

From DocR21

Jump to: navigation, search

Attributes are a specialized type of entity used to attach data to entities. Any entity may have zero or more attributes. Attributes can carry simple data, pointers to other entities, or links to application-specific, variable length data. ACIS uses many system attributes, but applications may also define their own attributes.

The ATTRIB base class in the Modeling Operations framework provides the data and functionality that all attributes share, for both user-defined attributes and system attributes. The ATTRIB class is derived from the ENTITY class, and performs housekeeping operations to maintain attribute lists attached to model entities.

In ACIS, the most common entity types to have attributes attached are topological entities (implemented in the various topology classes), and many of the methods of the ATTRIB class are designed with this in mind. However, attributes can be attached to any type of entity.

Organization Attribute classes are generally the first level of derivation from the ATTRIB class. (This is similar to the organization class for derivations from the ENTITY class.) Classes for application-specific attributes are derived from the organization attribute classes.

Application-specific attributes allow you to extend an ACIS geometric model into a true product model. Application developers can derive their own attribute classes from the ACIS ATTRIB class to attach application-specific data to entities. The examples demonstrate how to derive new attribute classes.

ACIS also provides Generic Attributes, which provide storage for basic types of data. Generic Attributes are useful because they provide a quick and convenient way for applications to store data on entities without having to implement their own attribute. Generic Attributes are implemented with the ATTRIB_GENERIC class and its derivations.

The PART class also provides basic attribute support. A generically-named attribute class assigns an attribute with a name (a text string) and a value (number, position, or text) to any entity. There are also functions for selecting entities based on these attributes.

Contents

Types of Attributes

Main article: Types of Attributes


In ACIS, the most common types of entities to have attributes attached are topological entities (implemented in the various topology classes), and many of the methods of the ATTRIB class are designed with this in mind. However, attributes can be attached to any type of entity...

Attribute Notification Methods

Main article: Attribute Notification Methods


An important feature of an attribute is the ability to control its behavior when its owning entity is modified during a modeling operation. Attributes are notified of their owner being modified using an attribute notification method...

How ACIS Uses Attributes

Main article: How ACIS Uses Attributes


ACIS defines many system attributes that are used internally. Each component or area of functionality has an organization attribute class from which specific attribute classes are defined. For example, the ATTRIB_HH is used by the Healing Component...

Attribute Pointers

Main article: Attribute Pointers


The entity to which an attribute is attached owns the attribute and contains a pointer to that attribute. If more than one attribute is owned by an entity, the attributes are chained together in a (NULL terminated) list. Each attribute in the list contains a pointer to the previous attribute in the list, a pointer to the next attribute in the list, and a pointer back to the owning entity...

Special Characters in Saved Attributes

Main article: Special Characters in Saved Attributes


Attributes are saved and restored when the entity to which they are attached is saved to or restored from a SAT file. Several characters have special meaning when found in unknown entity string data in ACIS SAT (.sat) files. Therefore, these characters should not be contained in any user string data written to SAT files...

Attribute Derivation

Main article: 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...

Attribute Derivation Macros

Main article: Attribute Derivation Macros


This section describes some of the macros used to facilitate the definition of new attribute classes; they are illustrated in examples. These macros are defined in file at_macro.hxx. Because attributes are derived from entities, attribute macros are very similar to the entity macros defined in entity.hxx...

Creating an Organization Attribute Class

Main article: Creating an Organization Attribute Class


Each application developer must create an organization class from which to derive all application specific attributes. This class cannot be instantiated. Its purpose is to uniquely identify the owning development organization. This section provides an example of creating an organization attribute class by copying the .hxx and .cxx files that define an existing ACIS organization attribute class and modifying those files...

Creating a Specific Attribute Class

Main article: Creating a Specific Attribute Class


After the organization attribute class (which cannot be instantiated) has been defined, specific attribute classes (which can be instantiated) may be derived from it...

Personal tools
Live