-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectLoader.h
66 lines (29 loc) · 786 Bytes
/
ProjectLoader.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
56
57
58
59
60
61
62
// ProjectLoader.h
// Declares the ProjectLoader class that can load a project's contents from a datastream
#ifndef PROJECTLOADER_H
#define PROJECTLOADER_H
#include <memory>
#include <stdexcept>
class QIODevice;
class Project;
typedef std::shared_ptr<Project> ProjectPtr;
class ProjectLoadException:
public std::runtime_error
{
typedef std::runtime_error Super;
public:
ProjectLoadException(const char * a_Reason):
Super(a_Reason)
{
}
};
class ProjectLoader
{
public:
/** Returns the new loaded project.
Throws on failure. */
static ProjectPtr loadProject(QIODevice & a_Device);
/** Returns whether the specified file is a VisualMassifDiff project file. */
static bool isProjectFile(QIODevice & a_IODevice);
};
#endif // PROJECTLOADER_H