Some comments.
[libdcp.git] / src / asset_map.cc
1 #include "asset_map.h"
2
3 using namespace std;
4 using namespace libdcp;
5
6 AssetMap::AssetMap (string file)
7         : XMLFile (file, "AssetMap")
8 {
9         id = string_node ("Id");
10         creator = string_node ("Creator");
11         volume_count = int64_node ("VolumeCount");
12         issue_date = string_node ("IssueDate");
13         issuer = string_node ("Issuer");
14         assets = sub_nodes<AssetMapAsset> ("AssetList", "Asset");
15 }
16
17 AssetMapAsset::AssetMapAsset (xmlpp::Node const * node)
18         : XMLNode (node)
19 {
20         id = string_node ("Id");
21         packing_list = optional_string_node ("PackingList");
22         chunks = sub_nodes<Chunk> ("ChunkList", "Chunk");
23 }
24
25 Chunk::Chunk (xmlpp::Node const * node)
26         : XMLNode (node)
27 {
28         path = string_node ("Path");
29         volume_index = optional_int64_node ("VolumeIndex");
30         offset = optional_int64_node ("Offset");
31         length = optional_int64_node ("Length");
32 }
33