using namespace EBook;
Epub::Epub(std::string path, std::unique_ptr<IRunnable> runner)
- : runner(std::move(runner))
+ : _runner(std::move(runner))
{
if (path.empty()) {
LOGE("invalid path");
{
for (xmlNodePtr cur = node; cur; cur = cur->next) {
if (cur->type == XML_TEXT_NODE &&
- runner->run(reinterpret_cast<char*>(cur->content)))
+ _runner->run(reinterpret_cast<char*>(cur->content)))
return true;
if (htmlNodeFindRecursive(cur->children))
{
for (xmlNodePtr cur = node; cur; cur = cur->next) {
if (cur->type == XML_TEXT_NODE)
- runner->run(reinterpret_cast<char*>(cur->content));
+ _runner->run(reinterpret_cast<char*>(cur->content));
htmlNodeInsertRecursive(cur->children);
}
void htmlNodeInsertRecursive(xmlNodePtr node);
zip_t* z {};
- std::unique_ptr<IRunnable> runner {};
+ std::unique_ptr<IRunnable> _runner {};
};
}
using namespace EBook;
Pdf::Pdf(std::string path, std::unique_ptr<IRunnable> runner)
- : runner(std::move(runner))
+ : _runner(std::move(runner))
{
if (path.empty()) {
LOGE("invalid path");
return false;
for (int n = 0; n < pdf.GetPageCount(); ++n)
- if (runner->run(parseTextFromPage(n)))
+ if (_runner->run(parseTextFromPage(n)))
return true;
return false;
return;
for (int n = 0; n < pdf.GetPageCount(); ++n)
- runner->run(parseTextFromPage(n));
+ _runner->run(parseTextFromPage(n));
}
std::string Pdf::parseTextFromPage(unsigned int index)
bool loaded {};
PoDoFo::PdfMemDocument pdf {};
- std::unique_ptr<IRunnable> runner {};
+ std::unique_ptr<IRunnable> _runner {};
};
}
if (text.empty())
return false;
- std::regex re(keyword, std::regex::icase);
+ std::regex re(_keyword, std::regex::icase);
if (std::regex_search(text, re)) {
- LOGD("Found [%s]", keyword.c_str());
+ LOGD("Found [%s]", _keyword.c_str());
return true;
}
{
public:
explicit RegMatch(const char *keyword)
- : keyword(keyword) { }
+ : _keyword(keyword) { }
~RegMatch() override = default;
bool run(const std::string& text) override;
private:
- std::string keyword {};
+ std::string _keyword {};
};
#endif
\ No newline at end of file