X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcinema.cc;h=11bc888da32127ef4a6e2cd917026496aaa206d9;hb=c658aec3ffd5009cbe7fa2540da5a0579e2f2e8c;hp=fca6b6afda36c80c653940eaaaa8819818327b4b;hpb=d324fc102df00d6dc62614938f78cf983a101dd4;p=dcpomatic.git diff --git a/src/lib/cinema.cc b/src/lib/cinema.cc index fca6b6afd..11bc888da 100644 --- a/src/lib/cinema.cc +++ b/src/lib/cinema.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2015 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,14 +17,15 @@ */ -#include -#include #include "cinema.h" +#include "screen.h" +#include +#include using std::list; using boost::shared_ptr; -Cinema::Cinema (shared_ptr node) +Cinema::Cinema (cxml::ConstNodePtr node) : name (node->string_child ("Name")) , email (node->string_child ("Email")) { @@ -35,7 +36,7 @@ Cinema::Cinema (shared_ptr node) a constructor) */ void -Cinema::read_screens (shared_ptr node) +Cinema::read_screens (cxml::ConstNodePtr node) { list s = node->node_children ("Screen"); for (list::iterator i = s.begin(); i != s.end(); ++i) { @@ -66,18 +67,3 @@ Cinema::remove_screen (shared_ptr s) { _screens.remove (s); } - -Screen::Screen (shared_ptr node) -{ - name = node->string_child ("Name"); - certificate = shared_ptr (new libdcp::Certificate (node->string_child ("Certificate"))); -} - -void -Screen::as_xml (xmlpp::Element* parent) const -{ - parent->add_child("Name")->add_child_text (name); - parent->add_child("Certificate")->add_child_text (certificate->certificate (true)); -} - -