BibleTime
osistohtml.h
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2025 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
13#pragma once
14
15#include <vector>
16
17// Sword includes:
18#pragma GCC diagnostic push
19#pragma GCC diagnostic ignored "-Wextra-semi"
20#pragma GCC diagnostic ignored "-Wsuggest-override"
21#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
22#ifdef __clang__
23#pragma clang diagnostic push
24#pragma clang diagnostic ignored "-Wsuggest-destructor-override"
25#endif
26#include <osishtmlhref.h>
27#include <swbuf.h>
28#include <swmodule.h>
29#ifdef __clang__
30#pragma clang diagnostic pop
31#endif
32#pragma GCC diagnostic pop
33
34
35namespace Filters {
36
37/**
38 \brief OSIS to HTMl conversion filter.
39*/
40class OsisToHtml: public sword::OSISHTMLHREF {
41 protected: // types:
43 public:
44 UserData(sword::SWModule const * module,
45 sword::SWKey const * key)
46 : sword::OSISHTMLHREF::MyUserData(module, key)
47 , swordFootnote(1)
48 , inCrossrefNote(false)
49 , entryAttributes(module->getEntryAttributes())
50 {}
51
52 unsigned short int swordFootnote;
54 sword::AttributeTypeList entryAttributes;
55
62 std::vector<NoteType> noteTypes;
63
64 struct {
65 sword::SWBuf who;
67 };
68
69 public: // methods:
70 OsisToHtml();
71
72 /** Reimplemented from sword::OSISHTMLHREF. */
73 bool handleToken(sword::SWBuf &buf,
74 const char *token,
75 sword::BasicFilterUserData *userData) override;
76
77 protected: // methods:
78 /** Reimplemented from sword::OSISHTMLHREF. */
79 sword::BasicFilterUserData * createUserData(
80 sword::SWModule const * module,
81 sword::SWKey const * key) override
82 { return new UserData(module, key); }
83
84};
85
86} // namespace Filters
unsigned short int swordFootnote
Definition osistohtml.h:52
sword::AttributeTypeList entryAttributes
Definition osistohtml.h:54
std::vector< NoteType > noteTypes
Definition osistohtml.h:62
struct Filters::OsisToHtml::UserData::@0 quote
UserData(sword::SWModule const *module, sword::SWKey const *key)
Definition osistohtml.h:44
OSIS to HTMl conversion filter.
Definition osistohtml.h:40
bool handleToken(sword::SWBuf &buf, const char *token, sword::BasicFilterUserData *userData) override
sword::BasicFilterUserData * createUserData(sword::SWModule const *module, sword::SWKey const *key) override
Definition osistohtml.h:79