forked from GokuMK/TSRE5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActLib.h
55 lines (48 loc) · 1.64 KB
/
ActLib.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* This file is part of TSRE5.
*
* TSRE5 - train sim game engine and MSTS/OR Editors.
* Copyright (C) 2016 Piotr Gadecki <pgadecki@gmail.com>
*
* Licensed under GNU General Public License 3.0 or later.
*
* See LICENSE.md or https://www.gnu.org/licenses/gpl.html
*/
#ifndef ACTLIB_H
#define ACTLIB_H
#include <QHash>
#include <QString>
class Activity;
class Service;
class Traffic;
class Path;
class ActLib {
public:
static int jestact;
static int jestservice;
static int jesttraffic;
static int jestpath;
static QHash<int, Activity*> Act;
static QHash<int, Service*> Services;
static QHash<int, Traffic*> Traffics;
static QHash<int, Path*> Paths;
static QHash<QString, QVector<int>> route;
ActLib();
virtual ~ActLib();
static int GetAct(QString path, QString name);
static int AddAct(QString path, QString name, bool nowe = false);
static int AddService(QString path, QString name, bool nowe = false);
static int AddTraffic(QString path, QString name, bool nowe = false);
static Service* GetServiceByName(QString name);
static Traffic* GetTrafficByName(QString name);
static Path* GetPathByName(QString name);
static bool IsServiceInUse(QString n);
static bool IsTrafficInUse(QString n);
static QVector<QString> GetServiceInUseList(QString n);
static int AddPath(QString path, QString name);
static int LoadAllAct(QString gameRoot);
static void GetUnsavedInfo(QVector<QString> &items);
static void UpdateServiceChanges(QString serviceNameId);
static void SaveAll();
private:
};
#endif /* ACTLIB_H */