| 153 | |
| 154 | |
| 155 | void Array::stringify(std::ostream& out, unsigned int indent, int step) const |
| 156 | { |
| 157 | int options = Poco::JSON_WRAP_STRINGS; |
| 158 | options |= _escapeUnicode ? Poco::JSON_ESCAPE_UNICODE : 0; |
| 159 | |
| 160 | if (step == -1) step = indent; |
| 161 | |
| 162 | out << "["; |
| 163 | |
| 164 | if (indent > 0) out << std::endl; |
| 165 | |
| 166 | for (ValueVec::const_iterator it = _values.begin(); it != _values.end();) |
| 167 | { |
| 168 | for (int i = 0; i < indent; i++) out << ' '; |
| 169 | |
| 170 | Stringifier::stringify(*it, out, indent + step, step, options); |
| 171 | |
| 172 | if (++it != _values.end()) |
| 173 | { |
| 174 | out << ","; |
| 175 | if (step > 0) out << '\n'; |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | if (step > 0) out << '\n'; |
| 180 | |
| 181 | if (indent >= step) indent -= step; |
| 182 | |
| 183 | for (int i = 0; i < indent; i++) out << ' '; |
| 184 | |
| 185 | out << "]"; |
| 186 | } |
| 187 | |
| 188 | |
| 189 | void Array::resetDynArray() const |
no test coverage detected