Find(path, "", code);
}
-SubFolder::SubFolder(Folder *parent, const std::string &path) :
+SubFolder::SubFolder(Folder &parent, const std::string &path) :
parent_(parent),
path_(path)
{
}
void SubFolder::Save(const std::string &path, const Functor<void (std::streambuf &)> &code) {
- return parent_->Save(path_ + path, code);
+ return parent_.Save(path_ + path, code);
}
bool SubFolder::Open(const std::string &path, const Functor<void (std::streambuf &)> &code) {
- return parent_->Open(path_ + path, code);
+ return parent_.Open(path_ + path, code);
}
void SubFolder::Find(const std::string &path, const Functor<void (const std::string &, const Functor<void (const Functor<void (std::streambuf &, std::streambuf &)> &)> &)> &code) {
- return parent_->Find(path_ + path, code);
+ return parent_.Find(path_ + path, code);
}
static size_t copy(std::streambuf &source, std::streambuf &target) {
if (!nested(name))
return;
auto bundle(root + Split(name).dir);
- SubFolder subfolder(&folder, bundle);
+ SubFolder subfolder(folder, bundle);
Bundle(bundle, subfolder, key, local);
}));
public Folder
{
private:
- Folder *parent_;
+ Folder &parent_;
std::string path_;
public:
- SubFolder(Folder *parent, const std::string &path);
+ SubFolder(Folder &parent, const std::string &path);
virtual void Save(const std::string &path, const Functor<void (std::streambuf &)> &code);
virtual bool Open(const std::string &path, const Functor<void (std::streambuf &)> &code);