-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraphMaker.h
More file actions
35 lines (29 loc) · 989 Bytes
/
graphMaker.h
File metadata and controls
35 lines (29 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <filesystem>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
typedef struct
{
std::string include_file;
bool quotation_marks;
} Include;
/**
* @brief Get the Include name and type from line
*
* @param line string with the line
* @param include to fill with file name and type
* @returns true if had #include with file
*/
bool getInclude(const std::string& line, Include& include);
/**
* @brief Print the files and their includes into a mermaid graph
*
* @param out the output
* @param files list of all the files
*/
void printIncludeGraph(std::ostream& out, const std::vector<std::filesystem::directory_entry>& files);
std::string getRandomColor();
std::string getRandomFromList(std::vector<std::string>& list);
inline std::vector<std::string> colors{"blue", "black", "silver", "red", "purple", "maroon", "fuchsia", "green",
"lime", "olive", "yellow", "navy", "gray", "teal", "aqua"};