1 /****************************************************************************** 2 * 3 * thmlhtml.h - Implementation of ThMLHTML 4 * 5 * $Id: thmlhtml.h 3548 2017-12-10 05:11:38Z scribe $ 6 * 7 * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org) 8 * CrossWire Bible Society 9 * P. O. Box 2528 10 * Tempe, AZ 85280-2528 11 * 12 * This program is free software; you can redistribute it and/or modify it 13 * under the terms of the GNU General Public License as published by the 14 * Free Software Foundation version 2. 15 * 16 * This program is distributed in the hope that it will be useful, but 17 * WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 * General Public License for more details. 20 * 21 */ 22 23 #ifndef THMLHTML_H 24 #define THMLHTML_H 25 26 #include <swbasicfilter.h> 27 28 SWORD_NAMESPACE_START 29 30 /** this filter converts ThML text to HTML text 31 */ 32 class SWDLLEXPORT ThMLHTML : public SWBasicFilter { 33 protected: 34 class MyUserData : public BasicFilterUserData { 35 public: MyUserData(const SWModule * module,const SWKey * key)36 MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key), inSecHead(false) {} 37 bool inSecHead; 38 }; createUserData(const SWModule * module,const SWKey * key)39 virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) { 40 return new MyUserData(module, key); 41 } 42 virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData); 43 public: 44 ThMLHTML(); 45 }; 46 47 SWORD_NAMESPACE_END 48 #endif 49