latexgenerator.h

00001 /***************************************************************************
00002                           latexgenerator.h  -  description
00003                              -------------------
00004     begin                : Mit Jul 24 2002
00005     copyright            : (C) 2002 by André Simon
00006     email                : andre.simon1@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef LATEXGENERATOR_H
00019 #define LATEXGENERATOR_H
00020 
00021 #include <string>
00022 #include <iostream>
00023 #include <sstream>
00024 
00025 #include "codegenerator.h"
00026 #include "version.h"
00027 #include "charcodes.h"
00028 
00029 
00030 namespace highlight {
00031 
00042 class LatexGenerator : public highlight::CodeGenerator
00043   {
00044   public:
00045     LatexGenerator();
00046     ~LatexGenerator();
00047 
00051     string getHeader(const string & title);
00052 
00054     string getFooter();
00055 
00057     void printBody();
00058 
00062     void setReplaceQuotes(bool b){ replaceQuotes = b; }
00063 
00067     void setDisableShorthands(bool b){ disableBabelShortHand = b; }
00068 
00069   private:
00070 
00071      string styleDefinitionCache;
00072      string longLineTag;
00073 
00075     virtual string maskCharacter(unsigned char );
00076 
00078     string formatStyleAttributes(const string & elemName,
00079                                  const ElementStyle & elem);
00080 
00082     bool replaceQuotes;
00083 
00085     bool disableBabelShortHand;
00086 
00087     string getNewLine();
00088 
00089     string getStyleDefinition();
00090 
00091     string getMatchingOpenTag(unsigned int styleID);
00092     string getMatchingCloseTag(unsigned int styleID);
00093   };
00094 
00095 }
00096 
00097 #endif

Generated on Fri Apr 27 13:12:36 2007 for Highlight Code Converter by  doxygen 1.5.2