// additional operations //------------------------------------------------- // find_part - find a part by name with an // optional interface match //------------------------------------------------- public software_part find_part(string part_name, string interface_name = null) { // look for the part by name and match against the interface if provided //var iter = std::find_if( // m_partdata.begin(), // m_partdata.end(), // [&](const software_part &part) // { // // try to match the part_name (or all parts if part_name is empty), and then try // // to match the interface (or all interfaces if interface is nullptr) // return (part_name.empty() || part_name == part.name()) // && (interface == nullptr || part.matches_interface(interface)); // }); software_part iter = null; foreach (var part in m_partdata) { if ((part_name.empty() || part_name == part.name()) && (interface_name == null || part.matches_interface(interface_name))) { iter = part; break; } } //return iter != null //m_partdata.end() // ? &*iter // : null; return(iter); }
//------------------------------------------------- // audit_software //------------------------------------------------- public summary audit_software(software_list_device swlist, software_info swinfo, string validation = AUDIT_VALIDATE_FULL) { // start fresh m_record_list.clear(); // store validation for later m_validation = validation; int found = 0; int required = 0; throw new emu_unimplemented(); #if false // now iterate over software parts std::vector <std::string> searchpath; auto const do_audit = [this, &swlist, &swinfo, &searchpath] (rom_entry const *region, rom_entry const *rom)->audit_record const * { if (ROMREGION_ISROMDATA(region)) { if (searchpath.empty()) { searchpath = rom_load_manager::get_software_searchpath(swlist, swinfo); } return(&audit_one_rom(searchpath, rom)); } else if (ROMREGION_ISDISKDATA(region)) { return(&audit_one_disk(rom, swlist, swinfo)); } else { return(nullptr); } }; for (const software_part&part : swinfo.parts()) { audit_regions(do_audit, part.romdata().data(), found, required); } if (found == 0 && required > 0) { m_record_list.clear(); return(summary.NOTFOUND); } // return a summary return(summarize(swlist.list_name().c_str())); #endif }
public software_compatibility is_compatible(software_part part) { throw new emu_unimplemented(); }