"Fossies" - the Fresh Open Source Software Archive

Member "ansifilter-2.14/src/svggenerator.h" (3 Apr 2019, 2069 Bytes) of package /linux/privat/ansifilter-2.14.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "svggenerator.h" see the Fossies "Dox" file reference documentation.

    1 /***************************************************************************
    2                     SVGGenerator.h  -  description
    3                              -------------------
    4     begin                : Mo 23.06.2008
    5     copyright            : (C) 2019 by Andre Simon
    6     email                : a.simon@mailbox.org
    7  ***************************************************************************/
    8 
    9 
   10 /*
   11 This file is part of Highlight.
   12 
   13 Highlight is free software: you can redistribute it and/or modify
   14 it under the terms of the GNU General Public License as published by
   15 the Free Software Foundation, either version 3 of the License, or
   16 (at your option) any later version.
   17 
   18 Highlight is distributed in the hope that it will be useful,
   19 but WITHOUT ANY WARRANTY; without even the implied warranty of
   20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   21 GNU General Public License for more details.
   22 
   23 You should have received a copy of the GNU General Public License
   24 along with Highlight.  If not, see <http://www.gnu.org/licenses/>.
   25 */
   26 
   27 
   28 #ifndef SVGGenerator_H
   29 #define SVGGenerator_H
   30 
   31 #include "codegenerator.h"
   32 
   33 namespace ansifilter
   34 {
   35 
   36 /**
   37    \brief This class generates SVG.
   38 
   39    It contains information about the resulting document structure (document
   40    header and footer), the colour system, white space handling and text
   41    formatting attributes.
   42 
   43 * @author Andre Simon
   44 */
   45 
   46 class SVGGenerator : public ansifilter::CodeGenerator
   47 {
   48 public:
   49 
   50     SVGGenerator();
   51     ~SVGGenerator();
   52 
   53 protected:
   54 
   55     string fileSuffix;   ///< filename extension
   56 
   57     /** \return Comment with program information */
   58     string getGeneratorComment();
   59 
   60     void insertLineNumber ();
   61     
   62     bool printDynamicStyleFile ( const string &outPath );
   63 
   64 
   65 private:
   66     string getOpenTag();
   67     string getCloseTag();
   68 
   69     /** Print document header
   70     */
   71     string getHeader();
   72 
   73     /** Print document body*/
   74     void printBody();
   75 
   76     /** Print document footer*/
   77     string getFooter();
   78 
   79     /** \return escaped character*/
   80     virtual string maskCharacter(unsigned char );
   81     
   82 };
   83 
   84 }
   85 
   86 #endif