X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcinema.h;h=40dc15ae02ebaf66decb9f837ce845b5d40dcc99;hb=98060a4e6f02b418f30b4b736e5880a357454c40;hp=6f426ae8d66630eab59f1788e71535a24dfaed39;hpb=048f9b6b5569f03d1342a04f75c83a2bad340996;p=dcpomatic.git diff --git a/src/lib/cinema.h b/src/lib/cinema.h index 6f426ae8d..40dc15ae0 100644 --- a/src/lib/cinema.h +++ b/src/lib/cinema.h @@ -1,5 +1,31 @@ +/* + Copyright (C) 2013 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include #include +class Cinema; + +namespace cxml { + class Node; +} + class Screen { public: @@ -7,20 +33,39 @@ public: : name (n) , certificate (cert) {} + + Screen (boost::shared_ptr); + + void as_xml (xmlpp::Element *) const; + boost::shared_ptr cinema; std::string name; boost::shared_ptr certificate; }; -class Cinema +class Cinema : public boost::enable_shared_from_this { public: Cinema (std::string const & n, std::string const & e) : name (n) , email (e) {} + + Cinema (boost::shared_ptr); + + void read_screens (boost::shared_ptr); + + void as_xml (xmlpp::Element *) const; + + void add_screen (boost::shared_ptr); + void remove_screen (boost::shared_ptr); std::string name; std::string email; - std::list > screens; + std::list > screens () const { + return _screens; + } + +private: + std::list > _screens; };