diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-28 15:56:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-28 15:56:49 +0100 |
| commit | c272879a8e748be83acbb190257d78a34be3f25f (patch) | |
| tree | cdddb14e26a37d25c4fd1b00144f977c4ab4e5a9 | |
| parent | 2ea95f432a4c12271354d2fa136c0832704e9244 (diff) | |
Add CPL::filename().
| -rw-r--r-- | src/cpl.cc | 12 | ||||
| -rw-r--r-- | src/cpl.h | 2 |
2 files changed, 9 insertions, 5 deletions
@@ -191,14 +191,16 @@ CPL::add_reel (shared_ptr<Reel> reel) _reels.push_back (reel); } +boost::filesystem::path +CPL::filename () const +{ + return _directory / String::compose ("%1_cpl.xml", _id); +} + void CPL::write_xml (bool interop, XMLMetadata const & metadata, shared_ptr<const Signer> signer) const { - boost::filesystem::path p; - p /= _directory; - stringstream s; - s << _id << "_cpl.xml"; - p /= s.str(); + boost::filesystem::path p = filename (); xmlpp::Document doc; xmlpp::Element* root; @@ -91,6 +91,8 @@ public: std::string id () const { return _id; } + + boost::filesystem::path filename () const; bool equals (CPL const & other, EqualityOptions options, boost::function<void (NoteType, std::string)> note) const; |
