Adds prototype for mapping out pages for navigation sections
This commit is contained in:
parent
dc03e239d5
commit
2fbec8869d
14 changed files with 69 additions and 9 deletions
33
Src/Page.h
33
Src/Page.h
|
@ -3,6 +3,10 @@
|
|||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "MacroDefinitions.h"
|
||||
|
||||
|
||||
struct FileFlags
|
||||
|
@ -43,8 +47,13 @@ public:
|
|||
Page(std::string sourceFileUrl, std::string outFolderUrl);
|
||||
|
||||
std::string getSourceFileContents();
|
||||
std::string getOutFileUrl();
|
||||
std::string getRelativeUrl();
|
||||
|
||||
std::string getInUrl();
|
||||
std::string getRelativeInUrl();
|
||||
|
||||
std::string getOutUrl();
|
||||
std::string getRelativeOutUrl();
|
||||
|
||||
std::string getPageTitle();
|
||||
FileFlags getPageFlags();
|
||||
|
||||
|
@ -53,3 +62,23 @@ public:
|
|||
void writePageToFile();
|
||||
|
||||
};
|
||||
|
||||
/*
|
||||
* Class to represent the structure of the nav menu, the categories of the pages
|
||||
*/
|
||||
// A node can either be a file or a folder, value for each possibility.
|
||||
struct PageTreeNode
|
||||
{
|
||||
std::vector<PageTreeNode> branches;
|
||||
Page* pageValue;
|
||||
std::string folderValue;
|
||||
};
|
||||
|
||||
class PageTree
|
||||
{
|
||||
private:
|
||||
PageTreeNode* rootNode;
|
||||
public:
|
||||
PageTreeNode* getNodeLinear(int x);
|
||||
std::vector<PageTreeNode> getTreeAsList();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue