Strip Unicode U+202B (right-to-left-embedding) code; it looks like DoM does RTL ...
[libsub.git] / src / dcp_reader.h
index 51ada1a0e63fdd6dd844420c5baf11a715b06c09..8f49dfd6e6d18d6f5e1db5170afdb6ffadeef879 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2017 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
-#include "reader.h"
-#include <boost/shared_ptr.hpp>
+#ifndef LIBSUB_DCP_READER_H
+#define LIBSUB_DCP_READER_H
 
-namespace cxml {
-       class Node;
-}
+#include "reader.h"
+#include <boost/filesystem.hpp>
 
 namespace sub {
 
-class DCPFont; 
-class DCPText;
-class DCPSubtitle;
-class DCPLoadFont;
-
+/** @class DCPReader
+ *  @brief A class which reads DCP subtitles.
+ */
 class DCPReader : public Reader
 {
 public:
-       DCPReader (std::istream &);
-
-private:
-       
-       struct ParseState {
-               std::list<boost::shared_ptr<DCPFont> > font_nodes;
-               std::list<boost::shared_ptr<DCPText> > text_nodes;
-               std::list<boost::shared_ptr<DCPSubtitle> > subtitle_nodes;
-       };
-
-       void maybe_add_subtitle (std::string text, ParseState const & parse_state);
-       
-       void examine_font_nodes (
-               boost::shared_ptr<const cxml::Node> xml,
-               std::list<boost::shared_ptr<DCPFont> > const & font_nodes,
-               ParseState& parse_state
-               );
-       
-       void examine_text_nodes (
-               boost::shared_ptr<const cxml::Node> xml,
-               std::list<boost::shared_ptr<DCPText> > const & text_nodes,
-               ParseState& parse_state
-               );
-
-       std::string font_id_to_name (std::string id) const;
-
-       std::list<boost::shared_ptr<DCPLoadFont> > _load_font_nodes;
+       DCPReader (boost::filesystem::path file);
 };
 
 }
+
+#endif