C++11 tidying.
[dcpomatic.git] / src / lib / dcp_text_track.h
index d69e6dae9208d73d6b6504f8784f6931c31cefc0..b29d8c4894f2111e3c3bbfe005b91ef70717c13c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_DCP_TEXT_TRACK_H
 #define DCPOMATIC_DCP_TEXT_TRACK_H
 
+
+#include "warnings.h"
+#include <dcp/language_tag.h>
 #include <libcxml/cxml.h>
+DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
+
 
 class DCPTextTrack
 {
 public:
+       DCPTextTrack () {}
        DCPTextTrack (cxml::ConstNodePtr node);
-       DCPTextTrack (std::string name_, std::string language_);
+       DCPTextTrack (std::string name_, boost::optional<dcp::LanguageTag> language_);
 
        std::string name;
-       std::string language;
+       boost::optional<dcp::LanguageTag> language;
 
        std::string summary () const;
        void as_xml (xmlpp::Element* parent) const;
@@ -39,5 +47,7 @@ public:
 
 bool operator== (DCPTextTrack const & a, DCPTextTrack const & b);
 bool operator!= (DCPTextTrack const & a, DCPTextTrack const & b);
+bool operator< (DCPTextTrack const & a, DCPTextTrack const & b);
+
 
 #endif