diff --git a/Makefile b/Makefile index 597b5f1..2f3f263 100644 --- a/Makefile +++ b/Makefile @@ -159,9 +159,9 @@ CXXFILES+= tools/AL/AL_Mutex.cpp \ tools/MsgBroadcast/AccelKey.cpp \ tools/charset/charsetTable.cpp \ tools/charset/charset.cpp \ - tools/EdnRegExp/EdnRegExp.cpp \ tools/NameSpaceEdn/File.cpp \ - tools/NameSpaceEdn/String.cpp + tools/NameSpaceEdn/String.cpp \ + tools/NameSpaceEdn/RegExp.cpp # Gui: CXXFILES+= CustumWidget/BufferView/BufferView.cpp \ diff --git a/Sources/Buffer/BufferText.cpp b/Sources/Buffer/BufferText.cpp index a140407..945daf8 100644 --- a/Sources/Buffer/BufferText.cpp +++ b/Sources/Buffer/BufferText.cpp @@ -29,6 +29,7 @@ #include "BufferText.h" #include "toolsMemory.h" #include "Edn.h" +#include "RegExp.h" #undef __class__ #define __class__ "BufferText" @@ -1145,7 +1146,6 @@ void BufferText::AddChar(char * UTF8data) UpdateWindowsPosition(); } -#include "EdnRegExp.h" int32_t BufferText::FindLine(Edn::String &data) { diff --git a/Sources/Highlight/HighlightPattern.h b/Sources/Highlight/HighlightPattern.h index e60d11e..c32a11f 100644 --- a/Sources/Highlight/HighlightPattern.h +++ b/Sources/Highlight/HighlightPattern.h @@ -29,7 +29,7 @@ class HighlightPattern; #include "Edn.h" -#include "EdnRegExp.h" +#include "RegExp.h" #include "Colorize.h" #include "EdnVectorBin.h" #include "tinyxml.h" @@ -71,8 +71,8 @@ class HighlightPattern { 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 + 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 .... diff --git a/Sources/tools/NameSpaceEdn/Edn.h b/Sources/tools/NameSpaceEdn/Edn.h index 350cec9..54e3a17 100644 --- a/Sources/tools/NameSpaceEdn/Edn.h +++ b/Sources/tools/NameSpaceEdn/Edn.h @@ -28,17 +28,8 @@ #include "toolsMemory.h" #include "EdnVectorBin.h" -#ifndef __EDN_H__ -#define __EDN_H__ -#define _IN_NAMESPACE_EDN_ (plop) +#include "String.h" -namespace Edn -{ - #include "String.h" - #include "File.h" -} +#include "File.h" -#undef IN_NAMESPACE_EDN - -#endif diff --git a/Sources/tools/NameSpaceEdn/File.h b/Sources/tools/NameSpaceEdn/File.h index 596961a..2c804ea 100644 --- a/Sources/tools/NameSpaceEdn/File.h +++ b/Sources/tools/NameSpaceEdn/File.h @@ -23,31 +23,32 @@ ******************************************************************************* */ +#ifndef __EDN__FILE_H__ +#define __EDN__FILE_H__ -#ifndef _IN_NAMESPACE_EDN_ -# error This will be include only in "edn.h" -#else - -class File +namespace Edn { - public: - File(void) { m_lineNumberOpen=0; } - File(Edn::String &filename, int32_t LineNumber = 0); - File(Edn::String &filename, Edn::String &folder, int32_t lineNumber = 0); - ~File(void); - Edn::String GetFolder(void); - Edn::String GetShortFilename(void); - Edn::String GetCompleateName(void); - int32_t GetLineNumber(void); - - void SetCompleateName(Edn::String &newFilename); - - private : - void ExtranctAndName(Edn::String &inputString); - Edn::String m_folder; - Edn::String m_shortFilename; - int32_t m_lineNumberOpen; -}; + class File + { + public: + File(void) { m_lineNumberOpen=0; } + File(Edn::String &filename, int32_t LineNumber = 0); + File(Edn::String &filename, Edn::String &folder, int32_t lineNumber = 0); + ~File(void); + Edn::String GetFolder(void); + Edn::String GetShortFilename(void); + Edn::String GetCompleateName(void); + int32_t GetLineNumber(void); + + void SetCompleateName(Edn::String &newFilename); + + private : + void ExtranctAndName(Edn::String &inputString); + Edn::String m_folder; + Edn::String m_shortFilename; + int32_t m_lineNumberOpen; + }; +} #endif diff --git a/Sources/tools/EdnRegExp/EdnRegExp.cpp b/Sources/tools/NameSpaceEdn/RegExp.cpp similarity index 99% rename from Sources/tools/EdnRegExp/EdnRegExp.cpp rename to Sources/tools/NameSpaceEdn/RegExp.cpp index c550af0..31bf83f 100644 --- a/Sources/tools/EdnRegExp/EdnRegExp.cpp +++ b/Sources/tools/NameSpaceEdn/RegExp.cpp @@ -1,6 +1,6 @@ /** ******************************************************************************* - * @file EdnRegExp.cpp + * @file RegExp.cpp * @brief Editeur De N'ours : Regular expression annalyser (sources) * @author Edouard DUPIN * @date 04/04/2011 @@ -26,7 +26,7 @@ #include "tools_debug.h" #include "tools_globals.h" #include "toolsMemory.h" -#include "EdnRegExp.h" +#include "RegExp.h" // internal define to permit to have all neeed system diff --git a/Sources/tools/EdnRegExp/EdnRegExp.h b/Sources/tools/NameSpaceEdn/RegExp.h similarity index 99% rename from Sources/tools/EdnRegExp/EdnRegExp.h rename to Sources/tools/NameSpaceEdn/RegExp.h index 75d99d2..55d6c08 100644 --- a/Sources/tools/EdnRegExp/EdnRegExp.h +++ b/Sources/tools/NameSpaceEdn/RegExp.h @@ -1,6 +1,6 @@ /** ******************************************************************************* - * @file EdnRegExp.h + * @file RegExp.h * @brief Editeur De N'ours : Regular expression annalyser (header) * @author Edouard DUPIN * @date 04/04/2011 diff --git a/Sources/tools/NameSpaceEdn/String.h b/Sources/tools/NameSpaceEdn/String.h index 1740d07..7f659cc 100644 --- a/Sources/tools/NameSpaceEdn/String.h +++ b/Sources/tools/NameSpaceEdn/String.h @@ -22,11 +22,11 @@ * ******************************************************************************* */ +#ifndef __END__STRING_H__ +#define __END__STRING_H__ -#ifndef _IN_NAMESPACE_EDN_ -# error This will be include only in "edn.h" -#else - +namespace Edn +{ class String { public: @@ -77,6 +77,7 @@ }; void TestUntaire_String(void); +} #endif