Textractor_test/GUI/extensions.h
2018-10-17 01:08:31 -04:00

28 lines
625 B
C++

#ifndef EXTENSIONS_H
#define EXTENSIONS_H
#include "qtcommon.h"
#include <set>
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; }
};
std::set<Extension> LoadExtensions();
bool DispatchSentenceToExtensions(std::wstring& sentence, std::unordered_map<std::string, int64_t> miscInfo);
void UnloadExtension(int extenNumber);
#endif // EXTENSIONS_H