mpictor/StepClassLibrary — pull request #166 by mpictor (2012-03-30 23:06:42+00:00)
Title: Runtime bounds for aggregates

This should fix issue #132.

With this change, fedex_plus creates yet another header. This header contains helper functions that, given a pointer to a class that inherits from `SDAI_Application_Instance`, call a member function and return an `SDAI_Integer`. Pointers to these functions are passed to the `AggrTypeDescriptor` member functions `SetBound1FromMemberAccessor()` and `SetBound2FromMemberAccessor()`.

In the case of array_bounds_expr.exp, the code looks like the following:

In `SdaiTEST_ARRAY_OF_BOUNDS_EXPR.init.cc`:

```C++
t_0->SetBound2FromMemberAccessor( &getBound2_SdaiStructured_mesh__index_count );
```

In `SdaiTEST_ARRAY_OF_BOUNDS_EXPRHelpers.h`:

```C++
inline SDAI_Integer getBound2_SdaiStructured_mesh__index_count( SDAI_Application_instance* this_ptr ) {
return ( (SdaiStructured_mesh *) this_ptr)->index_count_();
}
```

The name of the function references the class (`SdaiStructured_mesh`) and the data member (`index_count`) that the bound is derived from. Ideally, the name of the function would reference the name of the aggregate (`vertex_counts`) instead of the data member, but that name isn't available when the function is printed. I think that changing this would require rewriting a fair amount of code.

----

This pull request is also a partial fix for #155 - the EXPRESS function calls are stored as strings now. Previous behavior was to print a memory address (from fedex_plus), which then appeared to be an integer bound.