-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathProjectReader.h
48 lines (33 loc) · 1.12 KB
/
ProjectReader.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
#pragma once
#include "Project.h"
#include "ProjectUtils.h"
namespace shapeworks {
//! Base class for Project readers
/*!
* This class serves as an abstract base class for project readers
*/
class ProjectReader {
public:
using StringMapList = project::types::StringMapList;
using StringMap = project::types::StringMap;
using StringList = project::types::StringList;
using StringMultiMap = project::types::StringMultiMap;
//! Constructor
ProjectReader(Project &project);
//! Destructor
virtual ~ProjectReader() = default;
//! Read a project from a file
virtual bool read_project(std::string filename) = 0;
virtual StringMap get_parameters(std::string name) = 0;
virtual StringMultiMap get_multi_parameters(std::string name) = 0;
protected:
//! Load subjects from string map list
void load_subjects(StringMapList list);
void load_parameters();
void load_parameter(std::string name, StringMap map);
void load_landmark_definitions(StringMapList list);
static StringList get_keys(StringMap map);
bool contains(StringMap map, std::string key);
Project &project_;
};
} // namespace shapeworks