19 IOFilter( std::string _name, std::string _ext )
20 :
name{ std::move( _name ) }
31 return extensions.find( ext ) != std::string::npos;
40 for (
const auto& bElem : b )
42 if ( std::find_if( a.begin(), a.end(), [&] (
const IOFilter& aF )
44 return aF.extensions == bElem.extensions;
46 copy.push_back( bElem );
54 const auto it = std::find_if( filters.begin(), filters.end(), [&extension] (
auto&& filter )
56 return filter.isSupportedExtension( extension );
58 if ( it != filters.end() )
BitSet operator|(const BitSet &a, const BitSet &b)
Definition MRMesh/MRBitSet.h:323
std::vector< IOFilter > IOFilters
Definition MRIOFilters.h:35
std::optional< IOFilter > findFilter(const IOFilters &filters, const std::string &extension)
find a corresponding filter for a given extension
Definition MRIOFilters.h:52
Definition MRCameraOrientationPlugin.h:8
Definition MRIOFilters.h:17
bool isSupportedExtension(const std::string &ext) const
Definition MRIOFilters.h:29
IOFilter(std::string _name, std::string _ext)
Definition MRIOFilters.h:19
std::partial_ordering operator<=>(const IOFilter &) const =default
std::string extensions
Definition MRIOFilters.h:25
std::string name
Definition MRIOFilters.h:24