diff --git a/Sources/Buffer/BufferText.cpp b/Sources/Buffer/BufferText.cpp index 945daf8..9619471 100644 --- a/Sources/Buffer/BufferText.cpp +++ b/Sources/Buffer/BufferText.cpp @@ -1047,7 +1047,7 @@ void BufferText::AddChar(char * UTF8data) if (1==size) { if (UTF8data[0] == 0x09) { if (false == haveSelectionActive) { - EdnVectorBin tmpVect; + Edn::VectorType tmpVect; tmpVect.PushBack(0x09); m_EdnBuf.Insert(m_cursorPos, tmpVect); SetInsertPosition(m_cursorPos+1, true); @@ -1060,7 +1060,7 @@ void BufferText::AddChar(char * UTF8data) } actionDone = true; } else if (UTF8data[0] == '\n') { - EdnVectorBin tmpVect; + Edn::VectorType tmpVect; tmpVect.PushBack('\n'); // if Auto indent Enable ==> we get the start of the previous line and add it to tne new one if (true == globals::IsSetAutoIndent() ) { @@ -1115,7 +1115,7 @@ void BufferText::AddChar(char * UTF8data) if (false == actionDone) { if (true == m_EdnBuf.GetUTF8Mode()) { - EdnVectorBin tmpVect; + Edn::VectorType tmpVect; int32_t localOfset = strlen(UTF8data); tmpVect.PushBack((int8_t*)UTF8data, localOfset); if (false == haveSelectionActive) { @@ -1130,7 +1130,7 @@ void BufferText::AddChar(char * UTF8data) char output_ISO; convertUtf8ToIso(m_EdnBuf.GetCharsetType(), UTF8data, output_ISO); //printf(" insert : \"%s\"==> 0x%08x=%d ", UTF8data, (unsigned int)output_ISO, (int)output_ISO); - EdnVectorBin tmpVect; + Edn::VectorType tmpVect; tmpVect.PushBack(output_ISO); if (false == haveSelectionActive) { m_EdnBuf.Insert(m_cursorPos, tmpVect); @@ -1154,7 +1154,7 @@ int32_t BufferText::FindLine(Edn::String &data) return 0; } EDN_INFO("Search data line : \"" << data.c_str() << "\""); - EdnVectorBin mVectSearch; + Edn::VectorType mVectSearch; mVectSearch = data.GetVector(); //EDN_INFO("search data Forward : startSearchPos=" << startSearchPos ); int32_t foundPos; @@ -1197,7 +1197,7 @@ void BufferText::Search(Edn::String &data, bool back, bool caseSensitive, bool w EDN_WARNING("no search data"); return; } - EdnVectorBin mVectSearch; + Edn::VectorType mVectSearch; mVectSearch = data.GetVector(); if (false == back) { //EDN_INFO("search data Forward : startSearchPos=" << startSearchPos ); @@ -1289,7 +1289,7 @@ void BufferText::Replace(Edn::String &data) */ void BufferText::Copy(int8_t clipboardID) { - EdnVectorBin mVect; + Edn::VectorType mVect; // get the curent selected data if (true == m_EdnBuf.SelectHasSelection(SELECTION_PRIMARY) ) { m_EdnBuf.GetSelectionText(SELECTION_PRIMARY, mVect); @@ -1338,7 +1338,7 @@ void BufferText::Cut(int8_t clipboardID) */ void BufferText::Paste(int8_t clipboardID) { - EdnVectorBin mVect; + Edn::VectorType mVect; // copy data from the click board : ClipBoard::Get(clipboardID, mVect); diff --git a/Sources/GuiTools/MainWindows/MenuBar.cpp b/Sources/GuiTools/MainWindows/MenuBar.cpp index f72a4b9..4ff9db5 100644 --- a/Sources/GuiTools/MainWindows/MenuBar.cpp +++ b/Sources/GuiTools/MainWindows/MenuBar.cpp @@ -189,7 +189,7 @@ class MenuBarMain GtkWidget * m_parent; GtkWidget * m_menu; GtkWidget * m_menuListe; - EdnVectorBin m_message; + Edn::VectorType m_message; }; #undef __class__ diff --git a/Sources/GuiTools/MainWindows/MenuBar.h b/Sources/GuiTools/MainWindows/MenuBar.h index 7b0f063..6df0a9d 100644 --- a/Sources/GuiTools/MainWindows/MenuBar.h +++ b/Sources/GuiTools/MainWindows/MenuBar.h @@ -26,7 +26,7 @@ #include "tools_debug.h" #include "tools_globals.h" #include "MsgBroadcast.h" -#include "EdnVectorBin.h" +#include "VectorType.h" #include "AccelKey.h" #ifndef __MENU_BAR_H__ @@ -46,7 +46,7 @@ class MenuBar: public MsgBroadcast private: GtkWidget * m_mainWidget; GtkAccelGroup * m_accelGroup; - EdnVectorBin m_listMenu; + Edn::VectorType m_listMenu; }; diff --git a/Sources/GuiTools/MainWindows/ToolBar.h b/Sources/GuiTools/MainWindows/ToolBar.h index 7386788..fcbadb1 100644 --- a/Sources/GuiTools/MainWindows/ToolBar.h +++ b/Sources/GuiTools/MainWindows/ToolBar.h @@ -42,7 +42,7 @@ class ToolBar: public MsgBroadcast void AddSeparator(void); void Add(const char * title, const char * labelHelp, messageType_te id = EDN_MSG__NONE, bool enable = false); GtkWidget * m_mainWidget; - EdnVectorBin m_message; + Edn::VectorType m_message; }; diff --git a/Sources/GuiTools/MenuContext/MenuContext.cpp b/Sources/GuiTools/MenuContext/MenuContext.cpp index 5848de9..d129989 100644 --- a/Sources/GuiTools/MenuContext/MenuContext.cpp +++ b/Sources/GuiTools/MenuContext/MenuContext.cpp @@ -283,7 +283,7 @@ gboolean MenuContext::CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, uint32_t fontHeight = Display::GetFontHeight(); basicColor_te selectFG = COLOR_LIST_TEXT_NORMAL; basicColor_te selectBG = COLOR_LIST_BG_1; - EdnVectorBin myData; + Edn::VectorType myData; Edn::String * plop = new Edn::String("Save"); myData.PushBack(plop); plop = new Edn::String("Show"); diff --git a/Sources/Highlight/HighlightPattern.h b/Sources/Highlight/HighlightPattern.h index 1ae971d..670466a 100644 --- a/Sources/Highlight/HighlightPattern.h +++ b/Sources/Highlight/HighlightPattern.h @@ -33,7 +33,7 @@ class HighlightPattern; #include "Edn.h" #include "RegExp.h" #include "Colorize.h" -#include "EdnVectorBin.h" +#include "VectorType.h" #include "tinyxml.h" #include "EdnVectorBuf.h" @@ -79,8 +79,8 @@ class HighlightPattern { bool m_haveStopPatern; //!< Stop patern presence bool m_multiline; //!< The patern is multiline char m_escapeChar; //!< Escape char to prevent exeit of patern .... - EdnVectorBin m_subPatern; //!< Under patern of this one -// EdnVectorBin m_subColor; //!< Under Color in the start RegExp ... + Edn::VectorType m_subPatern; //!< Under patern of this one +// Edn::VectorType m_subColor; //!< Under Color in the start RegExp ... }; #endif diff --git a/Sources/ctags/CTagsManager.cpp b/Sources/ctags/CTagsManager.cpp index f01a347..da39824 100644 --- a/Sources/ctags/CTagsManager.cpp +++ b/Sources/ctags/CTagsManager.cpp @@ -171,7 +171,7 @@ void CTagsManager::AddToHistory(int32_t bufferID) void CTagsManager::JumpTo(void) { if (NULL != m_ctagFile) { - EdnVectorBin data; + Edn::VectorType data; // get the middle button of the clipboard ==> represent the current selection ... ClipBoard::Get(COPY_MIDDLE_BUTTON, data); if (data.Size() == 0) { diff --git a/Sources/ctags/CTagsManager.h b/Sources/ctags/CTagsManager.h index 54be46e..f7a1efb 100644 --- a/Sources/ctags/CTagsManager.h +++ b/Sources/ctags/CTagsManager.h @@ -56,7 +56,7 @@ class CTagsManager: public Singleton, public MsgBroadcast // history system void AddToHistory(int32_t bufferID); int32_t m_historyPos; - EdnVectorBin m_historyList; + Edn::VectorType m_historyList; }; #endif diff --git a/Sources/tools/ClipBoard/ClipBoard.cpp b/Sources/tools/ClipBoard/ClipBoard.cpp index 41670eb..8f5b9d5 100644 --- a/Sources/tools/ClipBoard/ClipBoard.cpp +++ b/Sources/tools/ClipBoard/ClipBoard.cpp @@ -35,7 +35,7 @@ note: la copy dans le : [1..9] : copy interne 10 : bouton du milieux */ -static EdnVectorBin mesCopy[TOTAL_OF_CLICKBOARD]; +static Edn::VectorType mesCopy[TOTAL_OF_CLICKBOARD]; void ClipBoard::Init(void) @@ -47,7 +47,7 @@ void ClipBoard::Init(void) } -void ClipBoard::Set(uint8_t clipboardID, EdnVectorBin &data) +void ClipBoard::Set(uint8_t clipboardID, Edn::VectorType &data) { // check if ID is correct if(clipboardID >= TOTAL_OF_CLICKBOARD) { @@ -66,7 +66,7 @@ void ClipBoard::Set(uint8_t clipboardID, EdnVectorBin &data) } -void ClipBoard::Get(uint8_t clipboardID, EdnVectorBin &data) +void ClipBoard::Get(uint8_t clipboardID, Edn::VectorType &data) { if(clipboardID >= TOTAL_OF_CLICKBOARD) { EDN_WARNING("request ClickBoard id error"); diff --git a/Sources/tools/ClipBoard/ClipBoard.h b/Sources/tools/ClipBoard/ClipBoard.h index 3a9976d..132d0b4 100644 --- a/Sources/tools/ClipBoard/ClipBoard.h +++ b/Sources/tools/ClipBoard/ClipBoard.h @@ -27,7 +27,7 @@ #define __CLIP_BOARD_H__ #include "tools_debug.h" - #include "EdnVectorBin.h" + #include "VectorType.h" #define TOTAL_OF_CLICKBOARD (11) #define COPY_MIDDLE_BUTTON (10) @@ -36,8 +36,8 @@ namespace ClipBoard { void Init(void); - void Set(uint8_t clipboardID, EdnVectorBin &data); - void Get(uint8_t clipboardID, EdnVectorBin &data); + void Set(uint8_t clipboardID, Edn::VectorType &data); + void Get(uint8_t clipboardID, Edn::VectorType &data); } #endif diff --git a/Sources/tools/EdnBuf/EdnBuf.cpp b/Sources/tools/EdnBuf/EdnBuf.cpp index a17cdf0..bd3508e 100644 --- a/Sources/tools/EdnBuf/EdnBuf.cpp +++ b/Sources/tools/EdnBuf/EdnBuf.cpp @@ -126,7 +126,7 @@ bool EdnBuf::DumpFrom(FILE *myFile) } -void EdnBuf::GetAll(EdnVectorBin &text) +void EdnBuf::GetAll(Edn::VectorType &text) { // Clean output vector text.Clear(); @@ -135,9 +135,9 @@ void EdnBuf::GetAll(EdnVectorBin &text) } -void EdnBuf::SetAll(EdnVectorBin &text) +void EdnBuf::SetAll(Edn::VectorType &text) { - EdnVectorBin deletedText; + Edn::VectorType deletedText; // extract all data of the buffer : GetAll(deletedText); @@ -155,7 +155,7 @@ void EdnBuf::SetAll(EdnVectorBin &text) eventModification(0, m_data.Size(), deletedText); } -void EdnBuf::GetRange(int32_t start, int32_t end, EdnVectorBin &output) +void EdnBuf::GetRange(int32_t start, int32_t end, Edn::VectorType &output) { // Remove all data ... output.Clear(); @@ -189,7 +189,7 @@ int8_t EdnBuf::operator[] (int32_t pos) * @return --- * */ -void EdnBuf::Insert(int32_t pos, EdnVectorBin &insertText) +void EdnBuf::Insert(int32_t pos, Edn::VectorType &insertText) { // if pos is not contiguous to existing text, make it pos = edn_average(0, pos, m_data.Size() ); @@ -197,7 +197,7 @@ void EdnBuf::Insert(int32_t pos, EdnVectorBin &insertText) insert(pos, insertText); // Call the redisplay ... - EdnVectorBin deletedText; + Edn::VectorType deletedText; eventModification(pos, insertText.Size(), deletedText); } @@ -212,9 +212,9 @@ void EdnBuf::Insert(int32_t pos, EdnVectorBin &insertText) * @return --- * */ -void EdnBuf::Replace(int32_t start, int32_t end, EdnVectorBin &insertText) +void EdnBuf::Replace(int32_t start, int32_t end, Edn::VectorType &insertText) { - EdnVectorBin deletedText; + Edn::VectorType deletedText; GetRange(start, end, deletedText); m_data.Replace(start, end-start, insertText); // update internal elements @@ -234,7 +234,7 @@ void EdnBuf::Replace(int32_t start, int32_t end, EdnVectorBin &insertTex void EdnBuf::Remove(int32_t start, int32_t end) { - EdnVectorBin deletedText; + Edn::VectorType deletedText; // Make sure the arguments make sense if (start > end) { int32_t temp = start; @@ -265,7 +265,7 @@ int32_t EdnBuf::Indent(selectionType_te select) // Get Range : int32_t l_start = StartOfLine(SelectionStart); int32_t l_end = EndOfLine(SelectionEnd); - EdnVectorBin l_tmpData; + Edn::VectorType l_tmpData; GetRange(l_start, l_end, l_tmpData); l_tmpData.Insert(0, '\n'); @@ -304,7 +304,7 @@ int32_t EdnBuf::UnIndent(selectionType_te select) // Get Range : int32_t l_start = StartOfLine(SelectionStart); int32_t l_end = EndOfLine(SelectionEnd); - EdnVectorBin l_tmpData; + Edn::VectorType l_tmpData; GetRange(l_start, l_end, l_tmpData); l_tmpData.Insert(0, '\n'); @@ -346,7 +346,7 @@ int32_t EdnBuf::UnIndent(selectionType_te select) * @return --- * */ -void EdnBuf::GetLineText(int32_t pos, EdnVectorBin &text) +void EdnBuf::GetLineText(int32_t pos, Edn::VectorType &text) { GetRange( StartOfLine(pos), EndOfLine(pos), text); } @@ -666,9 +666,9 @@ int32_t EdnBuf::CountLines(int32_t startPos, int32_t endPos) * @return number of line found * */ -int32_t EdnBuf::CountLines(EdnVectorBin &data) +int32_t EdnBuf::CountLines(Edn::VectorType &data) { - EdnVectorBin::Iterator myPosIt = data.Begin(); + Edn::VectorType::Iterator myPosIt = data.Begin(); int32_t lineCount = 0; while(myPosIt) { @@ -810,7 +810,7 @@ bool EdnBuf::charMatch(char first, char second, bool caseSensitive) * @return false ==> not found data * */ -bool EdnBuf::SearchForward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive) +bool EdnBuf::SearchForward(int32_t startPos, Edn::VectorType &searchVect, int32_t *foundPos, bool caseSensitive) { int32_t position; int32_t searchLen = searchVect.Size(); @@ -851,7 +851,7 @@ bool EdnBuf::SearchForward(int32_t startPos, EdnVectorBin &searchVect, i * @return false ==> not found data * */ -bool EdnBuf::SearchBackward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive) +bool EdnBuf::SearchBackward(int32_t startPos, Edn::VectorType &searchVect, int32_t *foundPos, bool caseSensitive) { int32_t position; int32_t searchLen = searchVect.Size(); @@ -977,7 +977,7 @@ bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos) * @return number of element inserted. * */ -int32_t EdnBuf::insert(int32_t pos, EdnVectorBin &insertText) +int32_t EdnBuf::insert(int32_t pos, Edn::VectorType &insertText) { // Insert data in buffer m_data.Insert(pos, insertText); @@ -998,7 +998,7 @@ int32_t EdnBuf::insert(int32_t pos, EdnVectorBin &insertText) * @return --- * */ -void EdnBuf::eventModification(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +void EdnBuf::eventModification(int32_t pos, int32_t nInserted, Edn::VectorType &deletedText) { if( 0 == deletedText.Size() && 0 == nInserted) diff --git a/Sources/tools/EdnBuf/EdnBuf.h b/Sources/tools/EdnBuf/EdnBuf.h index 18497c1..7fc087c 100644 --- a/Sources/tools/EdnBuf/EdnBuf.h +++ b/Sources/tools/EdnBuf/EdnBuf.h @@ -82,21 +82,21 @@ class EdnBuf { // destructer ~EdnBuf(void); // public function : - void GetAll( EdnVectorBin &text); - void SetAll( EdnVectorBin &text); - void GetRange( int32_t start, int32_t end, EdnVectorBin &output); + void GetAll( Edn::VectorType &text); + void SetAll( Edn::VectorType &text); + void GetRange( int32_t start, int32_t end, Edn::VectorType &output); bool DumpIn( FILE *myFile); bool DumpFrom( FILE *myFile); // replace with operator [] ... int8_t operator[] (int32_t); - void Insert( int32_t pos, EdnVectorBin &insertText); - void Replace( int32_t start, int32_t end, EdnVectorBin &insertText); + void Insert( int32_t pos, Edn::VectorType &insertText); + void Replace( int32_t start, int32_t end, Edn::VectorType &insertText); void Remove( int32_t start, int32_t end); int32_t Indent( selectionType_te select); int32_t UnIndent( selectionType_te select); - void GetLineText( int32_t pos, EdnVectorBin &text); + void GetLineText( int32_t pos, Edn::VectorType &text); int32_t StartOfLine( int32_t pos); int32_t EndOfLine( int32_t pos); @@ -107,12 +107,12 @@ class EdnBuf { int32_t CountForwardDispChars( int32_t lineStartPos, int32_t nChars); int32_t CountLines( int32_t startPos, int32_t endPos); int32_t CountLines( void); - int32_t CountLines( EdnVectorBin &data); + int32_t CountLines( Edn::VectorType &data); int32_t CountForwardNLines( int32_t startPos, int32_t nLines); int32_t CountBackwardNLines( int32_t startPos, int32_t nLines); - bool SearchForward( int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive = true); - bool SearchBackward( int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive = true); + bool SearchForward( int32_t startPos, Edn::VectorType &searchVect, int32_t *foundPos, bool caseSensitive = true); + bool SearchBackward( int32_t startPos, Edn::VectorType &searchVect, int32_t *foundPos, bool caseSensitive = true); bool SearchForward( int32_t startPos, char searchChar, int32_t *foundPos); bool SearchBackward( int32_t startPos, char searchChar, int32_t *foundPos); bool SelectAround( int32_t startPos, int32_t &beginPos, int32_t &endPos); @@ -130,9 +130,9 @@ class EdnBuf { void Unselect( selectionType_te select); void RectSelect( selectionType_te select, int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd); bool GetSelectionPos( selectionType_te select, int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd); - void GetSelectionText( selectionType_te select, EdnVectorBin &text); + void GetSelectionText( selectionType_te select, Edn::VectorType &text); void RemoveSelected( selectionType_te select); - void ReplaceSelected( selectionType_te select, EdnVectorBin &text); + void ReplaceSelected( selectionType_te select, Edn::VectorType &text); private: // current selection of the buffer selection m_selectionList[SELECTION_SIZE]; //!< Selection area of the buffer @@ -148,8 +148,8 @@ class EdnBuf { private: bool m_isUndoProcessing; bool m_isRedoProcessing; - EdnVectorBin m_historyUndo; - EdnVectorBin m_historyRedo; + Edn::VectorType m_historyUndo; + Edn::VectorType m_historyRedo; // ----------------------------------------- // hightlight section : @@ -201,10 +201,10 @@ class EdnBuf { void removeSelected( selection &sel); void replaceSelected( selection &sel, const char *text); - void eventModification( int32_t pos, int32_t nInserted, EdnVectorBin &deletedText); + void eventModification( int32_t pos, int32_t nInserted, Edn::VectorType &deletedText); - int32_t insert( int32_t pos, EdnVectorBin &insertText); + int32_t insert( int32_t pos, Edn::VectorType &insertText); bool charMatch( char first, char second, bool caseSensitive = true); }; diff --git a/Sources/tools/EdnBuf/EdnBufHistory.cpp b/Sources/tools/EdnBuf/EdnBufHistory.cpp index 36bf6cd..b7337b9 100644 --- a/Sources/tools/EdnBuf/EdnBufHistory.cpp +++ b/Sources/tools/EdnBuf/EdnBufHistory.cpp @@ -39,7 +39,7 @@ EdnBufHistory::EdnBufHistory(void) m_nInserted = 0; } -EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, Edn::VectorType &deletedText) { //EDN_INFO("EdnBufHistory new + data"); m_pos = pos; @@ -47,7 +47,7 @@ EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +void EdnBufHistory::Set(int32_t pos, int32_t nInserted, Edn::VectorType &deletedText) { //EDN_INFO("EdnBufHistory new + data"); m_pos = pos; @@ -75,7 +75,7 @@ int32_t EdnBufHistory::getnbInserted(void) return m_nInserted; } -void EdnBufHistory::getData(EdnVectorBin &deletedText) +void EdnBufHistory::getData(Edn::VectorType &deletedText) { deletedText = m_deletedText; } diff --git a/Sources/tools/EdnBuf/EdnBufHistory.h b/Sources/tools/EdnBuf/EdnBufHistory.h index 8ef16b4..33a7b95 100644 --- a/Sources/tools/EdnBuf/EdnBufHistory.h +++ b/Sources/tools/EdnBuf/EdnBufHistory.h @@ -27,22 +27,22 @@ #define __EDN_BUFFER_HISTORY_H__ -#include "EdnVectorBin.h" +#include "VectorType.h" class EdnBufHistory{ public: EdnBufHistory(void); - EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText); + EdnBufHistory(int32_t pos, int32_t nInserted, Edn::VectorType &deletedText); ~EdnBufHistory(void); - void Set(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText); + void Set(int32_t pos, int32_t nInserted, Edn::VectorType &deletedText); int32_t getPos(void); int32_t getnbDeleted(void); int32_t getnbInserted(void); - void getData(EdnVectorBin &deletedText); + void getData(Edn::VectorType &deletedText); private: int32_t m_pos; int32_t m_nInserted; - EdnVectorBin m_deletedText; + Edn::VectorType m_deletedText; }; #endif diff --git a/Sources/tools/EdnBuf/EdnBuf_History.cpp b/Sources/tools/EdnBuf/EdnBuf_History.cpp index 5614ef4..509c872 100644 --- a/Sources/tools/EdnBuf/EdnBuf_History.cpp +++ b/Sources/tools/EdnBuf/EdnBuf_History.cpp @@ -53,7 +53,7 @@ int32_t EdnBuf::Undo(void) int32_t pos = m_historyUndo[nbElement]->getPos(); int32_t nbDeleted = m_historyUndo[nbElement]->getnbDeleted(); int32_t nbInserted = m_historyUndo[nbElement]->getnbInserted(); - EdnVectorBin deletedText; + Edn::VectorType deletedText; m_historyUndo[nbElement]->getData(deletedText); m_isUndoProcessing = true; if (0 == nbInserted) { @@ -101,7 +101,7 @@ int32_t EdnBuf::Redo(void) int32_t pos = m_historyRedo[nbElement]->getPos(); int32_t nbDeleted = m_historyRedo[nbElement]->getnbDeleted(); int32_t nbInserted = m_historyRedo[nbElement]->getnbInserted(); - EdnVectorBin deletedText; + Edn::VectorType deletedText; m_historyRedo[nbElement]->getData(deletedText); m_isRedoProcessing = true; if (0 == nbInserted) { diff --git a/Sources/tools/EdnBuf/EdnBuf_Selection.cpp b/Sources/tools/EdnBuf/EdnBuf_Selection.cpp index 9484ccc..84f9938 100644 --- a/Sources/tools/EdnBuf/EdnBuf_Selection.cpp +++ b/Sources/tools/EdnBuf/EdnBuf_Selection.cpp @@ -136,7 +136,7 @@ bool EdnBuf::GetSelectionPos(selectionType_te select, int32_t &start, int32_t &e * @return --- * */ -void EdnBuf::GetSelectionText(selectionType_te select, EdnVectorBin &text) +void EdnBuf::GetSelectionText(selectionType_te select, Edn::VectorType &text) { int32_t start, end, rectStart, rectEnd; bool isRect; @@ -198,7 +198,7 @@ void EdnBuf::RemoveSelected(selectionType_te select) * @return --- * */ -void EdnBuf::ReplaceSelected(selectionType_te select, EdnVectorBin &text) +void EdnBuf::ReplaceSelected(selectionType_te select, Edn::VectorType &text) { int32_t start, end, rectStart, rectEnd; bool isRect; diff --git a/Sources/tools/EdnTemplate/EdnTemplateTest.cpp b/Sources/tools/EdnTemplate/EdnTemplateTest.cpp index c4c29c8..b91bb93 100644 --- a/Sources/tools/EdnTemplate/EdnTemplateTest.cpp +++ b/Sources/tools/EdnTemplate/EdnTemplateTest.cpp @@ -2,14 +2,14 @@ #include "tools_debug.h" #include "tools_globals.h" -#include "EdnVectorBin.h" +#include "VectorType.h" void TestTemplate(void) { EDN_WARNING("Start Template Test ..."); - EdnVectorBin plop; - EdnVectorBin plop2; + Edn::VectorType plop; + Edn::VectorType plop2; plop.PushBack(15365); plop.PushBack(1); diff --git a/Sources/tools/EdnTemplate/EdnVectorBuf.cpp b/Sources/tools/EdnTemplate/EdnVectorBuf.cpp index 49d60d3..144f4bd 100644 --- a/Sources/tools/EdnTemplate/EdnVectorBuf.cpp +++ b/Sources/tools/EdnTemplate/EdnVectorBuf.cpp @@ -227,7 +227,7 @@ int8_t& EdnVectorBuf::Get(int32_t pos) * @return --- * */ -void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, EdnVectorBin &tmpBuffer) +void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, Edn::VectorType &tmpBuffer) { tmpBuffer.Clear(); if (pos < m_gapStart) { @@ -399,7 +399,7 @@ void EdnVectorBuf::Insert(int32_t pos, const int8_t& item) * @return --- * */ -void EdnVectorBuf::Insert(int32_t pos, EdnVectorBin& items) +void EdnVectorBuf::Insert(int32_t pos, Edn::VectorType& items) { if( pos > Size() || pos < 0 ) { @@ -455,7 +455,7 @@ void EdnVectorBuf::Replace(int32_t pos, const int8_t& item) * @return --- * */ -void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, EdnVectorBin& items) +void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, Edn::VectorType& items) { if( pos > Size() || pos < 0 ) { @@ -652,7 +652,7 @@ void TestEdnVectorBuf(void) myBufferTmp.Display(); plop='m'; - EdnVectorBin items; + Edn::VectorType items; items.PushBack('i'); items.PushBack('j'); items.PushBack('k'); diff --git a/Sources/tools/EdnTemplate/EdnVectorBuf.h b/Sources/tools/EdnTemplate/EdnVectorBuf.h index 70f5acd..fb74a42 100644 --- a/Sources/tools/EdnTemplate/EdnVectorBuf.h +++ b/Sources/tools/EdnTemplate/EdnVectorBuf.h @@ -27,7 +27,7 @@ #define __EDN_VECTOR_BUF_H__ #include "toolsMemory.h" -#include "EdnVectorBin.h" +#include "VectorType.h" #undef __class__ #define __class__ "EdnVectorBuf" @@ -272,14 +272,14 @@ class EdnVectorBuf EdnVectorBuf & operator=( const EdnVectorBuf & Evb); int8_t operator[] (int32_t pos); int8_t & Get( int32_t pos); - void Get( int32_t pos, int32_t nbElement, EdnVectorBin &tmpBuffer); + void Get( int32_t pos, int32_t nbElement, Edn::VectorType &tmpBuffer); // insert functions void PushBack( const int8_t& item); void Insert( int32_t pos, const int8_t& item); - void Insert( int32_t pos, EdnVectorBin& items); + void Insert( int32_t pos, Edn::VectorType& items); // Remove and insert functions void Replace( int32_t pos, const int8_t& item); - void Replace( int32_t pos, int32_t nbRemoveElement, EdnVectorBin& items); + void Replace( int32_t pos, int32_t nbRemoveElement, Edn::VectorType& items); // Revove fonctions void Remove( int32_t pos, int32_t nbRemoveElement = 1); void PopBack( void); diff --git a/Sources/tools/MsgBroadcast/MsgBroadcast.h b/Sources/tools/MsgBroadcast/MsgBroadcast.h index 673872e..a293fba 100644 --- a/Sources/tools/MsgBroadcast/MsgBroadcast.h +++ b/Sources/tools/MsgBroadcast/MsgBroadcast.h @@ -188,9 +188,9 @@ class MsgBroadcastCore: public Singleton void RmReceiver(MsgBroadcast * pointerOnReceiver); private: - EdnVectorBin m_listMessage; + Edn::VectorType m_listMessage; uint32_t m_messageID; - EdnVectorBin m_listOfMessage; + Edn::VectorType m_listOfMessage; }; diff --git a/Sources/tools/NameSpaceEdn/Edn.h b/Sources/tools/NameSpaceEdn/Edn.h index 54e3a17..e5882f3 100644 --- a/Sources/tools/NameSpaceEdn/Edn.h +++ b/Sources/tools/NameSpaceEdn/Edn.h @@ -26,7 +26,7 @@ #include "tools_debug.h" #include "toolsMemory.h" -#include "EdnVectorBin.h" +#include "VectorType.h" #include "String.h" diff --git a/Sources/tools/NameSpaceEdn/RegExp.cpp b/Sources/tools/NameSpaceEdn/RegExp.cpp index 68db964..3c41042 100644 --- a/Sources/tools/NameSpaceEdn/RegExp.cpp +++ b/Sources/tools/NameSpaceEdn/RegExp.cpp @@ -92,7 +92,7 @@ const int32_t constConvertionTableSize = sizeof(constConvertionTable) / sizeof(c * @return --- * */ -void DisplayData(EdnVectorBin &data) +void DisplayData(Edn::VectorType &data) { int32_t i; for (i=0; i<(int32_t)data.Size() ; i++) { @@ -110,7 +110,7 @@ void DisplayData(EdnVectorBin &data) * @return --- * */ -void DisplayElem(EdnVectorBin &data, int32_t start, int32_t stop) +void DisplayElem(Edn::VectorType &data, int32_t start, int32_t stop) { int32_t i; std::cout<< COLOR_NORMAL; @@ -180,7 +180,7 @@ char * levelSpace(int32_t level) * @return --- * */ -int32_t GetLenOfPTheseElem(EdnVectorBin &data, int32_t startPos) +int32_t GetLenOfPTheseElem(Edn::VectorType &data, int32_t startPos) { int32_t pos = startPos; int32_t nbOpen = 0; @@ -229,7 +229,7 @@ int32_t GetLenOfPTheseElem(EdnVectorBin &data, int32_t startPos) * @return --- * */ -int32_t GetLenOfPThese(EdnVectorBin &data, int32_t startPos) +int32_t GetLenOfPThese(Edn::VectorType &data, int32_t startPos) { int32_t pos = startPos; int32_t nbOpen = 0; @@ -282,7 +282,7 @@ int32_t GetLenOfPThese(EdnVectorBin &data, int32_t startPos) * @return --- * */ -int32_t GetLenOfBracket(EdnVectorBin &data, int32_t startPos) +int32_t GetLenOfBracket(Edn::VectorType &data, int32_t startPos) { int32_t pos = startPos; // special case of the (...) or | ==> we search '|' or ')' @@ -326,7 +326,7 @@ int32_t GetLenOfBracket(EdnVectorBin &data, int32_t startPos) * @return --- * */ -int32_t GetLenOfBrace(EdnVectorBin &data, int32_t startPos) +int32_t GetLenOfBrace(Edn::VectorType &data, int32_t startPos) { int32_t pos = startPos; // special case of the (...) or | ==> we search '|' or ')' @@ -370,7 +370,7 @@ int32_t GetLenOfBrace(EdnVectorBin &data, int32_t startPos) * @return --- * */ -int32_t GetLenOfNormal(EdnVectorBin &data, int32_t startPos) +int32_t GetLenOfNormal(Edn::VectorType &data, int32_t startPos) { int32_t pos = startPos; @@ -427,7 +427,7 @@ int32_t GetLenOfNormal(EdnVectorBin &data, int32_t startPos) * @return --- * */ -bool ParseBrace(EdnVectorBin &data, int32_t &min, int32_t &max) +bool ParseBrace(Edn::VectorType &data, int32_t &min, int32_t &max) { //EDN_INFO("parse {...} in "; DisplayElem(data); ); int32_t k=0; diff --git a/Sources/tools/NameSpaceEdn/RegExp.h b/Sources/tools/NameSpaceEdn/RegExp.h index ac30148..8a20801 100644 --- a/Sources/tools/NameSpaceEdn/RegExp.h +++ b/Sources/tools/NameSpaceEdn/RegExp.h @@ -25,7 +25,7 @@ #ifndef __EDN_REG_EXP_H__ #define __EDN_REG_EXP_H__ -#include "EdnVectorBin.h" +#include "VectorType.h" #include "Edn.h" /* @@ -89,15 +89,15 @@ typedef struct { extern const convertionTable_ts constConvertionTable[]; extern const int32_t constConvertionTableSize; -void DisplayData(EdnVectorBin &data); -void DisplayElem(EdnVectorBin &data, int32_t start=0, int32_t stop=0x7FFFFFFF); +void DisplayData(Edn::VectorType &data); +void DisplayElem(Edn::VectorType &data, int32_t start=0, int32_t stop=0x7FFFFFFF); char * levelSpace(int32_t level); -int32_t GetLenOfPTheseElem(EdnVectorBin &data, int32_t startPos); -int32_t GetLenOfPThese(EdnVectorBin &data, int32_t startPos); -int32_t GetLenOfBracket(EdnVectorBin &data, int32_t startPos); -int32_t GetLenOfBrace(EdnVectorBin &data, int32_t startPos); -int32_t GetLenOfNormal(EdnVectorBin &data, int32_t startPos); -bool ParseBrace(EdnVectorBin &data, int32_t &min, int32_t &max); +int32_t GetLenOfPTheseElem(Edn::VectorType &data, int32_t startPos); +int32_t GetLenOfPThese(Edn::VectorType &data, int32_t startPos); +int32_t GetLenOfBracket(Edn::VectorType &data, int32_t startPos); +int32_t GetLenOfBrace(Edn::VectorType &data, int32_t startPos); +int32_t GetLenOfNormal(Edn::VectorType &data, int32_t startPos); +bool ParseBrace(Edn::VectorType &data, int32_t &min, int32_t &max); #undef __class__ @@ -134,7 +134,7 @@ template class RegExpNode{ * @param[in,out] * @return */ - virtual int32_t Generate(EdnVectorBin &data, int32_t startPos, int32_t nbElement) + virtual int32_t Generate(Edn::VectorType &data, int32_t startPos, int32_t nbElement) { return 0; }; @@ -194,7 +194,7 @@ template class RegExpNode{ int32_t m_multipleMin; //!< minimum repetition (included) int32_t m_multipleMax; //!< maximum repetition (included) // Data Section ... (can have no data...) - EdnVectorBin m_RegExpData; //!< data to parse and compare in some case ... + Edn::VectorType m_RegExpData; //!< data to parse and compare in some case ... }; #undef __class__ @@ -228,7 +228,7 @@ template class RegExpNodeValue : public RegExpNode * @param[in,out] * @return */ - int32_t Generate(EdnVectorBin &data) + int32_t Generate(Edn::VectorType &data) { RegExpNode::m_RegExpData = data; //EDN_DEBUG("Request Parse \"Value\" data="; DisplayElem(RegExpNode::m_RegExpData);); @@ -298,7 +298,7 @@ template class RegExpNodeValue : public RegExpNode }; protected : // SubNodes : - EdnVectorBin m_data; + Edn::VectorType m_data; }; #undef __class__ #define __class__ "RegExpNodeBracket" @@ -331,7 +331,7 @@ template class RegExpNodeBracket : public RegExpNode &data) + int32_t Generate(Edn::VectorType &data) { RegExpNode::m_RegExpData = data; //EDN_DEBUG("Request Parse [...] data="; DisplayElem(RegExpNode::m_RegExpData);); @@ -416,7 +416,7 @@ template class RegExpNodeBracket : public RegExpNode m_data; + Edn::VectorType m_data; }; #undef __class__ #define __class__ "RegExpNodeDigit" @@ -1206,14 +1206,14 @@ template class RegExpNodePTheseElem : public RegExpNode &data) + int32_t Generate(Edn::VectorType &data) { RegExpNode::m_RegExpData = data; //EDN_DEBUG("Request Parse (elem) data="; DisplayElem(RegExpNode::m_RegExpData);); int32_t pos = 0; int32_t elementSize = 0; - EdnVectorBin tmpData; + Edn::VectorType tmpData; while (pos < RegExpNode::m_RegExpData.Size()) { tmpData.Clear(); switch (RegExpNode::m_RegExpData[pos]) @@ -1399,7 +1399,7 @@ template class RegExpNodePTheseElem : public RegExpNode*> m_subNode; + Edn::VectorType*> m_subNode; private : /** * @brief Set the number of repeate time on a the last node in the list ... @@ -1456,7 +1456,7 @@ template class RegExpNodePThese : public RegExpNode &data) + int32_t Generate(Edn::VectorType &data) { RegExpNode::m_RegExpData = data; //EDN_DEBUG("Request Parse (...) data="; DisplayElem(RegExpNode::m_RegExpData);); @@ -1466,7 +1466,7 @@ template class RegExpNodePThese : public RegExpNode0) { // geerate output deta ... - EdnVectorBin tmpData; + Edn::VectorType tmpData; for (int32_t k=pos; k::m_RegExpData[k]); } @@ -1542,7 +1542,7 @@ template class RegExpNodePThese : public RegExpNode*> m_subNode; + Edn::VectorType*> m_subNode; //int32_t m_posPthese; //!< position of the element is detected in the output element }; #undef __class__ @@ -1629,7 +1629,7 @@ template class EdnRegExp { void SetRegExp(Edn::String &expressionRequested) { m_expressionRequested = expressionRequested; // TODO : Must be deprecated ... - EdnVectorBin tmpExp; + Edn::VectorType tmpExp; //EDN_DEBUG("Parse RegExp : " << expressionRequested.c_str() ); m_isOk = false; @@ -1905,7 +1905,7 @@ template class EdnRegExp { * @param[in,out] * @return */ - bool CheckGoodPosition(EdnVectorBin tmpExp, int32_t &pos) + bool CheckGoodPosition(Edn::VectorType tmpExp, int32_t &pos) { int16_t curentCode = tmpExp[pos]; int16_t endCode = OPCODE_PTHESE_OUT; @@ -2010,7 +2010,7 @@ template class EdnRegExp { * @param[in,out] * @return */ - bool CheckGoodPosition(EdnVectorBin tmpExp) + bool CheckGoodPosition(Edn::VectorType tmpExp) { int32_t pos = 0; while (pos < (int32_t)tmpExp.Size()) { diff --git a/Sources/tools/NameSpaceEdn/String.cpp b/Sources/tools/NameSpaceEdn/String.cpp index 1103aa8..c98b858 100644 --- a/Sources/tools/NameSpaceEdn/String.cpp +++ b/Sources/tools/NameSpaceEdn/String.cpp @@ -205,7 +205,7 @@ const Edn::String& Edn::String::operator= (const char * inputData) * @return * */ -const Edn::String& Edn::String::operator= (EdnVectorBin inputData) +const Edn::String& Edn::String::operator= (Edn::VectorType inputData) { m_data = inputData; if (m_data.Size()>0) { @@ -569,9 +569,9 @@ Edn::String Edn::String::Extract(int32_t posStart, int32_t posEnd) * @return The desired vector with data * */ -EdnVectorBin Edn::String::GetVector(void) +Edn::VectorType Edn::String::GetVector(void) { - EdnVectorBin out = m_data; + Edn::VectorType out = m_data; out.PopBack(); return out; } @@ -630,7 +630,7 @@ void Edn::TestUntaire_String(void) EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); s1 = "test direct 44"; EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); - EdnVectorBin vb1; + Edn::VectorType vb1; vb1.PushBack('v'); vb1.PushBack('b'); vb1.PushBack('1'); diff --git a/Sources/tools/NameSpaceEdn/String.h b/Sources/tools/NameSpaceEdn/String.h index 7f659cc..2bfdda0 100644 --- a/Sources/tools/NameSpaceEdn/String.h +++ b/Sources/tools/NameSpaceEdn/String.h @@ -45,18 +45,17 @@ namespace Edn const Edn::String& operator= (const Edn::String &ednS ); // assigment const Edn::String& operator= (const char * inputData); - const Edn::String& operator= (EdnVectorBin inputData); - bool operator== (const Edn::String& ednS) const; // == operator - bool operator== (const char * inputData) const; - bool operator!= (const Edn::String& ednS) const; // != operator - bool operator!= (const char * inputData) const; + const Edn::String& operator= (Edn::VectorType inputData); + bool operator== (const Edn::String& ednS) const; // == operator + bool operator== (const char * inputData) const; + bool operator!= (const Edn::String& ednS) const; // != operator + bool operator!= (const char * inputData) const; const Edn::String& operator+= (const Edn::String &ednS); // += operator const Edn::String& operator+= (const char * inputData); Edn::String operator+ (const Edn::String &ednS); // + operator Edn::String operator+ (const char * inputData); //operator const char *() - bool IsEmpty(void) const; int32_t Size(void) const; @@ -64,7 +63,7 @@ namespace Edn void Remove(int32_t currentID, int32_t len); void Clear(void); - EdnVectorBin GetVector(void); + Edn::VectorType GetVector(void); char * c_str(void) { return (char*)&m_data[0]; }; // Sting operation : @@ -73,7 +72,7 @@ namespace Edn Edn::String Extract(int32_t posStart=0, int32_t posEnd=0x7FFFFFFF); private : - EdnVectorBin m_data; + Edn::VectorType m_data; }; void TestUntaire_String(void); diff --git a/Sources/tools/EdnTemplate/EdnVectorBin.h b/Sources/tools/NameSpaceEdn/VectorType.h similarity index 89% rename from Sources/tools/EdnTemplate/EdnVectorBin.h rename to Sources/tools/NameSpaceEdn/VectorType.h index 63a5f03..75f0f8a 100644 --- a/Sources/tools/EdnTemplate/EdnVectorBin.h +++ b/Sources/tools/NameSpaceEdn/VectorType.h @@ -1,7 +1,7 @@ /** ******************************************************************************* - * @file EdnEdnVectorBin.h - * @brief Editeur De N'ours : Basic EdnVectorBin for direct data insertion (template) + * @file VectorType.h + * @brief Editeur De N'ours : Basic VectorType for direct data insertion (template) * @author Edouard DUPIN * @date 07/04/2011 * @par Project @@ -29,10 +29,10 @@ #include "toolsMemory.h" #undef __class__ -#define __class__ "EdnEdnVectorBin" +#define __class__ "Edn::VectorType" /** - * @brief EdnVectorBin classes ... + * @brief VectorType classes ... * * @tparam[in] SIZE Size of the current element. * @@ -65,22 +65,26 @@ * ---------------------------------------- * */ -template class EdnVectorBin + +namespace Edn +{ + +template class VectorType { public: class Iterator { - // Private data : + // Private data : private: - int32_t m_current; // curent Id on the vector - EdnVectorBin * m_EdnVectorBin; // Pointer on the curent element of the vectorBin + int32_t m_current; //!< curent Id on the vector + VectorType * m_VectorType; //!< Pointer on the curent element of the vectorBin public: /** * @brief Basic itarator constructor with no link with an EdnVector */ Iterator(): m_current(-1), - m_EdnVectorBin(NULL) + m_VectorType(NULL) { // nothing to do ... } @@ -90,7 +94,7 @@ template class EdnVectorBin */ Iterator(const Iterator & otherIterator): m_current(otherIterator.m_current), - m_EdnVectorBin(otherIterator.m_EdnVectorBin) + m_VectorType(otherIterator.m_VectorType) { // nothing to do ... } @@ -102,7 +106,7 @@ template class EdnVectorBin Iterator& operator=(const Iterator & otherIterator) { m_current = otherIterator.m_current; - m_EdnVectorBin = otherIterator.m_EdnVectorBin; + m_VectorType = otherIterator.m_VectorType; return *this; } /** @@ -111,7 +115,7 @@ template class EdnVectorBin ~Iterator() { m_current = -1; - m_EdnVectorBin = NULL; + m_VectorType = NULL; } /** * @brief basic boolean cast @@ -120,7 +124,7 @@ template class EdnVectorBin operator bool () { if( 0 <= m_current - && m_current < m_EdnVectorBin->Size() ) + && m_current < m_VectorType->Size() ) { return true; } else { @@ -133,8 +137,8 @@ template class EdnVectorBin */ Iterator& operator++ () { - if( NULL != m_EdnVectorBin - && m_current < m_EdnVectorBin->Size() ) + if( NULL != m_VectorType + && m_current < m_VectorType->Size() ) { m_current++; } @@ -177,8 +181,8 @@ template class EdnVectorBin */ MY_TYPE & operator-> () const { - EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBin->Size()); - return &m_EdnVectorBin->Get(m_current); + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_VectorType->Size()); + return &m_VectorType->Get(m_current); } /** * @brief Get reference on the current Element @@ -186,8 +190,8 @@ template class EdnVectorBin */ MY_TYPE & operator* () const { - EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBin->Size()); - return m_EdnVectorBin->Get(m_current); + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_VectorType->Size()); + return m_VectorType->Get(m_current); } private: /** @@ -198,26 +202,26 @@ template class EdnVectorBin * @return --- * */ - Iterator(EdnVectorBin * Evb, int32_t pos): + Iterator(VectorType * Evb, int32_t pos): m_current(pos), - m_EdnVectorBin(Evb) + m_VectorType(Evb) { // nothing to do ... } - friend class EdnVectorBin; + friend class VectorType; }; private: - MY_TYPE * m_data; //!< pointer on the curetn table of Data - int32_t m_size; //!< nb Element in the buffer - int32_t m_allocated; //!< Current allocated size - int32_t m_increment; //!< methode of increment + MY_TYPE * m_data; //!< pointer on the curetn table of Data + int32_t m_size; //!< nb Element in the buffer + int32_t m_allocated; //!< Current allocated size + int32_t m_increment; //!< methode of increment public: /** * @brief Create an empty vector * @param[in] count Minimum request size of the Buffer */ - EdnVectorBin(int32_t count = 0): + VectorType(int32_t count = 0): m_data(NULL), m_size(0), m_allocated(0), @@ -230,12 +234,12 @@ template class EdnVectorBin * @brief Re-copy constructor (copy all needed data) * @param[in] Evb Vector that might be copy */ - EdnVectorBin(const EdnVectorBin & Evb) + VectorType(const Edn::VectorType & Evb) { m_allocated = Evb.m_allocated; - m_size = Evb.m_size; + m_size = Evb.m_size; m_increment = Evb.m_increment; - m_data = NULL; + m_data = NULL; //EDN_DEBUG("USE Specific vector allocator ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment); // allocate all same data EDN_MALLOC(m_data, m_allocated, MY_TYPE); @@ -247,7 +251,7 @@ template class EdnVectorBin /** * @brief Destructor of the current Class */ - ~EdnVectorBin() + ~VectorType() { if (NULL!=m_data) { EDN_FREE(m_data); @@ -263,7 +267,7 @@ template class EdnVectorBin * @param[in] Evb Vector that might be copy * @return reference on the curent re-copy vector */ - EdnVectorBin& operator=(const EdnVectorBin & Evb) + VectorType& operator=(const Edn::VectorType & Evb) { //EDN_DEBUG("USE RECOPY vector ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment); if( this != &Evb ) // avoid copy to itself @@ -290,7 +294,7 @@ template class EdnVectorBin * @brief Add at the Last position of the Vector * @param[in] item Element to add at the end of vector */ - EdnVectorBin& operator+= (const EdnVectorBin & Evb) // += operator + VectorType& operator+= (const Edn::VectorType & Evb) // += operator { int32_t nbElememt = Evb.Size(); int32_t idx = m_size; @@ -502,9 +506,9 @@ template class EdnVectorBin * @param[in] posEnd End position to extract data * @return the extracted vector */ - EdnVectorBin Extract(int32_t posStart = 0, int32_t posEnd=0x7FFFFFFF) + VectorType Extract(int32_t posStart = 0, int32_t posEnd=0x7FFFFFFF) { - EdnVectorBin out; + VectorType out; if (posStart < 0) { posStart = 0; } else if (posStart >= Size() ) { @@ -633,8 +637,8 @@ template class EdnVectorBin // set the new allocation size m_allocated = requestSize; } - }; +} #undef __class__ #define __class__ NULL diff --git a/Sources/tools/charset/charset.cpp b/Sources/tools/charset/charset.cpp index 34fa8a9..93166c1 100644 --- a/Sources/tools/charset/charset.cpp +++ b/Sources/tools/charset/charset.cpp @@ -101,14 +101,14 @@ void convertUnicodeToIso(charset_te inputCharset, int32_t input_Unicode, char & } -int32_t convertIsoToUnicode(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_Unicode) +int32_t convertIsoToUnicode(charset_te inputCharset, Edn::VectorType& input_ISO, Edn::VectorType& output_Unicode) { EDN_WARNING("TODO : not coded..."); return 0; } -int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin& input_Unicode, EdnVectorBin& output_ISO) +int32_t convertUnicodeToIso(charset_te inputCharset, Edn::VectorType& input_Unicode, Edn::VectorType& output_ISO) { EDN_WARNING("TODO : not coded..."); return 0; @@ -204,14 +204,14 @@ void convertUtf8ToUnicode(char * input_UTF8, int32_t &output_Unicode) } -int32_t convertUnicodeToUtf8(EdnVectorBin& input_Unicode, EdnVectorBin& output_UTF8) +int32_t convertUnicodeToUtf8(Edn::VectorType& input_Unicode, Edn::VectorType& output_UTF8) { EDN_WARNING("TODO : not coded..."); return 0; } -int32_t convertUtf8ToUnicode(EdnVectorBin& input_UTF8, EdnVectorBin& output_Unicode) +int32_t convertUtf8ToUnicode(Edn::VectorType& input_UTF8, Edn::VectorType& output_Unicode) { EDN_WARNING("TODO : not coded..."); return 0; @@ -239,14 +239,14 @@ void convertUtf8ToIso(charset_te inputCharset, char * input_UTF8, char & output } -int32_t convertIsoToUtf8(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_UTF8) +int32_t convertIsoToUtf8(charset_te inputCharset, Edn::VectorType& input_ISO, Edn::VectorType& output_UTF8) { EDN_WARNING("TODO : not coded..."); return 0; } -int32_t convertUtf8ToIso(charset_te inputCharset, EdnVectorBin& input_UTF8, EdnVectorBin& output_ISO) +int32_t convertUtf8ToIso(charset_te inputCharset, Edn::VectorType& input_UTF8, Edn::VectorType& output_ISO) { EDN_WARNING("TODO : not coded..."); return 0; diff --git a/Sources/tools/charset/charset.h b/Sources/tools/charset/charset.h index 298ade1..0910813 100644 --- a/Sources/tools/charset/charset.h +++ b/Sources/tools/charset/charset.h @@ -26,7 +26,7 @@ #ifndef __CHARSET_H__ #define __CHARSET_H__ -#include "EdnVectorBin.h" +#include "VectorType.h" typedef enum { EDN_CHARSET_UTF8, @@ -49,18 +49,18 @@ typedef enum { // transform ISO <==> Unicode void convertIsoToUnicode(charset_te inputCharset, char input_ISO, int32_t & output_Unicode); void convertUnicodeToIso(charset_te inputCharset, int32_t input_Unicode, char & output_ISO); -int32_t convertIsoToUnicode(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_Unicode); -int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin& input_Unicode, EdnVectorBin& output_ISO); +int32_t convertIsoToUnicode(charset_te inputCharset, Edn::VectorType& input_ISO, Edn::VectorType& output_Unicode); +int32_t convertUnicodeToIso(charset_te inputCharset, Edn::VectorType& input_Unicode, Edn::VectorType& output_ISO); // Transform UTF-8 <==> Unicode void convertUnicodeToUtf8( int32_t input_Unicode, char * output_UTF8); void convertUtf8ToUnicode( char * input_UTF8, int32_t& output_Unicode); -int32_t convertUnicodeToUtf8( EdnVectorBin& input_Unicode, EdnVectorBin& output_UTF8); -int32_t convertUtf8ToUnicode( EdnVectorBin& input_UTF8, EdnVectorBin& output_Unicode); +int32_t convertUnicodeToUtf8( Edn::VectorType& input_Unicode, Edn::VectorType& output_UTF8); +int32_t convertUtf8ToUnicode( Edn::VectorType& input_UTF8, Edn::VectorType& output_Unicode); // Transform ISO <==> UTF-8 void convertIsoToUtf8( charset_te inputCharset, char input_ISO, char * output_UTF8); void convertUtf8ToIso( charset_te inputCharset, char * input_UTF8, char & output_ISO); -int32_t convertIsoToUtf8( charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_UTF8); -int32_t convertUtf8ToIso( charset_te inputCharset, EdnVectorBin& input_UTF8, EdnVectorBin& output_ISO); +int32_t convertIsoToUtf8( charset_te inputCharset, Edn::VectorType& input_ISO, Edn::VectorType& output_UTF8); +int32_t convertUtf8ToIso( charset_te inputCharset, Edn::VectorType& input_UTF8, Edn::VectorType& output_ISO); void Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid); int32_t strUtf8Len(const char *input_UTF8);