|
|
@ -24,6 +24,7 @@ distribution.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <condition_variable>
|
|
|
|
#include <deque>
|
|
|
|
#include <deque>
|
|
|
|
#include <map>
|
|
|
|
#include <map>
|
|
|
|
#include <mutex>
|
|
|
|
#include <mutex>
|
|
|
@ -542,6 +543,12 @@ namespace df
|
|
|
|
#define INTEGER_IDENTITY_TRAITS(type) NUMBER_IDENTITY_TRAITS(integer, type)
|
|
|
|
#define INTEGER_IDENTITY_TRAITS(type) NUMBER_IDENTITY_TRAITS(integer, type)
|
|
|
|
#define FLOAT_IDENTITY_TRAITS(type) NUMBER_IDENTITY_TRAITS(float, type)
|
|
|
|
#define FLOAT_IDENTITY_TRAITS(type) NUMBER_IDENTITY_TRAITS(float, type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define OPAQUE_IDENTITY_TRAITS(type) \
|
|
|
|
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<type> { \
|
|
|
|
|
|
|
|
static opaque_identity identity; \
|
|
|
|
|
|
|
|
static opaque_identity *get() { return &identity; } \
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
INTEGER_IDENTITY_TRAITS(char);
|
|
|
|
INTEGER_IDENTITY_TRAITS(char);
|
|
|
|
INTEGER_IDENTITY_TRAITS(signed char);
|
|
|
|
INTEGER_IDENTITY_TRAITS(signed char);
|
|
|
|
INTEGER_IDENTITY_TRAITS(unsigned char);
|
|
|
|
INTEGER_IDENTITY_TRAITS(unsigned char);
|
|
|
@ -555,6 +562,9 @@ namespace df
|
|
|
|
INTEGER_IDENTITY_TRAITS(unsigned long long);
|
|
|
|
INTEGER_IDENTITY_TRAITS(unsigned long long);
|
|
|
|
FLOAT_IDENTITY_TRAITS(float);
|
|
|
|
FLOAT_IDENTITY_TRAITS(float);
|
|
|
|
FLOAT_IDENTITY_TRAITS(double);
|
|
|
|
FLOAT_IDENTITY_TRAITS(double);
|
|
|
|
|
|
|
|
OPAQUE_IDENTITY_TRAITS(std::condition_variable);
|
|
|
|
|
|
|
|
OPAQUE_IDENTITY_TRAITS(std::fstream);
|
|
|
|
|
|
|
|
OPAQUE_IDENTITY_TRAITS(std::mutex);
|
|
|
|
|
|
|
|
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<bool> {
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<bool> {
|
|
|
|
static bool_identity identity;
|
|
|
|
static bool_identity identity;
|
|
|
@ -566,16 +576,6 @@ namespace df
|
|
|
|
static stl_string_identity *get() { return &identity; }
|
|
|
|
static stl_string_identity *get() { return &identity; }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<std::fstream> {
|
|
|
|
|
|
|
|
static opaque_identity identity;
|
|
|
|
|
|
|
|
static opaque_identity *get() { return &identity; }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<std::mutex> {
|
|
|
|
|
|
|
|
static opaque_identity identity;
|
|
|
|
|
|
|
|
static opaque_identity *get() { return &identity; }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<char*> {
|
|
|
|
template<> struct DFHACK_EXPORT identity_traits<char*> {
|
|
|
|
static ptr_string_identity identity;
|
|
|
|
static ptr_string_identity identity;
|
|
|
|
static ptr_string_identity *get() { return &identity; }
|
|
|
|
static ptr_string_identity *get() { return &identity; }
|
|
|
@ -604,6 +604,7 @@ namespace df
|
|
|
|
#undef NUMBER_IDENTITY_TRAITS
|
|
|
|
#undef NUMBER_IDENTITY_TRAITS
|
|
|
|
#undef INTEGER_IDENTITY_TRAITS
|
|
|
|
#undef INTEGER_IDENTITY_TRAITS
|
|
|
|
#undef FLOAT_IDENTITY_TRAITS
|
|
|
|
#undef FLOAT_IDENTITY_TRAITS
|
|
|
|
|
|
|
|
#undef OPAQUE_IDENTITY_TRAITS
|
|
|
|
|
|
|
|
|
|
|
|
// Container declarations
|
|
|
|
// Container declarations
|
|
|
|
|
|
|
|
|
|
|
|