MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ regions_to_groups()

std::unordered_map< std::string, Kakshya::RegionGroup > MayaFlux::IO::FileReader::regions_to_groups ( const std::vector< FileRegion > &  regions)
staticprotected

Convert file regions to region groups.

Parameters
regionsVector of file regions.
Returns
Region groups organized by type.

Groups regions by their type field, producing a map from type to RegionGroup.

Definition at line 65 of file SoundFileReader.cpp.

66{
67 std::unordered_map<std::string, Kakshya::RegionGroup> groups;
68
69 for (const auto& region : regions) {
70 auto& group = groups[region.type];
71 group.name = region.type;
72 group.add_region(region.to_region());
73 }
74
75 return groups;
76}

Referenced by MayaFlux::IO::SoundFileReader::load_into_container().

+ Here is the caller graph for this function: