Cleanup: using sorting.
[dcpomatic.git] / src / lib / audio_processor.h
index e2f1c48ebf6eefb5aa456de185f014ee7787e8d3..4cfda1defb5d84800594fc13717a985c26abc917 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @file  src/lib/audio_processor.h
  *  @brief AudioProcessor class.
  */
 
+
 #ifndef DCPOMATIC_AUDIO_PROCESSOR_H
 #define DCPOMATIC_AUDIO_PROCESSOR_H
 
-#include "types.h"
-#include <list>
+
+#include "named_channel.h"
+#include <memory>
 #include <string>
 #include <vector>
 
+
 class AudioBuffers;
 class AudioMapping;
 
+
 /** @class AudioProcessor
  *  @brief A parent class for processors of audio data.
  *
@@ -60,14 +65,15 @@ public:
        /** @return the user-visible (translated) names of each of our inputs, in order */
        virtual std::vector<NamedChannel> input_names () const = 0;
 
-       static std::list<AudioProcessor const *> all ();
-       static std::list<AudioProcessor const *> visible ();
+       static std::vector<AudioProcessor const *> all ();
+       static std::vector<AudioProcessor const *> visible ();
        static void setup_audio_processors ();
        static AudioProcessor const * from_id (std::string);
 
 private:
-       static std::list<AudioProcessor const *> _all;
-       static std::list<AudioProcessor const *> _non_experimental;
+       static std::vector<std::unique_ptr<const AudioProcessor>> _experimental;
+       static std::vector<std::unique_ptr<const AudioProcessor>> _non_experimental;
 };
 
+
 #endif