bool ReaderMapping::get(const char* key, ReaderCollection& value) const { auto const sx = get_item(key); if (sx) { value = ReaderCollection(m_doc, sx); return true; } else { return false; } }
bool JsonReaderMappingImpl::read_collection(const char* key, ReaderCollection& value) const { const Json::Value& element = m_json[key]; if (element.isArray()) { value = ReaderCollection(std::make_shared<JsonReaderCollectionImpl>(element)); return true; } else { return false; } }
bool SExprReaderMappingImpl::read_collection(const char* key, ReaderCollection& value) const { sexp::Value const* cur = get_subsection(key); if (cur) { value = ReaderCollection(std::make_shared<SExprReaderCollectionImpl>(*cur)); return true; } else { return false; } }