00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef ANSIGENERATOR_H
00019 #define ANSIGENERATOR_H
00020
00021 #include <iostream>
00022 #include <fstream>
00023 #include <string>
00024 #include <sstream>
00025
00026 #include "codegenerator.h"
00027 #include "charcodes.h"
00028 #include "version.h"
00029
00030 namespace highlight {
00031
00042 class AnsiGenerator : public highlight::CodeGenerator
00043 {
00044 public:
00045 AnsiGenerator();
00046 ~AnsiGenerator();
00047
00051 string getHeader(const string & title);
00052
00054 string getFooter();
00055
00057 void printBody();
00058
00059 private:
00060
00062 virtual string maskCharacter(unsigned char );
00063
00064
00066 string getOpenTag(const string&font,
00067 const string&fgCol, const string&bgCol="");
00068
00069
00070
00071 string getMatchingOpenTag(unsigned int styleID);
00072 string getMatchingCloseTag(unsigned int styleID);
00073 };
00074
00075 }
00076 #endif