SoundFontInfoLib  2.21.6
Library for parsing and rendering SF2 files
SF2::Render::WithZones< T, E > Class Template Reference

Base class for entities that contain a collection of zones. More...

#include <WithZones.hpp>

Public Types

using ZoneType = T
 
using EntityType = E
 
using WithZoneCollection = ZoneCollection< ZoneType >
 

Public Member Functions

bool hasGlobalZone () const
 
const ZoneTypeglobalZone () const
 
const WithZoneCollectionzones () const
 
const EntityTypeconfiguration () const
 

Protected Member Functions

 WithZones (size_t zoneCount, const EntityType &configuration)
 

Protected Attributes

WithZoneCollection zones_
 
const EntityTypeconfiguration_
 

Detailed Description

template<typename T, typename E>
class SF2::Render::WithZones< T, E >

Base class for entities that contain a collection of zones.

  • T is an SF2::Zone class (PresetZone or InstrumentZone) to hold in the collection
  • E is the SF2::Entity class that defines the zone configuration in the SF2 file.

Member Typedef Documentation

◆ EntityType

template<typename T , typename E >
using SF2::Render::WithZones< T, E >::EntityType = E

◆ WithZoneCollection

template<typename T , typename E >
using SF2::Render::WithZones< T, E >::WithZoneCollection = ZoneCollection<ZoneType>

◆ ZoneType

template<typename T , typename E >
using SF2::Render::WithZones< T, E >::ZoneType = T

Constructor & Destructor Documentation

◆ WithZones()

template<typename T , typename E >
SF2::Render::WithZones< T, E >::WithZones ( size_t  zoneCount,
const EntityType configuration 
)
inlineprotected

Member Function Documentation

◆ configuration()

template<typename T , typename E >
const EntityType& SF2::Render::WithZones< T, E >::configuration ( ) const
inline
Returns
the instrument's entity from the SF2 file

References SF2::Render::WithZones< T, E >::configuration_.

◆ globalZone()

template<typename T , typename E >
const ZoneType* SF2::Render::WithZones< T, E >::globalZone ( ) const
inline
Returns
the instrument's global zone or nullptr if there is none

References SF2::Render::ZoneCollection< Kind >::global(), and SF2::Render::WithZones< T, E >::zones_.

◆ hasGlobalZone()

template<typename T , typename E >
bool SF2::Render::WithZones< T, E >::hasGlobalZone ( ) const
inline
Returns
true if the instrument has a global zone

References SF2::Render::ZoneCollection< Kind >::hasGlobal(), and SF2::Render::WithZones< T, E >::zones_.

◆ zones()

template<typename T , typename E >
const WithZoneCollection& SF2::Render::WithZones< T, E >::zones ( ) const
inline
Returns
the collection of zones

References SF2::Render::WithZones< T, E >::zones_.

Member Data Documentation

◆ configuration_

template<typename T , typename E >
const EntityType& SF2::Render::WithZones< T, E >::configuration_
protected

◆ zones_


The documentation for this class was generated from the following file: