| 30 | } |
| 31 | |
| 32 | void cmXCode21Object::PrintList( |
| 33 | std::vector<std::unique_ptr<cmXCodeObject>> const& v, std::ostream& out, |
| 34 | PBXType t) |
| 35 | { |
| 36 | bool hasOne = false; |
| 37 | for (auto const& obj : v) { |
| 38 | if (obj->GetType() == OBJECT && obj->GetIsA() == t) { |
| 39 | hasOne = true; |
| 40 | break; |
| 41 | } |
| 42 | } |
| 43 | if (!hasOne) { |
| 44 | return; |
| 45 | } |
| 46 | out << "\n/* Begin " << PBXTypeNames[t] << " section */\n"; |
| 47 | for (auto const& obj : v) { |
| 48 | if (obj->GetType() == OBJECT && obj->GetIsA() == t) { |
| 49 | obj->Print(out); |
| 50 | } |
| 51 | } |
| 52 | out << "/* End " << PBXTypeNames[t] << " section */\n"; |
| 53 | } |
| 54 | |
| 55 | void cmXCode21Object::PrintList( |
| 56 | std::vector<std::unique_ptr<cmXCodeObject>> const& v, std::ostream& out) |