Search STEP Tools Web Support

Overview

For any given ARM type, the following functions are generated for each non-aggregate property. Aggregate properties have a few more functions and are discussed in the next section. In the actual code, the <property> symbol shown below is replaced with the lowercase name of the ARM property.

get_<property>()

<aim_type> get_<property>();

The get function returns the ultimate value of the property. The return value varies according to the type of the property. String values are returned as const char *, numeric values are returned as int or double, and all other values are returned as a pointer to the appropriate AIM instance type.

The get functions do not return a pointer to an ARM object. To find that, you must use the Arm_class::find() or Arm_class_IF::find() function to locate an associated ARM object.

Example

Consider a Project application object with the following contents.

<!-- ***********************************************
 * Application object: PROJECT (id10)
 * MAIN_WORKPLAN: id10, id11, id12, id27345
 * ITS_ID: id10, id13, id14, ['New Project']
 * ITS_WORKPIECES [*]: id10, id15, id12803
 -->

The following code would get the string "its_id" value and print it to stdout.

Project_IF * p;
const char * id = p-> get_its_id()

printf ("The project id is: %s\n", id);

isset_<property>()

RoseBoolean isset_<property>();

The isset function examines the complete chain of AIM instances that represent the property. It returns true only if all of them are properly connected and the final value of the property is not null.

put_<property>()

void put_<property>(
	<aim_type> val
	);

The put function sets the ultimate value of the property and handles the creation or modification of any intermediate AIM data needed to represent the property. The input value varies according to the type of the property. String values are specified as const char *, numeric values are specified as int or double, and all other values are specified as a pointer to the appropriate AIM instance type.

The put functions do not take a pointer to an ARM object. To find that, you must use the getRoot() function on an ARM object or pass in your own AIM data pointer.

Example

Consider a Project application object. The following code would set the string "its_id" property to a new value.

Project_IF * p;
p-> put_its_id ("My New Project")

unset_<property>()

void unset_<property>();

The unset function unlinks any AIM data associated with the property that is not shared by other properties. The AIM data is not deleted or moved to the trash, but will be eliminated the next time the garbage collector is called.

Internal Access

The following functions are accessible, but are intended for internal use. There may be occasions when they are useful for some lower-level interactions with the AIM data in user code.

RoseBoolean populate_<property>(
	RoseBoolean strict
	);

RoseBoolean putpath_<property>(
	ListOfRoseObject * agg
	);

ListOfRoseObject * getpath_<property>(
	ListOfRoseObject * agg
	);

RoseStringObject getcomment_<property>();

The populate function selectively tries to find matching AIM data for just the given property by starting with the root AIM instance from the ARM object and matching mapping table rules against the AIM data. The strict flag controls the matching as described in STModule::strict_find.

The putpath function explicitly sets the AIM instances used to represent the given ARM property. Care should be excercised in the use of this function. The function expects a list of instances, which must be linked in the manner expected by the mapping paths and of the proper AIM types called out by the mappings. The function does little checking on the values, so bad data will cause unpredictable behavior.

The getpath function returns a list of the AIM instances used to represent the given ARM property. This function can be useful if it becomes necessary to do additional operations on the AIM data beyond the structures represented in the ARM model.

The getcomment function is used by the getComment() function and returns a string representation of the property data.