00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ANSIGENERATOR_H
00029 #define ANSIGENERATOR_H
00030
00031 #include <string>
00032
00033 #include "codegenerator.h"
00034 #include "charcodes.h"
00035 #include "version.h"
00036
00037 namespace highlight
00038 {
00039
00050 class AnsiGenerator : public highlight::CodeGenerator
00051 {
00052 public:
00053 AnsiGenerator();
00054 ~AnsiGenerator();
00055
00058 string getHeader();
00059
00061 string getFooter();
00062
00064 void printBody();
00065
00066 private:
00067
00069 virtual string maskCharacter ( unsigned char );
00070
00071
00073 string getOpenTag ( const string&font,
00074 const string&fgCol, const string&bgCol="" );
00075
00077 void initOutputTags();
00078
00081 string getKeywordOpenTag ( unsigned int styleID );
00082
00085 string getKeywordCloseTag ( unsigned int styleID );
00086 };
00087
00088 }
00089 #endif