2018-10-11 14:29:11 -04:00
|
|
|
#pragma once
|
|
|
|
|
2018-11-04 21:19:00 -05:00
|
|
|
#include "common.h"
|
2018-10-11 14:29:11 -04:00
|
|
|
|
|
|
|
struct InfoForExtension
|
|
|
|
{
|
|
|
|
const char* name;
|
|
|
|
int64_t value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SentenceInfo
|
|
|
|
{
|
2019-02-09 00:30:38 -05:00
|
|
|
const InfoForExtension* infoArray;
|
|
|
|
// nullptr marks end of info array
|
2018-10-11 14:29:11 -04:00
|
|
|
int64_t operator[](std::string propertyName)
|
|
|
|
{
|
2019-02-09 00:30:38 -05:00
|
|
|
for (auto info = infoArray; info->name != nullptr; ++info) if (propertyName == info->name) return info->value;
|
2018-10-11 14:29:11 -04:00
|
|
|
throw;
|
|
|
|
}
|
2019-02-10 21:46:39 -05:00
|
|
|
|
|
|
|
inline static InfoForExtension DUMMY[2] = { { "hook address", 0 } };
|
2018-10-11 14:29:11 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SKIP {};
|
|
|
|
inline void Skip() { throw SKIP(); }
|