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 BBCODEGENERATOR_H
00029 #define BBCODEGENERATOR_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 BBCodeGenerator : public highlight::CodeGenerator
00051 {
00052 public:
00053 BBCodeGenerator();
00054 ~BBCodeGenerator();
00055
00058 string getHeader();
00059
00061 string getFooter();
00062
00064 void printBody();
00065
00066 private:
00067
00069 virtual string maskCharacter ( unsigned char );
00070
00072 string getOpenTag (const ElementStyle & elem );
00073
00075 string getCloseTag ( const ElementStyle &elem );
00076
00078 void initOutputTags();
00079
00082 string getKeywordOpenTag ( unsigned int styleID );
00083
00086 string getKeywordCloseTag ( unsigned int styleID );
00087 };
00088
00089 }
00090 #endif