X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fdcp_reader.h;h=8f49dfd6e6d18d6f5e1db5170afdb6ffadeef879;hb=b76eedef5e382d4a08573ff9d4f835ada2507722;hp=aa8df7fb14912e17e894b1fc1871e382724df945;hpb=aebf2cb7812c8f593b85182611b587e6014aefc6;p=libsub.git diff --git a/src/dcp_reader.h b/src/dcp_reader.h index aa8df7f..8f49dfd 100644 --- a/src/dcp_reader.h +++ b/src/dcp_reader.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2017 Carl Hetherington 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 @@ -17,46 +17,23 @@ */ -#include "reader.h" -#include +#ifndef LIBSUB_DCP_READER_H +#define LIBSUB_DCP_READER_H -namespace cxml { - class Node; -} +#include "reader.h" +#include 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; - - void maybe_add_subtitle (std::string text, ParseState& parse_state); - - void examine_font_nodes ( - boost::shared_ptr xml, - std::list > const & font_nodes, - ParseState& parse_state - ); - - void examine_text_nodes ( - boost::shared_ptr xml, - std::list > const & text_nodes, - ParseState& parse_state - ); - - std::string font_id_to_name (std::string id) const; - - std::list > _load_font_nodes; + DCPReader (boost::filesystem::path file); }; } + +#endif