add a cmake option to switch between std and boost filesystem

This commit is contained in:
Chunting Gu
2021-05-27 11:15:08 +08:00
parent 39719c4ded
commit df96f969bc
31 changed files with 227 additions and 195 deletions
+5 -6
View File
@@ -1,8 +1,7 @@
#ifndef VIEWS_H_
#define VIEWS_H_
#include "boost/filesystem/path.hpp"
#include "webcc/fs.h"
#include "webcc/view.h"
// -----------------------------------------------------------------------------
@@ -25,7 +24,7 @@ private:
// URL: /books/{id}
class BookDetailView : public webcc::View {
public:
explicit BookDetailView(boost::filesystem::path photo_dir);
explicit BookDetailView(webcc::fs::path photo_dir);
webcc::ResponsePtr Handle(webcc::RequestPtr request) override;
@@ -40,7 +39,7 @@ private:
webcc::ResponsePtr Delete(webcc::RequestPtr request);
private:
boost::filesystem::path photo_dir_;
webcc::fs::path photo_dir_;
};
// -----------------------------------------------------------------------------
@@ -48,7 +47,7 @@ private:
// URL: /books/{id}/photo
class BookPhotoView : public webcc::View {
public:
explicit BookPhotoView(boost::filesystem::path photo_dir);
explicit BookPhotoView(webcc::fs::path photo_dir);
webcc::ResponsePtr Handle(webcc::RequestPtr request) override;
@@ -68,7 +67,7 @@ private:
webcc::ResponsePtr Delete(webcc::RequestPtr request);
private:
boost::filesystem::path photo_dir_;
webcc::fs::path photo_dir_;
};
#endif // VIEWS_H_