diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-30 23:47:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-30 23:47:57 +0100 |
| commit | 9a9d4e014c16be88d72914a9480343445bc785a5 (patch) | |
| tree | 1857fcdd8963d51ac50f1467d9ae81d4d9be5f8e /src/asset_map.cc | |
| parent | 34a25d89b16a33b5f619ae0eaaa03c17f93980af (diff) | |
Various.
Diffstat (limited to 'src/asset_map.cc')
| -rw-r--r-- | src/asset_map.cc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/asset_map.cc b/src/asset_map.cc new file mode 100644 index 00000000..b5e621d4 --- /dev/null +++ b/src/asset_map.cc @@ -0,0 +1,45 @@ +#include "asset_map.h" + +using namespace std; +using namespace libdcp; + +AssetMap::AssetMap (string file) + : XMLFile (file) +{ + id = string_node ("Id"); + creator = string_node ("Creator"); + volume_count = int_node ("VolumeCount"); + issue_date = string_node ("IssueDate"); + issuer = string_node ("Issuer"); + asset_list = sub_node<AssetList> ("AssetMapAssetList"); +} + +AssetMapAssetList::AssetMapAssetList (xmlpp::Node const * node) + : XMLNode (node) +{ + assets = sub_nodes<AssetMapAsset> ("Asset"); +} + +AssetMapAsset::AssetMapAsset (xmlpp::Node const * node) + : XMLNode (node) +{ + id = string_node ("Id"); + packing_list = optional_string_node ("PackingList"); + chunk_list = sub_node<ChunkList> ("ChunkList"); +} + +ChunkList::ChunkList (xmlpp::Node const * node) + : XMLNode (node) +{ + chunks = sub_nodes<Chunk> ("Chunk"); +} + +Chunk::Chunk (xmlpp::Node const * node) + : XMLNode (node) +{ + path = string_node ("Path"); + volume_index = int_node ("VolumeIndex"); + offset = int_node ("Offset"); + length = int_node ("Length"); +} + |
