Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

gbfosis.h

00001 /***************************************************************************
00002  *
00003  * $Id: gbfosis_8h-source.html,v 1.1 2003/02/28 21:21:40 mgruner Exp $
00004  *
00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00006  *      CrossWire Bible Society
00007  *      P. O. Box 2528
00008  *      Tempe, AZ  85280-2528
00009  *
00010  * This program is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU General Public License as published by the
00012  * Free Software Foundation version 2.
00013  *
00014  * This program is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * General Public License for more details.
00018  *
00019  */
00020 
00021 #ifndef GBFOSIS_H
00022 #define GBFOSIS_H
00023 
00024 #include <swfilter.h>
00025 #include <string>
00026 #include <stack>
00027 
00028 using std::string;
00029 using std::stack;
00030 
00031 SWORD_NAMESPACE_START
00032 
00033 class QuoteStack {
00034 private:
00035         class QuoteInstance {
00036         public:
00037                 char startChar;
00038                 char level;
00039                 string uniqueID;
00040                 char continueCount;
00041                 QuoteInstance(char startChar = '\"', char level = 1, string uniqueID = "", char continueCount = 0) {
00042                         this->startChar     = startChar;
00043                         this->level         = level;
00044                         this->uniqueID      = uniqueID;
00045                         this->continueCount = continueCount;
00046                 }
00047                 void pushStartStream(SWBuf &text);
00048         };
00049 
00050         stack<QuoteInstance> quotes;
00051 public:
00052         QuoteStack();
00053         virtual ~QuoteStack();
00054         void handleQuote(char *buf, char *quotePos, SWBuf &text);
00055         void clear();
00056         bool empty() { return quotes.empty(); }
00057 };
00058 
00061 class SWDLLEXPORT GBFOSIS : public SWFilter {
00062 protected:
00063         virtual const char *convertToOSIS(const char *, const SWKey *key);
00064 public:
00065         GBFOSIS();
00066         virtual ~GBFOSIS();
00067         char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
00068 };
00069 
00070 SWORD_NAMESPACE_END
00071 #endif /* THMLOSIS_H */

Generated on Fri Feb 28 22:01:38 2003 for The Sword Project by doxygen1.3-rc3