TazGraph Project v0.1.0
Loading...
Searching...
No Matches
IGraphParser.h
1#pragma once
2
3#include <algorithm>
4#include <random>
5#include <ctime>
6
7#include <JsonParser.h> //for json
8#include <tinyxml2.h> // for graphml
9#include <DotParser.h> // for dot/graphviz
10
11#include "TazGraphEngine.h"
12
13struct ParsedNode {
14 int id;
15 glm::vec3 pos;
16};
17
18struct ParsedLink {
19 int id;
20 int fromId, toId;
21};
22
24 int id;
25 int fromId, toId;
26 NodeEntity* from = nullptr;
27 NodeEntity* to = nullptr;
28};
29
41public:
42 float elapsedDelta = 0;
43
44 virtual ~IGraphParser() = default;
45
46 virtual void readFile(std::string m_fileName) = 0;
47
48 virtual void writeFile(std::string m_fileName, Manager& manager) = 0;
49
50 virtual void parse(
51 Manager& manager,
52 std::function<void(Entity&, glm::vec3)> addNodeFunc,
53 std::function<void(Entity&)> addLinkFunc) = 0;
54
55 virtual void closeFile() = 0;
56
57 virtual void update(float deltaTime) = 0;
58
59 Threader* _threader = nullptr;
60
61 void setThreader(Threader& mthreader) {
62 _threader = &mthreader;
63 }
64};
Definition GECS.h:224
Abstract base class for all map parsers.
Definition IGraphParser.h:40
Threader * _threader
for background processing
Definition IGraphParser.h:59
Definition GECSManager.h:20
Definition GECSEntity.h:40
Definition IGraphParser.h:13
Definition Threader.h:84