| 231 | } |
| 232 | |
| 233 | void BOBObj::append(std::string fn, DataValue dv) { |
| 234 | if (isArrayLength >= 0) { |
| 235 | char* r; |
| 236 | long int n = strtol(fn.data(), &r, 10); |
| 237 | ASSERT(!*r); |
| 238 | bool compact = isArrayLength == 0; |
| 239 | while (!compact && currentLoc < n) { |
| 240 | bob->appendNull(fn); |
| 241 | currentLoc++; |
| 242 | } |
| 243 | _append(fn, dv); |
| 244 | currentLoc++; |
| 245 | } else { |
| 246 | _append(fn, dv); |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | void BOBObj::_append(std::string fn, DataValue dv) { |
| 251 | switch (dv.getBSONType()) { |
no outgoing calls