Example-Extension/ExampleExtension/Extension.h

28 lines
523 B
C
Raw Normal View History

2018-10-08 13:37:56 +08:00
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <cstdint>
#include <string>
struct InfoForExtension
{
const char* name;
int64_t value;
InfoForExtension* next;
};
struct SentenceInfo
{
const InfoForExtension* list;
// Traverse linked list to find info.
int64_t operator[](std::string propertyName)
{
for (auto i = list; i != nullptr; i = i->next) if (propertyName == i->name) return i->value;
2018-10-12 03:23:59 +08:00
throw;
2018-10-08 13:37:56 +08:00
}
};
2018-10-12 03:23:59 +08:00
struct SKIP {};
inline void Skip() { throw SKIP(); }