From 7468fdb9ca9892cec9b298690bf0edf3655d6453 Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Sat, 11 Jun 2011 14:14:24 +0000 Subject: Typedef all globally used export smart pointer types in one file. Some of them need to be ordered in STL containers, and thus need a special comparable wrapper for boost::shared_ptr, defined in comparable_shared_ptr.h. This also alleviates the typedef hell present earlier in some export classes :) Making the timespan pointer comparable should fix bug #4093 git-svn-id: svn://localhost/ardour2/branches/3.0@9702 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/export_profile_manager.h | 58 ++++++++++++----------------- 1 file changed, 23 insertions(+), 35 deletions(-) (limited to 'libs/ardour/ardour/export_profile_manager.h') diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index fef6f3aad5..c0d2bb1dd8 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -28,7 +28,6 @@ #include #include -#include #include "pbd/uuid.h" #include "pbd/file_utils.h" @@ -37,16 +36,12 @@ #include "ardour/filesystem_paths.h" #include "ardour/location.h" #include "ardour/types.h" +#include "ardour/export_handler.h" namespace ARDOUR { class ExportHandler; -class ExportTimespan; -class ExportChannelConfiguration; -class ExportFormatSpecification; -class ExportFilename; -class ExportPreset; class Location; class Session; @@ -61,13 +56,12 @@ class ExportProfileManager void load_profile (); void prepare_for_export (); - typedef boost::shared_ptr PresetPtr; - typedef std::list PresetList; + typedef std::list PresetList; PresetList const & get_presets () { return preset_list; } - bool load_preset (PresetPtr preset); - PresetPtr new_preset (std::string const & name); - PresetPtr save_preset (std::string const & name); + bool load_preset (ExportPresetPtr preset); + ExportPresetPtr new_preset (std::string const & name); + ExportPresetPtr save_preset (std::string const & name); void remove_preset (); private: @@ -92,9 +86,9 @@ class ExportProfileManager void serialize_global_profile (XMLNode & root); void serialize_local_profile (XMLNode & root); - PresetList preset_list; - PresetPtr current_preset; - FileMap preset_file_map; + PresetList preset_list; + ExportPresetPtr current_preset; + FileMap preset_file_map; std::vector find_file (std::string const & pattern); @@ -104,8 +98,7 @@ class ExportProfileManager /* Timespans */ public: - typedef boost::shared_ptr TimespanPtr; - typedef std::list TimespanList; + typedef std::list TimespanList; typedef boost::shared_ptr TimespanListPtr; typedef std::list LocationList; @@ -165,12 +158,10 @@ class ExportProfileManager /* Channel Configs */ public: - typedef boost::shared_ptr ChannelConfigPtr; - struct ChannelConfigState { - ChannelConfigPtr config; + ExportChannelConfigPtr config; - ChannelConfigState (ChannelConfigPtr ptr) : config (ptr) {} + ChannelConfigState (ExportChannelConfigPtr ptr) : config (ptr) {} }; typedef boost::shared_ptr ChannelConfigStatePtr; typedef std::list ChannelConfigStateList; @@ -188,14 +179,13 @@ class ExportProfileManager /* Formats */ public: - typedef boost::shared_ptr FormatPtr; - typedef std::list FormatList; + typedef std::list FormatList; struct FormatState { boost::shared_ptr list; - FormatPtr format; + ExportFormatSpecPtr format; - FormatState (boost::shared_ptr list, FormatPtr format) : + FormatState (boost::shared_ptr list, ExportFormatSpecPtr format) : list (list), format (format) {} }; typedef boost::shared_ptr FormatStatePtr; @@ -205,9 +195,9 @@ class ExportProfileManager FormatStatePtr duplicate_format_state (FormatStatePtr state); void remove_format_state (FormatStatePtr state); - PBD::sys::path save_format_to_disk (FormatPtr format); - void remove_format_profile (FormatPtr format); - FormatPtr get_new_format (FormatPtr original); + PBD::sys::path save_format_to_disk (ExportFormatSpecPtr format); + void remove_format_profile (ExportFormatSpecPtr format); + ExportFormatSpecPtr get_new_format (ExportFormatSpecPtr original); PBD::Signal0 FormatListChanged; @@ -221,7 +211,7 @@ class ExportProfileManager void load_formats (); - FormatPtr load_format (XMLNode & node); + ExportFormatSpecPtr load_format (XMLNode & node); void load_format_from_disk (PBD::sys::path const & path); boost::shared_ptr format_list; @@ -230,12 +220,10 @@ class ExportProfileManager /* Filenames */ public: - typedef boost::shared_ptr FilenamePtr; - struct FilenameState { - FilenamePtr filename; + ExportFilenamePtr filename; - FilenameState (FilenamePtr ptr) : filename (ptr) {} + FilenameState (ExportFilenamePtr ptr) : filename (ptr) {} }; typedef boost::shared_ptr FilenameStatePtr; typedef std::list FilenameStateList; @@ -249,7 +237,7 @@ class ExportProfileManager FilenameStateList filenames; bool init_filenames (XMLNodeList nodes); - FilenamePtr load_filename (XMLNode & node); + ExportFilenamePtr load_filename (XMLNode & node); /* Warnings */ public: @@ -268,8 +256,8 @@ class ExportProfileManager FormatStatePtr format_state, FilenameStatePtr filename_state); - bool check_format (FormatPtr format, uint32_t channels); - bool check_sndfile_format (FormatPtr format, unsigned int channels); + bool check_format (ExportFormatSpecPtr format, uint32_t channels); + bool check_sndfile_format (ExportFormatSpecPtr format, unsigned int channels); /* Utilities */ -- cgit v1.2.3