2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /** @file src/pkl_file.cc
21 * @brief Classes used to parse a PKL.
28 using namespace boost;
29 using namespace libdcp;
31 PKLFile::PKLFile (string file)
32 : XMLFile (file, "PackingList")
34 id = string_child ("Id");
35 annotation_text = string_child ("AnnotationText");
36 issue_date = string_child ("IssueDate");
37 issuer = string_child ("Issuer");
38 creator = string_child ("Creator");
39 assets = type_grand_children<PKLAsset> ("AssetList", "Asset");
42 PKLAsset::PKLAsset (xmlpp::Node const * node)
45 id = string_child ("Id");
46 annotation_text = optional_string_child ("AnnotationText");
47 hash = string_child ("Hash");
48 size = int64_child ("Size");
49 type = string_child ("Type");
50 original_file_name = optional_string_child ("OriginalFileName");