| 179 | } |
| 180 | |
| 181 | bool UniValue::checkObject(const std::map<std::string,UniValue::VType>& t) const |
| 182 | { |
| 183 | if (typ != VOBJ) |
| 184 | return false; |
| 185 | |
| 186 | for (std::map<std::string,UniValue::VType>::const_iterator it = t.begin(); |
| 187 | it != t.end(); ++it) { |
| 188 | size_t idx = 0; |
| 189 | if (!findKey(it->first, idx)) |
| 190 | return false; |
| 191 | |
| 192 | if (values.at(idx).getType() != it->second) |
| 193 | return false; |
| 194 | } |
| 195 | |
| 196 | return true; |
| 197 | } |
| 198 | |
| 199 | const UniValue& UniValue::operator[](const std::string& key) const |
| 200 | { |