add_pack(&io, fn, string());
}
+void PackSource::add_pack_io(IO::Seekable &io, const string &fn, const string &filter)
+{
+ add_pack(&io, fn, filter);
+}
+
void PackSource::add_pack(IO::Seekable *io, const string &fn, const string &filter)
{
Pack *pack = 0;
for(list<Pack>::iterator i=packs.begin(); (!pack && i!=packs.end()); ++i)
- if(i->get_filename()==fn)
+ if(i->get_filename()==fn || (io && i->get_io()==io))
pack = &*i;
if(!pack)
{
PackSource. */
void add_pack_io(IO::Seekable &, const std::string & = std::string());
+ /** Adds a pack from an I/O object with a regex to filter logical files.
+ Multiple filters for the same I/O object can be added with repeated calls. */
+ void add_pack_io(IO::Seekable &, const std::string &, const std::string &);
+
private:
void add_pack(IO::Seekable *, const std::string &, const std::string &);