Mise en place des RegExp en Template ==> OK

This commit is contained in:
2011-07-29 10:44:12 +02:00
parent f9418d665e
commit 45aad6b2e2
4 changed files with 149 additions and 143 deletions

View File

@@ -61,11 +61,11 @@ class Highlight {
void Parse2(int32_t start, int32_t stop, std::vector<colorInformation_ts> &metaData, EdnVectorBuf &buffer, int32_t elementID=0);
private:
void ParseRules(TiXmlNode *child, std::vector<HighlightPattern*> &mListPatern, int32_t level);
Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
std::vector<Edn::String> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
std::vector<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)
std::vector<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )
void ParseRules(TiXmlNode *child, std::vector<HighlightPattern*> &mListPatern, int32_t level);
Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
std::vector<Edn::String> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
std::vector<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)
std::vector<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )
};

View File

@@ -39,8 +39,8 @@ HighlightPattern::HighlightPattern(void)
m_multiline = false;
ColorizeManager *myColorManager = ColorizeManager::getInstance();
m_color = myColorManager->Get("normal");
m_regExpStart = new EdnRegExp();
m_regExpStop = new EdnRegExp();
m_regExpStart = new EdnRegExp<EdnVectorBuf>();
m_regExpStop = new EdnRegExp<EdnVectorBuf>();
m_escapeChar = 0;
}

View File

@@ -22,7 +22,9 @@
*
*******************************************************************************
*/
#include "Highlight.h"
#ifndef __HIGHLIGHT_PATTERN_H__
#define __HIGHLIGHT_PATTERN_H__
@@ -33,6 +35,7 @@ class HighlightPattern;
#include "Colorize.h"
#include "EdnVectorBin.h"
#include "tinyxml.h"
#include "EdnVectorBuf.h"
typedef enum {
HLP_FIND_ERROR,
@@ -67,17 +70,17 @@ class HighlightPattern {
void ParseRules(TiXmlNode *child, int32_t level);
private:
int32_t m_level; //!< Level of the pattern ==> this is to overwrite next pattern when we create an higher ....
Edn::String m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
Edn::String m_colorName; //!< Current color name
Colorize * m_color; //!< Link to the color manager
EdnRegExp * m_regExpStart; //!< Start of Regular expression
EdnRegExp * m_regExpStop; //!< Stop of Regular Expression
bool m_haveStopPatern; //!< Stop patern presence
bool m_multiline; //!< The patern is multiline
char m_escapeChar; //!< Escape char to prevent exeit of patern ....
EdnVectorBin<HighlightPattern *> m_subPatern; //!< Under patern of this one
// EdnVectorBin<HighlightPattern *> m_subColor; //!< Under Color in the start RegExp ...
int32_t m_level; //!< Level of the pattern ==> this is to overwrite next pattern when we create an higher ....
Edn::String m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
Edn::String m_colorName; //!< Current color name
Colorize * m_color; //!< Link to the color manager
EdnRegExp<EdnVectorBuf> * m_regExpStart; //!< Start of Regular expression
EdnRegExp<EdnVectorBuf> * m_regExpStop; //!< Stop of Regular Expression
bool m_haveStopPatern; //!< Stop patern presence
bool m_multiline; //!< The patern is multiline
char m_escapeChar; //!< Escape char to prevent exeit of patern ....
EdnVectorBin<HighlightPattern *> m_subPatern; //!< Under patern of this one
// EdnVectorBin<HighlightPattern *> m_subColor; //!< Under Color in the start RegExp ...
};
#endif