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-2026 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#ifdef __GNUC__
19#pragma GCC diagnostic push
20#pragma GCC diagnostic ignored "-Wextra-semi"
21#pragma GCC diagnostic ignored "-Wsuggest-override"
22#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
23#endif
24#ifdef __clang__
25#pragma clang diagnostic push
26#pragma clang diagnostic ignored "-Wsuggest-destructor-override"
27#endif
28#include <osishtmlhref.h>
29#include <swbuf.h>
30#include <swmodule.h>
31#ifdef __clang__
32#pragma clang diagnostic pop
33#endif
34#ifdef __GNUC__
35#pragma GCC diagnostic pop
36#endif
37
38
39namespace Filters {
40
41/**
42 \brief OSIS to HTMl conversion filter.
43*/
44class OsisToHtml: public sword::OSISHTMLHREF {
45 protected: // types:
47 public:
48 UserData(sword::SWModule const * module,
49 sword::SWKey const * key)
50 : sword::OSISHTMLHREF::MyUserData(module, key)
51 , swordFootnote(1)
52 , inCrossrefNote(false)
53 , entryAttributes(module->getEntryAttributes())
54 {}
55
56 unsigned short int swordFootnote;
58 sword::AttributeTypeList entryAttributes;
59
66 std::vector<NoteType> noteTypes;
67
68 struct {
69 sword::SWBuf who;
71 };
72
73 public: // methods:
74 OsisToHtml();
75
76 /** Reimplemented from sword::OSISHTMLHREF. */
77 bool handleToken(sword::SWBuf &buf,
78 const char *token,
79 sword::BasicFilterUserData *userData) override;
80
81 protected: // methods:
82 /** Reimplemented from sword::OSISHTMLHREF. */
83 sword::BasicFilterUserData * createUserData(
84 sword::SWModule const * module,
85 sword::SWKey const * key) override
86 { return new UserData(module, key); }
87
88};
89
90} // namespace Filters
unsigned short int swordFootnote
Definition osistohtml.h:56
sword::AttributeTypeList entryAttributes
Definition osistohtml.h:58
std::vector< NoteType > noteTypes
Definition osistohtml.h:66
struct Filters::OsisToHtml::UserData::@0 quote
UserData(sword::SWModule const *module, sword::SWKey const *key)
Definition osistohtml.h:48
OSIS to HTMl conversion filter.
Definition osistohtml.h:44
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:83