Overview

The following functions help to traverse STEP properties, which are used by products and other types of definitions. Properties are attached using a stp_property_definition, which can give a name to the property. The value of the property is given by a stp_property_definition_representation, which attaches the property definition to a representation instance that contains measures, geometry, or other representation items. These functions are defined by the stix_property.h header file.

The stix_tag_props() function will add backpointers to properties and their representations so that you can find them quickly. The stix_get_property_owner() and stix_get_property_owner_as_pdef() functions simplify working with properties.

stix_get_property_owner()

RoseObject * stix_get_property_owner (
    stp_property_definition * pd
    );

RoseObject * stix_get_property_owner (
    stp_property_definition_representation * pdr
    );

The stix_get_property_owner() function extracts the value from the "definition" select field in a property definitions. The return value is cast to a general RoseObject pointer because the definition field can accommodate a range of different types. Use the stix_get_property_owner_as_pdef() function if you expect the value to be a product_definition.

The property_definition_representation version of the function will follow the reference to a property_definition if present and return its owner, otherwise it just returns the contents of the PDR's "definition" field.

stix_get_property_owner_as_pdef()

stp_product_definition * stix_get_property_owner_as_pdef (
    stp_property_definition * pd
    );

stp_product_definition * stix_get_property_owner_as_pdef (
    stp_property_definition_representation * pdr
    );

The stix_get_property_owner_as_pdef() function is a wrapper around stix_get_property_owner() that only returns values of type product_definition. If the owner is some other type, the function will return null.

stix_get_shape_property()

stp_product_definition_shape * stix_get_shape_property (
    RoseObject * obj
    );

The stix_get_shape_property() function searches for a product_definition_shape property on an object. This function expects the properties to have been previously indexed with the stix_tag_props() function. It will return null if the properties have not been tagged.

stix_has_properties()

int stix_has_properties (RoseObject * obj);

The stix_has_properties() function returns true if an object has associated properties. This function expects the properties to have been previously indexed with the stix_tag_props() function. It will return null if the properties have not been tagged.

stix_tag_props()

void stix_tag_props (RoseDesign * d)

The stix_tag_props() function adds backpointers to all of the things referenced by property_definition and property_definition_representation objects. The backpointers are held in StixMgrProperty and StixMgrPropertyRep manager objects. These classes can be used if fine-grained access is desired.