1 #include "src/associations.hpp" 2 3 #include <iostream> 4 5 // Some debug functions for dumping out the main data structures in objmgr 6 7 void dumpAssociationOwnersType(AssociationOwnersType& assocOwners) 8 { 9 using namespace std; 10 cout << "##### AssociationOwnersType #####" << endl; 11 for (const auto& i : assocOwners) 12 { 13 cout << "------------------------------------" << endl; 14 cout << setw(15) << left << "OBJ PATH:" << i.first << endl; 15 16 for (const auto& j : i.second) 17 { 18 cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl; 19 20 for (const auto& k : j.second) 21 { 22 cout << setw(17) << left << "ASSOC PATH:" << k.first << endl; 23 24 for (const auto& l : k.second) 25 { 26 cout << setw(18) << left << "ENDPOINT:" << l << endl; 27 } 28 } 29 } 30 cout << "------------------------------------" << endl; 31 } 32 } 33 34 void dumpAssociationInterfaces(AssociationInterfaces& assocInterfaces) 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 44 for (const auto& k : intfEndpoints) 45 { 46 cout << setw(16) << left << "ENDPOINTS:" << k << endl; 47 } 48 cout << "------------------------------------" << endl; 49 } 50 } 51 52 void dumpInterfaceMapType(InterfaceMapType& intfMap) 53 { 54 using namespace std; 55 cout << "##### interfaceMapType #####" << endl; 56 for (const auto& i : intfMap) 57 { 58 cout << "------------------------------------" << endl; 59 cout << setw(15) << left << "OBJ PATH:" << i.first << endl; 60 61 for (const auto& j : i.second) 62 { 63 cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl; 64 65 for (const auto& k : j.second) 66 { 67 cout << setw(18) << left << "INTERFACE:" << k << endl; 68 } 69 } 70 } 71 cout << "------------------------------------" << endl; 72 } 73