Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 1 | #include "src/associations.hpp" |
| 2 | |
| 3 | #include <iostream> |
| 4 | |
| 5 | // Some debug functions for dumping out the main data structures in objmgr |
| 6 | |
Brad Bishop | a098a37 | 2022-05-05 15:19:04 -0400 | [diff] [blame] | 7 | void dumpAssociationOwnersType(AssociationOwnersType& assocOwners) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 8 | { |
| 9 | using namespace std; |
| 10 | cout << "##### AssociationOwnersType #####" << endl; |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 11 | for (const auto& i : assocOwners) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 12 | { |
| 13 | cout << "------------------------------------" << endl; |
| 14 | cout << setw(15) << left << "OBJ PATH:" << i.first << endl; |
| 15 | |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 16 | for (const auto& j : i.second) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 17 | { |
| 18 | cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl; |
| 19 | |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 20 | for (const auto& k : j.second) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 21 | { |
| 22 | cout << setw(17) << left << "ASSOC PATH:" << k.first << endl; |
| 23 | |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 24 | for (const auto& l : k.second) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 25 | { |
| 26 | cout << setw(18) << left << "ENDPOINT:" << l << endl; |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | cout << "------------------------------------" << endl; |
| 31 | } |
| 32 | } |
| 33 | |
Brad Bishop | a098a37 | 2022-05-05 15:19:04 -0400 | [diff] [blame] | 34 | void dumpAssociationInterfaces(AssociationInterfaces& assocInterfaces) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 35 | { |
| 36 | using namespace std; |
| 37 | cout << "##### AssociationInterfaces #####" << endl; |
| 38 | for (auto i : assocInterfaces) |
| 39 | { |
| 40 | cout << "------------------------------------" << endl; |
| 41 | cout << setw(15) << left << "OBJ PATH:" << i.first << endl; |
| 42 | auto intfEndpoints = std::get<endpointsPos>(i.second); |
| 43 | |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 44 | for (const auto& k : intfEndpoints) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 45 | { |
| 46 | cout << setw(16) << left << "ENDPOINTS:" << k << endl; |
| 47 | } |
| 48 | cout << "------------------------------------" << endl; |
| 49 | } |
| 50 | } |
| 51 | |
Brad Bishop | a098a37 | 2022-05-05 15:19:04 -0400 | [diff] [blame] | 52 | void dumpInterfaceMapType(InterfaceMapType& intfMap) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 53 | { |
| 54 | using namespace std; |
Brad Bishop | a098a37 | 2022-05-05 15:19:04 -0400 | [diff] [blame] | 55 | cout << "##### interfaceMapType #####" << endl; |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 56 | for (const auto& i : intfMap) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 57 | { |
| 58 | cout << "------------------------------------" << endl; |
| 59 | cout << setw(15) << left << "OBJ PATH:" << i.first << endl; |
| 60 | |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 61 | for (const auto& j : i.second) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 62 | { |
| 63 | cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl; |
| 64 | |
Brad Bishop | 1f62380 | 2022-05-31 18:22:10 -0400 | [diff] [blame^] | 65 | for (const auto& k : j.second) |
Andrew Geissler | 7264d90 | 2019-02-27 09:46:40 -0600 | [diff] [blame] | 66 | { |
| 67 | cout << setw(18) << left << "INTERFACE:" << k << endl; |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | cout << "------------------------------------" << endl; |
| 72 | } |