FIXME: Remove all use of add_child() from xmlpp.
[dcpomatic.git] / src / lib / playlist.h
index 0dd2370a8c6e36c8ba805190a3524c4f06031e6a..7b9bd19fac914ed644e2251a29ccadf7f6e37539 100644 (file)
@@ -24,8 +24,9 @@
 
 
 #include "change_signaller.h"
+#include "dcpomatic_time.h"
 #include "frame_rate_change.h"
-#include "util.h"
+#include "types.h"
 #include <libcxml/cxml.h>
 #include <boost/signals2.hpp>
 #include <boost/thread.hpp>
 class Film;
 
 
-struct ContentSorter
-{
-       bool operator() (std::shared_ptr<Content> a, std::shared_ptr<Content> b);
-};
-
-
 /** @class Playlist
  *  @brief A set of Content objects with knowledge of how they should be arranged into
  *  a DCP.
@@ -48,13 +43,14 @@ struct ContentSorter
 class Playlist
 {
 public:
-       Playlist ();
+       Playlist() = default;
+
        ~Playlist ();
 
        Playlist (Playlist const&) = delete;
        Playlist& operator= (Playlist const&) = delete;
 
-       void as_xml (xmlpp::Node *, bool with_content_paths);
+       void as_xml(xmlpp::Element*, bool with_content_paths);
        void set_from_xml (std::shared_ptr<const Film> film, cxml::ConstNodePtr node, int version, std::list<std::string>& notes);
 
        void add (std::shared_ptr<const Film> film, std::shared_ptr<Content>);
@@ -83,7 +79,7 @@ public:
 
        void repeat (std::shared_ptr<const Film> film, ContentList, int);
 
-       /** Emitted when content has been added to or removed from the playlist; implies OrderChanged */
+       /** Emitted when content has been added to or removed from the playlist; implies OrderChange */
        mutable boost::signals2::signal<void (ChangeType)> Change;
        mutable boost::signals2::signal<void ()> OrderChange;
        /** Emitted when the length might have changed; may sometimes be emitted when it has not */
@@ -97,7 +93,7 @@ private:
        void reconnect (std::shared_ptr<const Film> film);
 
        mutable boost::mutex _mutex;
-       /** List of content.  Kept sorted in position order. */
+       /** List of content, kept sorted by ContentSorter() */
        ContentList _content;
        bool _sequence = true;
        bool _sequencing = false;