BOOST_FOREACH (shared_ptr<CPL> i, cpls ()) {
NameFormat::Map values;
values['t'] = "cpl";
- values['i'] = i->id();
- i->write_xml (_directory / (name_format.get(values) + ".xml"), standard, signer);
+ i->write_xml (_directory / (name_format.get(values, "_" + i->id() + ".xml")), standard, signer);
}
string const pkl_uuid = make_uuid ();
NameFormat::Map values;
values['t'] = "pkl";
- values['i'] = pkl_uuid;
- boost::filesystem::path const pkl_path = write_pkl (name_format.get(values) + ".xml", standard, pkl_uuid, metadata, signer);
+ boost::filesystem::path const pkl_path = write_pkl (name_format.get(values, "_" + pkl_uuid + ".xml"), standard, pkl_uuid, metadata, signer);
write_volindex (standard);
write_assetmap (standard, pkl_uuid, pkl_path, metadata);
Standard standard,
XMLMetadata metadata = XMLMetadata (),
boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<const CertificateChain> (),
- NameFormat name_format = NameFormat("%t_%i")
+ NameFormat name_format = NameFormat("%t")
);
void resolve_refs (std::list<boost::shared_ptr<Asset> > assets);
}
string
-NameFormat::get (Map values) const
+NameFormat::get (Map values, string suffix) const
{
string result;
for (size_t i = 0; i < _specification.length(); ++i) {
}
}
- return result;
+ return result + suffix;
}
bool
typedef std::map<char, std::string> Map;
- std::string get (Map) const;
+ std::string get (Map, std::string suffix) const;
private:
std::string _specification;