-
-
Notifications
You must be signed in to change notification settings - Fork 903
Expand file tree
/
Copy pathfile_open_status.h
More file actions
42 lines (32 loc) · 783 Bytes
/
file_open_status.h
File metadata and controls
42 lines (32 loc) · 783 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
36
37
38
39
40
41
42
#ifndef FILE_OPEN_STATUS_H
#define FILE_OPEN_STATUS_H
#include "ifc_parse_api.h"
namespace IfcParse {
class IFC_PARSE_API file_open_status {
public:
enum file_open_enum {
SUCCESS,
READ_ERROR,
NO_HEADER,
UNSUPPORTED_SCHEMA,
INVALID_SYNTAX,
UNKNOWN
};
private:
file_open_enum error_;
public:
file_open_status(file_open_enum error = UNKNOWN)
: error_(error) {
}
operator file_open_enum() const {
return error_;
}
file_open_enum value() const {
return error_;
}
operator bool() const {
return error_ == SUCCESS;
}
};
}
#endif // !FILE_OPEN_STATUS_H