indexing description: "[ Implements the main Preset part. Note: It stores the current settings in the channel and in the master. ]" date: "$Date$" revision: "$Revision$" class MIXER_PRESET create make_empty, make_with_save feature {NONE} -- Initialization make_empty (a_master: like internal_master) is -- Initialize new preset. require a_master_not_void: a_master /= Void do internal_master := a_master create channels.make (1, 6) end make_with_save (a_master: like internal_master) is -- Initialize new preset. require a_master_not_void: a_master /= Void do make_empty (a_master) save end feature -- Implementation save is -- Save the local settings from the channels and the master. local i: INTEGER channel: MIXER_PRESET_CHANNEL do create music_channel.make (internal_master.music_channel) from i := 1 until i > 6 loop create channel.make (internal_master.channels.item (i)) channels.put (channel, i) i := i + 1 end create master.make (internal_master) end load is -- Load the local settings from the channels and the master from the last save. local i: INTEGER do music_channel.load (internal_master.music_channel) from i := 1 until i > 6 loop channels.item (i).load (internal_master.channels.item (i)) i := i + 1 end master.load (internal_master) end feature {NONE} -- Internal variables internal_master: MIXER_MASTER feature -- Access music_channel: MIXER_PRESET_MUSIC_CHANNEL -- Access the music channel channels: ARRAY [MIXER_PRESET_CHANNEL] -- Access the channels master: MIXER_PRESET_MASTER -- Access the master end