2020-08-11 20:47:04 -06:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2020-08-11 15:51:17 -06:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "DataIdentity.h"
|
|
|
|
|
|
|
|
namespace DFHack {
|
|
|
|
|
|
|
|
// xlsxreader definitions
|
2020-08-11 18:06:28 -06:00
|
|
|
struct DFHACK_EXPORT xlsx_file_handle_identity : public compound_identity {
|
2020-08-11 15:51:17 -06:00
|
|
|
xlsx_file_handle_identity()
|
|
|
|
:compound_identity(0, nullptr, nullptr, "xlsx_file_handle") {};
|
|
|
|
DFHack::identity_type type() override { return IDTYPE_OPAQUE; }
|
|
|
|
};
|
|
|
|
|
2020-08-11 18:06:28 -06:00
|
|
|
struct DFHACK_EXPORT xlsx_sheet_handle_identity : public compound_identity {
|
2020-08-11 15:51:17 -06:00
|
|
|
xlsx_sheet_handle_identity()
|
|
|
|
:compound_identity(0, nullptr, nullptr, "xlsx_sheet_handle") {};
|
|
|
|
DFHack::identity_type type() override { return IDTYPE_OPAQUE; }
|
|
|
|
};
|
|
|
|
|
2020-08-11 18:06:28 -06:00
|
|
|
struct DFHACK_EXPORT xlsx_file_handle {
|
2020-08-11 15:51:17 -06:00
|
|
|
typedef struct xlsxio_read_struct* xlsxioreader;
|
|
|
|
const xlsxioreader handle;
|
|
|
|
xlsx_file_handle(xlsxioreader handle): handle(handle) {}
|
2020-08-11 18:06:28 -06:00
|
|
|
static xlsx_file_handle_identity _identity;
|
2020-08-11 15:51:17 -06:00
|
|
|
};
|
|
|
|
|
2020-08-11 18:06:28 -06:00
|
|
|
struct DFHACK_EXPORT xlsx_sheet_handle {
|
2020-08-11 15:51:17 -06:00
|
|
|
typedef struct xlsxio_read_sheet_struct* xlsxioreadersheet;
|
|
|
|
const xlsxioreadersheet handle;
|
|
|
|
xlsx_sheet_handle(xlsxioreadersheet handle): handle(handle) {}
|
2020-08-11 18:06:28 -06:00
|
|
|
static xlsx_sheet_handle_identity _identity;
|
2020-08-11 15:51:17 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|