using namespace dcp;
InteropLoadFont::InteropLoadFont (string id_, string uri_)
- : id (id_)
+ : LoadFont (id_)
, uri (uri_)
{
*/
+#include "load_font.h"
#include <libcxml/cxml.h>
#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
namespace dcp {
-class InteropLoadFont
+class InteropLoadFont : public LoadFont
{
public:
InteropLoadFont () {}
InteropLoadFont (std::string id, std::string uri);
InteropLoadFont (cxml::ConstNodePtr node);
- std::string id;
std::string uri;
};
return true;
}
+
+list<shared_ptr<LoadFont> >
+InteropSubtitleContent::load_font_nodes () const
+{
+ list<shared_ptr<LoadFont> > lf;
+ copy (_load_font_nodes.begin(), _load_font_nodes.end(), back_inserter (lf));
+ return lf;
+}
boost::function<void (NoteType, std::string)> note
) const;
- std::list<boost::shared_ptr<InteropLoadFont> > load_font_nodes () const {
- return _load_font_nodes;
- }
+ std::list<boost::shared_ptr<LoadFont> > load_font_nodes () const;
void add_font (std::string id, std::string uri);
using namespace dcp;
SMPTELoadFont::SMPTELoadFont (shared_ptr<const cxml::Node> node)
+ : LoadFont (node->string_attribute ("ID"))
{
- id = node->string_attribute ("ID");
urn = node->content().substr (9);
}
*/
+#include "load_font.h"
#include <boost/shared_ptr.hpp>
#include <boost/optional.hpp>
namespace dcp {
-class SMPTELoadFont
+class SMPTELoadFont : public LoadFont
{
public:
SMPTELoadFont () {}
SMPTELoadFont (boost::shared_ptr<const cxml::Node> node);
- std::string id;
std::string urn;
};
parse_common (xml, font_nodes);
}
+
+list<shared_ptr<LoadFont> >
+SMPTESubtitleContent::load_font_nodes () const
+{
+ list<shared_ptr<LoadFont> > lf;
+ copy (_load_font_nodes.begin(), _load_font_nodes.end(), back_inserter (lf));
+ return lf;
+}
*/
SMPTESubtitleContent (boost::filesystem::path file, bool mxf = true);
+ std::list<boost::shared_ptr<LoadFont> > load_font_nodes () const;
+
private:
std::list<boost::shared_ptr<SMPTELoadFont> > _load_font_nodes;
};
class Font;
class Text;
class Subtitle;
+class LoadFont;
/** @class SubtitleContent
* @brief A parent for classes representing a file containing subtitles.
Time latest_subtitle_out () const;
+ virtual std::list<boost::shared_ptr<LoadFont> > load_font_nodes () const = 0;
+
protected:
- void parse_common (boost::shared_ptr<cxml::Document> xml, std::list<boost::shared_ptr<dcp::Font> > font_nodes);
+ void parse_common (boost::shared_ptr<cxml::Document> xml, std::list<boost::shared_ptr<Font> > font_nodes);
std::string pkl_type (Standard) const {
return "text/xml";
interop_load_font.h
interop_subtitle_content.h
key.h
+ load_font.h
local_time.h
metadata.h
mono_picture_mxf.h