It seems to be a relic from ancient times. It also causes problems in
certain situations where it's desirable to remove and reload items.
return;
File &file = i->second->get_file();
- if(file.is_loaded())
- return;
- file.set_loaded();
RefPtr<IO::Base> in = file.open();
Parser parser(*in, file.get_full_name());
filename(fn),
offset(0),
length(0),
- collection(false),
- loaded(false)
+ collection(false)
{ }
RefPtr<IO::Seekable> PackSource::File::open() const
return format("%s/%s", pack.get_filename(), filename);
}
-void PackSource::File::set_loaded()
-{
- loaded = true;
-}
-
void PackSource::File::collect_objects(ObjectMap &objs) const
{
for(list<Object>::const_iterator i=objects.begin(); i!=objects.end(); ++i)
unsigned length;
bool collection;
std::list<Object> objects;
- bool loaded;
public:
File(const Pack &, const std::string &);
std::string get_full_name() const;
bool is_collection() const { return collection; }
- void set_loaded();
- bool is_loaded() const { return loaded; }
-
void collect_objects(ObjectMap &) const;
};