mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-24 01:14:12 +08:00
26 lines
495 B
C++
26 lines
495 B
C++
#pragma once
|
|
|
|
#include "common.h"
|
|
|
|
struct InfoForExtension
|
|
{
|
|
const char* name;
|
|
int64_t value;
|
|
};
|
|
|
|
struct SentenceInfo
|
|
{
|
|
const InfoForExtension* infoArray;
|
|
// nullptr marks end of info array
|
|
int64_t operator[](std::string propertyName)
|
|
{
|
|
for (auto info = infoArray; info->name != nullptr; ++info) if (propertyName == info->name) return info->value;
|
|
throw;
|
|
}
|
|
|
|
inline static InfoForExtension DUMMY[2] = { { "text number", 1 } };
|
|
};
|
|
|
|
struct SKIP {};
|
|
inline void Skip() { throw SKIP(); }
|