forked from DFHack/dfhack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginStatics.h
More file actions
42 lines (33 loc) · 1.32 KB
/
Copy pathPluginStatics.h
File metadata and controls
42 lines (33 loc) · 1.32 KB
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
/*
* This file and the companion PluginStatics.cpp contain static structures used
* by DFHack plugins. Linking them here, into the dfhack library, instead of
* into the plugins themselves allows the plugins to be freely unloaded and
* reloaded without fear of causing cached references to static data becoming
* corrupted.
*/
#pragma once
#include <xlsxio_read.h>
#include "DataIdentity.h"
namespace DFHack {
// xlsxreader definitions
struct DFHACK_EXPORT xlsx_file_handle_identity : public compound_identity {
xlsx_file_handle_identity()
:compound_identity(0, nullptr, nullptr, "xlsx_file_handle") {};
DFHack::identity_type type() const override { return IDTYPE_OPAQUE; }
};
struct DFHACK_EXPORT xlsx_sheet_handle_identity : public compound_identity {
xlsx_sheet_handle_identity()
:compound_identity(0, nullptr, nullptr, "xlsx_sheet_handle") {};
DFHack::identity_type type() const override { return IDTYPE_OPAQUE; }
};
struct DFHACK_EXPORT xlsx_file_handle {
const xlsxioreader handle;
xlsx_file_handle(xlsxioreader handle): handle(handle) {}
static xlsx_file_handle_identity _identity;
};
struct DFHACK_EXPORT xlsx_sheet_handle {
const xlsxioreadersheet handle;
xlsx_sheet_handle(xlsxioreadersheet handle): handle(handle) {}
static xlsx_sheet_handle_identity _identity;
};
}