| 1 | #include <string> |
| 2 | |
| 3 | struct DeepData_5 |
| 4 | { |
| 5 | std::string m_some_text; |
| 6 | DeepData_5() : |
| 7 | m_some_text("Just a test" ) {} |
| 8 | }; |
| 9 | |
| 10 | struct DeepData_4 |
| 11 | { |
| 12 | DeepData_5 m_child1; |
| 13 | DeepData_5 m_child2; |
| 14 | DeepData_5 m_child3; |
| 15 | }; |
| 16 | |
| 17 | struct DeepData_3 |
| 18 | { |
| 19 | DeepData_4& m_child1; |
| 20 | DeepData_4 m_child2; |
| 21 | |
| 22 | DeepData_3() : m_child1(* (new DeepData_4())), m_child2(DeepData_4()) {} |
| 23 | }; |
| 24 | |
| 25 | struct DeepData_2 |
| 26 | { |
| 27 | DeepData_3 m_child1; |
| 28 | DeepData_3 m_child2; |
| 29 | DeepData_3 m_child3; |
| 30 | DeepData_3 m_child4; |
| 31 | }; |
| 32 | |
| 33 | struct DeepData_1 |
| 34 | { |
| 35 | DeepData_2 *m_child1; |
| 36 | |
| 37 | DeepData_1() : |
| 38 | m_child1(new DeepData_2()) |
| 39 | {} |
| 40 | }; |
| 41 | |
| 42 | /* |
| 43 | type summary add -f "${var._M_dataplus._M_p}" std::string |
| 44 | type summary add -f "Level 1" "DeepData_1" |
| 45 | type summary add -f "Level 2" "DeepData_2" -e |
| 46 | type summary add -f "Level 3" "DeepData_3" |
| 47 | type summary add -f "Level 4" "DeepData_4" |
| 48 | type summary add -f "Level 5" "DeepData_5" |
| 49 | */ |
| 50 | |
| 51 | int main() |
| 52 | { |
| 53 | DeepData_1 data1; |
| 54 | DeepData_2 data2; |
| 55 | |
| 56 | return 0; // Set break point at this line. |
| 57 | } |
| 58 | |