summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-28 15:56:49 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-28 15:56:49 +0100
commitc272879a8e748be83acbb190257d78a34be3f25f (patch)
treecdddb14e26a37d25c4fd1b00144f977c4ab4e5a9 /src
parent2ea95f432a4c12271354d2fa136c0832704e9244 (diff)
Add CPL::filename().
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc12
-rw-r--r--src/cpl.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 5079b4f6..1ac0621b 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -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;
diff --git a/src/cpl.h b/src/cpl.h
index c50d8f90..0c213f8a 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -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;