Textractor/GUI/extensions.h

27 lines
586 B
C
Raw Normal View History

2018-07-26 22:42:21 -07:00
#ifndef EXTENSIONS_H
#define EXTENSIONS_H
2018-08-22 12:24:55 -04:00
#include "qtcommon.h"
#include <set>
2018-07-26 22:42:21 -07:00
2018-07-29 14:36:45 -07:00
struct InfoForExtension
{
const char* name;
int64_t value;
InfoForExtension* next;
~InfoForExtension() { if (next) delete next; };
};
struct Extension
{
int number;
QString name;
wchar_t*(*callback)(const wchar_t*, const InfoForExtension*);
bool operator<(const Extension& other) const { return number < other.number; }
2018-07-29 14:36:45 -07:00
};
std::set<Extension> LoadExtensions();
bool DispatchSentenceToExtensions(std::wstring& sentence, std::unordered_map<std::string, int64_t> miscInfo);
2018-07-26 22:42:21 -07:00
#endif // EXTENSIONS_H