[DEV] coding style review
This commit is contained in:
@@ -16,20 +16,16 @@
|
||||
#define __class__ "Highlight"
|
||||
|
||||
|
||||
void Highlight::ParseRules(exml::Element* child, etk::Vector<HighlightPattern*> &mListPatern, int32_t level)
|
||||
{
|
||||
void Highlight::parseRules(exml::Element* _child, etk::Vector<HighlightPattern*>& _mListPatern, int32_t _level) {
|
||||
// Create the patern ...
|
||||
HighlightPattern *myPattern = new HighlightPattern();
|
||||
// parse under Element
|
||||
myPattern->ParseRules(child, level);
|
||||
myPattern->parseRules(_child, _level);
|
||||
// add element in the list
|
||||
mListPatern.pushBack(myPattern);
|
||||
_mListPatern.pushBack(myPattern);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Highlight::Highlight(const etk::UString& _xmlFilename)
|
||||
{
|
||||
Highlight::Highlight(const etk::UString& _xmlFilename) {
|
||||
exml::Document doc;
|
||||
if (doc.load(_xmlFilename) == false) {
|
||||
APPL_ERROR(" can not load file XML : " << _xmlFilename);
|
||||
@@ -63,10 +59,10 @@ Highlight::Highlight(const etk::UString& _xmlFilename)
|
||||
continue;
|
||||
}
|
||||
if (passChild->getValue() != "rule") {
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->GetValue() << "\" must be [rule]" );
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->getValue() << "\" must be [rule]" );
|
||||
continue;
|
||||
}
|
||||
ParseRules(passChild, m_listHighlightPass1, level1++);
|
||||
parseRules(passChild, m_listHighlightPass1, level1++);
|
||||
}
|
||||
} else if (child->getValue() == "pass2") {
|
||||
// get sub Nodes ...
|
||||
@@ -76,19 +72,18 @@ Highlight::Highlight(const etk::UString& _xmlFilename)
|
||||
continue;
|
||||
}
|
||||
if (passChild->getValue() != "rule") {
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->GetValue() << "\" must be [rule]" );
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->getValue() << "\" must be [rule]" );
|
||||
continue;
|
||||
}
|
||||
ParseRules(passChild, m_listHighlightPass2, level2++);
|
||||
parseRules(passChild, m_listHighlightPass2, level2++);
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR("(l "<< child->getPos() << ") node not suported : \""<< child->GetValue() << "\" must be [ext,pass1,pass2]" );
|
||||
APPL_ERROR("(l "<< child->getPos() << ") node not suported : \""<< child->getValue() << "\" must be [ext,pass1,pass2]" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Highlight::~Highlight(void)
|
||||
{
|
||||
Highlight::~Highlight(void) {
|
||||
int32_t i;
|
||||
// clean all Element
|
||||
for (i=0; i< m_listHighlightPass1.size(); i++) {
|
||||
@@ -103,23 +98,21 @@ Highlight::~Highlight(void)
|
||||
m_listExtentions.clear();
|
||||
}
|
||||
|
||||
void Highlight::ReloadColor(void)
|
||||
{
|
||||
void Highlight::reloadColor(void) {
|
||||
int32_t i;
|
||||
for (i=0; i< m_listHighlightPass1.size(); i++) {
|
||||
if (NULL != m_listHighlightPass1[i]) {
|
||||
m_listHighlightPass1[i]->ReloadColor();
|
||||
m_listHighlightPass1[i]->reloadColor();
|
||||
}
|
||||
}
|
||||
for (i=0; i< m_listHighlightPass2.size(); i++) {
|
||||
if (NULL != m_listHighlightPass2[i]) {
|
||||
m_listHighlightPass2[i]->ReloadColor();
|
||||
m_listHighlightPass2[i]->reloadColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool Highlight::hasExtention(const etk::UString& _ext)
|
||||
{
|
||||
bool Highlight::hasExtention(const etk::UString& _ext) {
|
||||
for (int32_t iii=0; iii<m_listExtentions.size(); iii++) {
|
||||
if (_ext == m_listExtentions[iii] ) {
|
||||
return true;
|
||||
@@ -128,8 +121,7 @@ bool Highlight::hasExtention(const etk::UString& _ext)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Highlight::fileNameCompatible(etk::FSNode &_fileName)
|
||||
{
|
||||
bool Highlight::fileNameCompatible(etk::FSNode &_fileName) {
|
||||
etk::UString extention;
|
||||
if (true == _fileName.fileHasExtention() ) {
|
||||
extention = "*.";
|
||||
@@ -148,8 +140,7 @@ bool Highlight::fileNameCompatible(etk::FSNode &_fileName)
|
||||
}
|
||||
|
||||
|
||||
void Highlight::display(void)
|
||||
{
|
||||
void Highlight::display(void) {
|
||||
APPL_INFO("List of ALL Highlight : ");
|
||||
for (int32_t iii=0; iii< m_listExtentions.size(); iii++) {
|
||||
APPL_INFO(" Extention : " << iii << " : " << m_listExtentions[iii] );
|
||||
@@ -169,12 +160,11 @@ void Highlight::display(void)
|
||||
|
||||
|
||||
// TODO : Celui qui appelle suprime des element pour rien ... Enfin c'est pas tr<74>grave... Il suffirait juste de suprimer celuis d'avant si il n'est pas terminer...
|
||||
void Highlight::Parse(int32_t start,
|
||||
void Highlight::parse(int32_t start,
|
||||
int32_t stop,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
int32_t addingPos,
|
||||
etk::Buffer &buffer)
|
||||
{
|
||||
etk::Buffer &buffer) {
|
||||
if (0 > addingPos) {
|
||||
addingPos = 0;
|
||||
}
|
||||
@@ -198,7 +188,7 @@ void Highlight::Parse(int32_t start,
|
||||
if (metaData[kkk].beginStart <= resultat.endStop) {
|
||||
// remove element
|
||||
//APPL_INFO("Erase element=" << kkk);
|
||||
metaData.EraseLen(kkk, kkk+1);
|
||||
metaData.eraseLen(kkk, kkk+1);
|
||||
// Increase the end of search
|
||||
if (kkk < metaData.size()) {
|
||||
// just befor the end of the next element
|
||||
@@ -233,11 +223,10 @@ void Highlight::Parse(int32_t start,
|
||||
* @brief second pass of the hightlight
|
||||
*
|
||||
*/
|
||||
void Highlight::Parse2(int32_t start,
|
||||
void Highlight::parse2(int32_t start,
|
||||
int32_t stop,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
etk::Buffer &buffer)
|
||||
{
|
||||
etk::Buffer &buffer) {
|
||||
//APPL_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() << " == > position search: (" << start << "," << stop << ")" );
|
||||
int32_t elementStart = start;
|
||||
int32_t elementStop = stop;
|
||||
|
@@ -14,14 +14,13 @@ class Highlight;
|
||||
class HighlightPattern;
|
||||
|
||||
extern "C" {
|
||||
typedef struct
|
||||
{
|
||||
int32_t beginStart;
|
||||
int32_t beginStop;
|
||||
int32_t endStart;
|
||||
int32_t endStop;
|
||||
bool notEnded;
|
||||
HighlightPattern * patern; // pointer on class :
|
||||
typedef struct {
|
||||
int32_t beginStart;
|
||||
int32_t beginStop;
|
||||
int32_t endStart;
|
||||
int32_t endStop;
|
||||
bool notEnded;
|
||||
HighlightPattern* patern; // pointer on class :
|
||||
} colorInformation_ts;
|
||||
}
|
||||
|
||||
@@ -39,18 +38,18 @@ class Highlight {
|
||||
bool hasExtention(const etk::UString& _ext);
|
||||
bool fileNameCompatible(etk::FSNode &_fileName);
|
||||
void display(void);
|
||||
void ReloadColor(void);
|
||||
void Parse(int32_t start,
|
||||
void reloadColor(void);
|
||||
void parse(int32_t start,
|
||||
int32_t stop,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
int32_t addingPos,
|
||||
etk::Buffer &buffer);
|
||||
void Parse2(int32_t start,
|
||||
void parse2(int32_t start,
|
||||
int32_t stop,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
etk::Buffer &buffer);
|
||||
private:
|
||||
void ParseRules(exml::Element* child, etk::Vector<HighlightPattern*> &mListPatern, int32_t level);
|
||||
void parseRules(exml::Element* child, etk::Vector<HighlightPattern*> &mListPatern, int32_t level);
|
||||
etk::UString m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
|
||||
etk::Vector<etk::UString> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
||||
etk::Vector<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 == > when we load and wride data on the buffer)
|
||||
|
@@ -13,12 +13,11 @@
|
||||
#include <ewol/renderer/EObjectManager.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "HighlightManager"
|
||||
#define __class__ "HighlightManager"
|
||||
|
||||
class localClassHighlightManager: public ewol::EObject
|
||||
{
|
||||
class localClassHighlightManager: public ewol::EObject {
|
||||
private:
|
||||
etk::Vector<Highlight*> listHighlight; //!< List of ALL hightlight modules
|
||||
etk::Vector<Highlight*> listHighlight; //!< List of ALL hightlight modules
|
||||
public:
|
||||
// Constructeur
|
||||
localClassHighlightManager(void) {
|
||||
@@ -38,14 +37,12 @@ class localClassHighlightManager: public ewol::EObject
|
||||
};
|
||||
|
||||
// herited function
|
||||
const char * const getObjectType(void)
|
||||
{
|
||||
const char * const getObjectType(void) {
|
||||
return "ApplHighlightManager";
|
||||
}
|
||||
|
||||
// herited function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg)
|
||||
{
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
@@ -61,31 +58,27 @@ class localClassHighlightManager: public ewol::EObject
|
||||
*/
|
||||
}
|
||||
|
||||
Highlight* get(etk::FSNode &fileName)
|
||||
{
|
||||
Highlight* get(etk::FSNode& _fileName) {
|
||||
int32_t i;
|
||||
for (i=0; i<listHighlight.size(); i++) {
|
||||
if (true == listHighlight[i]->fileNameCompatible(fileName) ) {
|
||||
for (i=0; i<listHighlight.size(); ++i) {
|
||||
if (true == listHighlight[i]->fileNameCompatible(_fileName) ) {
|
||||
return listHighlight[i];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool Exist(etk::FSNode &fileName)
|
||||
{
|
||||
if (NULL != get(fileName) ) {
|
||||
bool exist(etk::FSNode& _fileName) {
|
||||
if (NULL != get(_fileName) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void loadLanguages(void)
|
||||
{
|
||||
void loadLanguages(void) {
|
||||
etk::FSNode myFile("DATA:languages/");
|
||||
// get the subfolder list :
|
||||
etk::Vector<etk::FSNode *> list = myFile.FolderGetSubList(false, true, false,false);
|
||||
etk::Vector<etk::FSNode *> list = myFile.folderGetSubList(false, true, false,false);
|
||||
for ( int32_t iii=0 ; iii<list.size() ; iii++ ) {
|
||||
if (NULL!=list[iii]) {
|
||||
if (list[iii]->getNodeType() == etk::FSN_FOLDER) {
|
||||
@@ -98,15 +91,12 @@ class localClassHighlightManager: public ewol::EObject
|
||||
}
|
||||
//myHightline->display();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
static localClassHighlightManager * localManager = NULL;
|
||||
|
||||
|
||||
|
||||
void HighlightManager::init(void)
|
||||
{
|
||||
void HighlightManager::init(void) {
|
||||
if (NULL != localManager) {
|
||||
APPL_ERROR("HighlightManager == > already exist, just unlink the previous ...");
|
||||
localManager = NULL;
|
||||
@@ -118,8 +108,7 @@ void HighlightManager::init(void)
|
||||
}
|
||||
}
|
||||
|
||||
void HighlightManager::UnInit(void)
|
||||
{
|
||||
void HighlightManager::unInit(void) {
|
||||
if (NULL == localManager) {
|
||||
APPL_ERROR("HighlightManager == > request UnInit, but does not exist ...");
|
||||
return;
|
||||
@@ -128,28 +117,25 @@ void HighlightManager::UnInit(void)
|
||||
localManager = NULL;
|
||||
}
|
||||
|
||||
void HighlightManager::loadLanguages(void)
|
||||
{
|
||||
void HighlightManager::loadLanguages(void) {
|
||||
if (NULL == localManager) {
|
||||
return;
|
||||
}
|
||||
localManager->loadLanguages();
|
||||
}
|
||||
|
||||
Highlight* HighlightManager::get(etk::FSNode &fileName)
|
||||
{
|
||||
Highlight* HighlightManager::get(etk::FSNode& _fileName) {
|
||||
if (NULL == localManager) {
|
||||
return NULL;
|
||||
}
|
||||
return localManager->get(fileName);
|
||||
return localManager->get(_fileName);
|
||||
}
|
||||
|
||||
bool HighlightManager::Exist(etk::FSNode &fileName)
|
||||
{
|
||||
bool HighlightManager::exist(etk::FSNode& _fileName) {
|
||||
if (NULL == localManager) {
|
||||
return false;
|
||||
}
|
||||
return localManager->Exist(fileName);
|
||||
return localManager->exist(_fileName);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -16,11 +16,11 @@
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
||||
namespace HighlightManager{
|
||||
void init(void);
|
||||
void UnInit(void);
|
||||
void loadLanguages(void);
|
||||
void init(void);
|
||||
void unInit(void);
|
||||
void loadLanguages(void);
|
||||
Highlight* get(etk::FSNode &fileName);
|
||||
bool Exist(etk::FSNode &fileName);
|
||||
bool exist(etk::FSNode &fileName);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -11,14 +11,10 @@
|
||||
#include <HighlightPattern.h>
|
||||
#include <ColorizeManager.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "HighlightPattern"
|
||||
#define __class__ "HighlightPattern"
|
||||
|
||||
|
||||
|
||||
HighlightPattern::HighlightPattern(void)
|
||||
{
|
||||
HighlightPattern::HighlightPattern(void) {
|
||||
m_haveStopPatern = false;
|
||||
m_multiline = false;
|
||||
m_color = ColorizeManager::get("normal");
|
||||
@@ -27,64 +23,46 @@ HighlightPattern::HighlightPattern(void)
|
||||
m_escapeChar = 0;
|
||||
}
|
||||
|
||||
HighlightPattern::~HighlightPattern(void)
|
||||
{
|
||||
HighlightPattern::~HighlightPattern(void) {
|
||||
delete(m_regExpStart);
|
||||
delete(m_regExpStop);
|
||||
}
|
||||
|
||||
void HighlightPattern::setPaternStart(etk::UString ®Exp)
|
||||
{
|
||||
m_regExpStart->setRegExp(regExp);
|
||||
void HighlightPattern::setPaternStart(etk::UString& _regExp) {
|
||||
m_regExpStart->setRegExp(_regExp);
|
||||
}
|
||||
|
||||
void HighlightPattern::setPaternStop(etk::UString ®Exp)
|
||||
{
|
||||
if (regExp.size() != 0) {
|
||||
m_regExpStop->setRegExp(regExp);
|
||||
void HighlightPattern::setPaternStop(etk::UString& _regExp) {
|
||||
if (_regExp.size() != 0) {
|
||||
m_regExpStop->setRegExp(_regExp);
|
||||
m_haveStopPatern = true;
|
||||
} else {
|
||||
m_haveStopPatern = false;
|
||||
}
|
||||
}
|
||||
|
||||
void HighlightPattern::setEscapeChar(etk::UString &EscapeChar)
|
||||
{
|
||||
if (EscapeChar.size()>0) {
|
||||
m_escapeChar = EscapeChar[0];
|
||||
void HighlightPattern::setEscapeChar(etk::UString& _EscapeChar) {
|
||||
if (_EscapeChar.size()>0) {
|
||||
m_escapeChar = _EscapeChar[0];
|
||||
} else {
|
||||
m_escapeChar = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HighlightPattern::setColor(etk::UString &colorName)
|
||||
{
|
||||
m_colorName = colorName;
|
||||
void HighlightPattern::setColor(etk::UString& _colorName) {
|
||||
m_colorName = _colorName;
|
||||
m_color = ColorizeManager::get(m_colorName);
|
||||
}
|
||||
|
||||
bool HighlightPattern::isEnable(void)
|
||||
{
|
||||
bool HighlightPattern::isEnable(void) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void HighlightPattern::ReloadColor(void)
|
||||
{
|
||||
void HighlightPattern::reloadColor(void) {
|
||||
m_color = ColorizeManager::get(m_colorName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @eturn
|
||||
*
|
||||
*/
|
||||
void HighlightPattern::display(void)
|
||||
{
|
||||
void HighlightPattern::display(void) {
|
||||
/*
|
||||
APPL_INFO("patern : \"" << m_paternName << "\" level=" << m_level );
|
||||
APPL_INFO(" == > colorName \"" << m_colorName << "\"");
|
||||
@@ -107,8 +85,8 @@ void HighlightPattern::display(void)
|
||||
m_subPatern[i]->display();
|
||||
}
|
||||
}
|
||||
void HighlightPattern::ParseRules(exml::Element *child, int32_t level)
|
||||
{
|
||||
|
||||
void HighlightPattern::parseRules(exml::Element *child, int32_t level) {
|
||||
//--------------------------------------------------------------------------------------------
|
||||
/*
|
||||
<rule name="my preprocesseur">
|
||||
@@ -191,8 +169,7 @@ void HighlightPattern::ParseRules(exml::Element *child, int32_t level)
|
||||
* @return HLP_FIND_OK_NO_END Xe find a partial pattern (missing end)
|
||||
* @return HLP_FIND_ERROR Not find the pattern
|
||||
*/
|
||||
resultFind_te HighlightPattern::find(int32_t start, int32_t stop, colorInformation_ts &resultat, etk::Buffer &buffer)
|
||||
{
|
||||
resultFind_te HighlightPattern::find(int32_t start, int32_t stop, colorInformation_ts &resultat, etk::Buffer &buffer) {
|
||||
//APPL_DEBUG(" try to find the element");
|
||||
resultat.beginStart = -1;
|
||||
resultat.beginStop = -1;
|
||||
@@ -203,22 +180,22 @@ resultFind_te HighlightPattern::find(int32_t start, int32_t stop, colorInformati
|
||||
|
||||
// when we have only one element :
|
||||
if (false == m_haveStopPatern) {
|
||||
if (true == m_regExpStart->ProcessOneElement(buffer, start, stop)) {
|
||||
resultat.beginStart = m_regExpStart->Start();
|
||||
resultat.beginStop = m_regExpStart->Stop();
|
||||
resultat.endStart = m_regExpStart->Start();
|
||||
resultat.endStop = m_regExpStart->Stop();
|
||||
if (true == m_regExpStart->processOneElement(buffer, start, stop)) {
|
||||
resultat.beginStart = m_regExpStart->start();
|
||||
resultat.beginStop = m_regExpStart->stop();
|
||||
resultat.endStart = m_regExpStart->start();
|
||||
resultat.endStop = m_regExpStart->stop();
|
||||
return HLP_FIND_OK;
|
||||
}
|
||||
//APPL_DEBUG("NOT find hightlightpatern ...");
|
||||
} else {
|
||||
// try while we find the first element
|
||||
if (true == m_regExpStart->ProcessOneElement(buffer, start, stop, m_escapeChar)) {
|
||||
resultat.beginStart = m_regExpStart->Start();
|
||||
resultat.beginStop = m_regExpStart->Stop();
|
||||
if (true == m_regExpStop->Process(buffer, resultat.beginStop, stop, m_escapeChar)) {
|
||||
resultat.endStart = m_regExpStop->Start();
|
||||
resultat.endStop = m_regExpStop->Stop();
|
||||
if (true == m_regExpStart->processOneElement(buffer, start, stop, m_escapeChar)) {
|
||||
resultat.beginStart = m_regExpStart->start();
|
||||
resultat.beginStop = m_regExpStart->stop();
|
||||
if (true == m_regExpStop->process(buffer, resultat.beginStop, stop, m_escapeChar)) {
|
||||
resultat.endStart = m_regExpStop->start();
|
||||
resultat.endStop = m_regExpStop->stop();
|
||||
return HLP_FIND_OK;
|
||||
} else {
|
||||
resultat.endStart = stop+1;
|
||||
|
@@ -26,7 +26,6 @@ typedef enum {
|
||||
HLP_FIND_OK_NO_END,
|
||||
}resultFind_te;
|
||||
|
||||
class HighlightPattern;
|
||||
|
||||
class HighlightPattern {
|
||||
public:
|
||||
@@ -34,38 +33,50 @@ class HighlightPattern {
|
||||
HighlightPattern(void);
|
||||
~HighlightPattern(void);
|
||||
|
||||
void setName(etk::UString &name) { m_paternName = name;};
|
||||
etk::UString getName(void) { return m_paternName;};
|
||||
void setName(etk::UString& _name) {
|
||||
m_paternName = _name;
|
||||
};
|
||||
etk::UString getName(void) {
|
||||
return m_paternName;
|
||||
};
|
||||
|
||||
void setPaternStart(etk::UString ®Exp);
|
||||
void setPaternStop(etk::UString ®Exp);
|
||||
void setColor(etk::UString &colorName);
|
||||
void setEscapeChar(etk::UString &EscapeChar);
|
||||
void setMultiline(bool enable) { m_multiline = enable; };
|
||||
void setPaternStart(etk::UString& _regExp);
|
||||
void setPaternStop(etk::UString& _regExp);
|
||||
void setColor(etk::UString& _colorName);
|
||||
void setEscapeChar(etk::UString& _EscapeChar);
|
||||
void setMultiline(bool _enable) {
|
||||
m_multiline = _enable;
|
||||
};
|
||||
|
||||
void setLevel(int32_t newLevel) { m_level = newLevel; };
|
||||
int32_t getLevel(void) { return m_level; };
|
||||
void setLevel(int32_t _newLevel) {
|
||||
m_level = _newLevel;
|
||||
};
|
||||
int32_t getLevel(void) {
|
||||
return m_level;
|
||||
};
|
||||
|
||||
bool isEnable(void);
|
||||
void display(void);
|
||||
resultFind_te find(int32_t start, int32_t stop, colorInformation_ts &resultat, etk::Buffer &buffer);
|
||||
Colorize * getColor(void) { return m_color; };
|
||||
void ParseRules(exml::Element *child, int32_t level);
|
||||
bool isEnable(void);
|
||||
void display(void);
|
||||
resultFind_te find(int32_t _start, int32_t _stop, colorInformation_ts& _resultat, etk::Buffer& _buffer);
|
||||
Colorize* getColor(void) {
|
||||
return m_color;
|
||||
};
|
||||
void parseRules(exml::Element* _child, int32_t _level);
|
||||
|
||||
void ReloadColor(void);
|
||||
void reloadColor(void);
|
||||
|
||||
private:
|
||||
int32_t m_level; //!< Level of the pattern == > this is to overwrite next pattern when we create an higher ....
|
||||
etk::UString m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
|
||||
etk::UString m_colorName; //!< Current color name
|
||||
Colorize * m_color; //!< Link to the color manager
|
||||
etk::RegExp<etk::Buffer> * m_regExpStart; //!< Start of Regular expression
|
||||
etk::RegExp<etk::Buffer> * m_regExpStop; //!< Stop of Regular Expression
|
||||
bool m_haveStopPatern; //!< Stop patern presence
|
||||
bool m_multiline; //!< The patern is multiline
|
||||
etk::UniChar m_escapeChar; //!< Escape char to prevent exeit of patern ....
|
||||
etk::Vector<HighlightPattern *> m_subPatern; //!< Under patern of this one
|
||||
// etk::Vector<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 ....
|
||||
etk::UString m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
|
||||
etk::UString m_colorName; //!< Current color name
|
||||
Colorize* m_color; //!< Link to the color manager
|
||||
etk::RegExp<etk::Buffer>* m_regExpStart; //!< Start of Regular expression
|
||||
etk::RegExp<etk::Buffer>* m_regExpStop; //!< Stop of Regular Expression
|
||||
bool m_haveStopPatern; //!< Stop patern presence
|
||||
bool m_multiline; //!< The patern is multiline
|
||||
etk::UniChar m_escapeChar; //!< Escape char to prevent exeit of patern ....
|
||||
etk::Vector<HighlightPattern*> m_subPatern; //!< Under patern of this one
|
||||
// etk::Vector<HighlightPattern*> m_subColor; //!< Under Color in the start RegExp ...
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user