Totalview® for HPC Reference Guide : PART II Transformations : Chapter 6 Creating Type Transformations : C++View : Elision
Elision
Elision is a feature that allows you to simplify how your data are presented. Consider the BoundsCheckedArray<char> class and the specialized TV_ttf_display_type function we defined earlier:
int TV_ttf_display_type ( const BoundsCheckedArray<char> *s )
{
(void) TV_ttf_add_row ( "string", TV_ttf_type_ascii_string, \
s->get_array () );
return TV_ttf_format_ok;
}
We used TV_ttf_type_ascii_string so that the array of characters is presented horizontally as a string, rather than vertically as an array. If our program declares a variable BoundsCheckedArray<char> var1, we will see output like this in the CLI:
d1.<> dprint var1
var1 = {
string = "Hello World!"
}
d1.<>
Note, however, that the variable var1 is still presented as an aggregate or class. Conceptually this is unnecessary, and in this arrangement an extra dive may be necessary to examine the data. Additionally, more screen space is needed than is necessary.
You can use elision to promote the member of a class out one level. With elision, we will get output that looks like this:
d1.<> dprint var1
string = "Hello World!"
d1.<>
TotalView will engage elision if your TV_ttf_display_type function returns TV_ttf_format_ok_elide (in place of TV_ttf_format_ok). In addition, for elision to occur, the object being presented must have only one field.