Adds beginnings of BlogPageBuilder and associated classes
This commit is contained in:
parent
65aefe46ce
commit
1506f661c9
114 changed files with 4740 additions and 518 deletions
43
Src/Page.h
Normal file
43
Src/Page.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
|
||||
struct FileFlags
|
||||
{
|
||||
bool hidden;
|
||||
};
|
||||
|
||||
class FlagReader
|
||||
{
|
||||
private:
|
||||
|
||||
public:
|
||||
FileFlags readFlags(std::string flagString);
|
||||
};
|
||||
|
||||
/*
|
||||
* Class to represent the files of a blog page, this represents
|
||||
* the original file and its new output file
|
||||
*/
|
||||
class Page
|
||||
{
|
||||
private:
|
||||
std::string fileUrl;
|
||||
std::string fileContents;
|
||||
std::string title;
|
||||
FileFlags flags;
|
||||
// file date should be added here
|
||||
|
||||
void calculatePageFlags();
|
||||
std::string readFile(std::string fileUrl);
|
||||
|
||||
public:
|
||||
Page(std::string fileUrl);
|
||||
std::string getPageContents();
|
||||
std::string getPageTitle();
|
||||
FileFlags getPageFlags();
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue