Fix bad frees if exceptions are thrown by constructors.
[libdcp.git] / src / subtitle_asset.h
index 2da1ce7b8f9b7ae6f0c3090428a4b6351bdd027d..4ef0794e7677a8cf245f4d6b5536caa51ef3274c 100644 (file)
 
 */
 
+#include <libcxml/cxml.h>
 #include "asset.h"
-#include "xml.h"
 #include "dcp_time.h"
-#include "parse/subtitle.h"
 
 namespace libdcp
 {
 
+namespace parse
+{
+       class Font;
+       class Text;
+       class Subtitle;
+       class LoadFont;
+}
+
 class Subtitle
 {
 public:
@@ -123,7 +130,7 @@ public:
        SubtitleAsset (std::string directory, std::string xml_file);
        SubtitleAsset (std::string directory, std::string movie_title, std::string language);
 
-       void write_to_cpl (xmlpp::Node *) const;
+       void write_to_cpl (xmlpp::Element *, bool) const;
        virtual bool equals (boost::shared_ptr<const Asset>, EqualityOptions, boost::function<void (NoteType, std::string)> note) const {
                /* XXX */
                note (ERROR, "subtitle assets not compared yet");