TotalView Reference Guide : Part I: CLI Commands : Creating Type Transformations : C++View : Other Constraints

Other Constraints
An aggregate type cannot contain itself. (An attempt to do so would result in an infinite sized aggregate.) When generating a field of an aggregate T using TV_ttf_add_row, the named type may not be T, or anything which directly or indirectly contains a T as a member. If you do need to do something like that, use a pointer or reference.
As an illustration, consider this:
class A { ... };
class B { A a; ... };
 
int TV_ttf_display_type ( const A *a )
{
(void) TV_ttf_add_row ( ... );
return TV_ttf_format_ok;
}
int TV_ttf_display_type ( const B *b )
{
(void) TV_ttf_add_row ( ... );
(void) TV_ttf_add_row ( "a", "A", &(b->a) );
return TV_ttf_format_ok;
}
Note the following:
*
TV_ttf_display_type ( const A *a ) may not add an object of type A (direct inclusion) nor one of type B (indirect inclusion).
*
When viewing an object of type B, TotalView will invoke TV_ttf_add_row ( const B * ), and then TV_ttf_add_row ( const *A ).

Rogue Wave Software, Inc.
Voice: (303) 473-9118
rwonlinedocs@roguewave.com