Print function
| 1115 | |
| 1116 | // Print function |
| 1117 | void printFunction(std::ostream& os, |
| 1118 | const Function& function, |
| 1119 | bool printArgDefaults = true) { |
| 1120 | |
| 1121 | if (!function.empty()) { |
| 1122 | if (!function.type().empty()) { |
| 1123 | os << function.type(); |
| 1124 | os << " "; |
| 1125 | } |
| 1126 | os << function.name(); |
| 1127 | os << "("; |
| 1128 | const std::vector<Argument>& arguments = function.arguments(); |
| 1129 | for (std::size_t i = 0; i<arguments.size(); i++) { |
| 1130 | printArgument(os, arguments[i], printArgDefaults); |
| 1131 | if (i != (arguments.size()-1)) |
| 1132 | os << ", "; |
| 1133 | } |
| 1134 | os << ")"; |
| 1135 | } |
| 1136 | } |
| 1137 | |
| 1138 | // Function operator << |
| 1139 | std::ostream& operator<<(std::ostream& os, const Function& function) {// #nocov start |
no test coverage detected