Refactored #7 out into class files like I should have to begin with.
This commit is contained in:
22
2022/7/Folder.h
Normal file
22
2022/7/Folder.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef ADVENT_DVEREB_FOLDER_H
|
||||
#define ADVENT_DVEREB_FOLDER_H
|
||||
|
||||
#include "File.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Folder : public File {
|
||||
public:
|
||||
Folder(const std::string &filename);
|
||||
|
||||
unsigned long Size() const override;
|
||||
void AddFile(const std::string &filename, unsigned long size);
|
||||
void AddFolder(const std::string &name);
|
||||
const std::vector<File*>& Files() const;
|
||||
|
||||
private:
|
||||
std::vector<File*> files;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user