move EdnVectorBin in Edn::VectorType
This commit is contained in:
parent
45aad6b2e2
commit
0fe575e432
@ -1047,7 +1047,7 @@ void BufferText::AddChar(char * UTF8data)
|
||||
if (1==size) {
|
||||
if (UTF8data[0] == 0x09) {
|
||||
if (false == haveSelectionActive) {
|
||||
EdnVectorBin<int8_t> tmpVect;
|
||||
Edn::VectorType<int8_t> 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<int8_t> tmpVect;
|
||||
Edn::VectorType<int8_t> 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<int8_t> tmpVect;
|
||||
Edn::VectorType<int8_t> 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<int8_t> tmpVect;
|
||||
Edn::VectorType<int8_t> 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<int8_t> mVectSearch;
|
||||
Edn::VectorType<int8_t> 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<int8_t> mVectSearch;
|
||||
Edn::VectorType<int8_t> 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<int8_t> mVect;
|
||||
Edn::VectorType<int8_t> 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<int8_t> mVect;
|
||||
Edn::VectorType<int8_t> mVect;
|
||||
// copy data from the click board :
|
||||
ClipBoard::Get(clipboardID, mVect);
|
||||
|
||||
|
@ -189,7 +189,7 @@ class MenuBarMain
|
||||
GtkWidget * m_parent;
|
||||
GtkWidget * m_menu;
|
||||
GtkWidget * m_menuListe;
|
||||
EdnVectorBin<messageData_ts*> m_message;
|
||||
Edn::VectorType<messageData_ts*> m_message;
|
||||
};
|
||||
|
||||
#undef __class__
|
||||
|
@ -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<MenuBarMain*> m_listMenu;
|
||||
Edn::VectorType<MenuBarMain*> m_listMenu;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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<messageData_ts*> m_message;
|
||||
Edn::VectorType<messageData_ts*> m_message;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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<Edn::String *> myData;
|
||||
Edn::VectorType<Edn::String *> myData;
|
||||
Edn::String * plop = new Edn::String("Save");
|
||||
myData.PushBack(plop);
|
||||
plop = new Edn::String("Show");
|
||||
|
@ -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<HighlightPattern *> m_subPatern; //!< Under patern of this one
|
||||
// EdnVectorBin<HighlightPattern *> m_subColor; //!< Under Color in the start RegExp ...
|
||||
Edn::VectorType<HighlightPattern *> m_subPatern; //!< Under patern of this one
|
||||
// Edn::VectorType<HighlightPattern *> m_subColor; //!< Under Color in the start RegExp ...
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -171,7 +171,7 @@ void CTagsManager::AddToHistory(int32_t bufferID)
|
||||
void CTagsManager::JumpTo(void)
|
||||
{
|
||||
if (NULL != m_ctagFile) {
|
||||
EdnVectorBin<int8_t> data;
|
||||
Edn::VectorType<int8_t> data;
|
||||
// get the middle button of the clipboard ==> represent the current selection ...
|
||||
ClipBoard::Get(COPY_MIDDLE_BUTTON, data);
|
||||
if (data.Size() == 0) {
|
||||
|
@ -56,7 +56,7 @@ class CTagsManager: public Singleton<CTagsManager>, public MsgBroadcast
|
||||
// history system
|
||||
void AddToHistory(int32_t bufferID);
|
||||
int32_t m_historyPos;
|
||||
EdnVectorBin<Edn::File*> m_historyList;
|
||||
Edn::VectorType<Edn::File*> m_historyList;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@ note: la copy dans le :
|
||||
[1..9] : copy interne
|
||||
10 : bouton du milieux
|
||||
*/
|
||||
static EdnVectorBin<int8_t> mesCopy[TOTAL_OF_CLICKBOARD];
|
||||
static Edn::VectorType<int8_t> mesCopy[TOTAL_OF_CLICKBOARD];
|
||||
|
||||
|
||||
void ClipBoard::Init(void)
|
||||
@ -47,7 +47,7 @@ void ClipBoard::Init(void)
|
||||
}
|
||||
|
||||
|
||||
void ClipBoard::Set(uint8_t clipboardID, EdnVectorBin<int8_t> &data)
|
||||
void ClipBoard::Set(uint8_t clipboardID, Edn::VectorType<int8_t> &data)
|
||||
{
|
||||
// check if ID is correct
|
||||
if(clipboardID >= TOTAL_OF_CLICKBOARD) {
|
||||
@ -66,7 +66,7 @@ void ClipBoard::Set(uint8_t clipboardID, EdnVectorBin<int8_t> &data)
|
||||
}
|
||||
|
||||
|
||||
void ClipBoard::Get(uint8_t clipboardID, EdnVectorBin<int8_t> &data)
|
||||
void ClipBoard::Get(uint8_t clipboardID, Edn::VectorType<int8_t> &data)
|
||||
{
|
||||
if(clipboardID >= TOTAL_OF_CLICKBOARD) {
|
||||
EDN_WARNING("request ClickBoard id error");
|
||||
|
@ -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<int8_t> &data);
|
||||
void Get(uint8_t clipboardID, EdnVectorBin<int8_t> &data);
|
||||
void Set(uint8_t clipboardID, Edn::VectorType<int8_t> &data);
|
||||
void Get(uint8_t clipboardID, Edn::VectorType<int8_t> &data);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -126,7 +126,7 @@ bool EdnBuf::DumpFrom(FILE *myFile)
|
||||
}
|
||||
|
||||
|
||||
void EdnBuf::GetAll(EdnVectorBin<int8_t> &text)
|
||||
void EdnBuf::GetAll(Edn::VectorType<int8_t> &text)
|
||||
{
|
||||
// Clean output vector
|
||||
text.Clear();
|
||||
@ -135,9 +135,9 @@ void EdnBuf::GetAll(EdnVectorBin<int8_t> &text)
|
||||
}
|
||||
|
||||
|
||||
void EdnBuf::SetAll(EdnVectorBin<int8_t> &text)
|
||||
void EdnBuf::SetAll(Edn::VectorType<int8_t> &text)
|
||||
{
|
||||
EdnVectorBin<int8_t> deletedText;
|
||||
Edn::VectorType<int8_t> deletedText;
|
||||
|
||||
// extract all data of the buffer :
|
||||
GetAll(deletedText);
|
||||
@ -155,7 +155,7 @@ void EdnBuf::SetAll(EdnVectorBin<int8_t> &text)
|
||||
eventModification(0, m_data.Size(), deletedText);
|
||||
}
|
||||
|
||||
void EdnBuf::GetRange(int32_t start, int32_t end, EdnVectorBin<int8_t> &output)
|
||||
void EdnBuf::GetRange(int32_t start, int32_t end, Edn::VectorType<int8_t> &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<int8_t> &insertText)
|
||||
void EdnBuf::Insert(int32_t pos, Edn::VectorType<int8_t> &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<int8_t> &insertText)
|
||||
insert(pos, insertText);
|
||||
|
||||
// Call the redisplay ...
|
||||
EdnVectorBin<int8_t> deletedText;
|
||||
Edn::VectorType<int8_t> deletedText;
|
||||
eventModification(pos, insertText.Size(), deletedText);
|
||||
}
|
||||
|
||||
@ -212,9 +212,9 @@ void EdnBuf::Insert(int32_t pos, EdnVectorBin<int8_t> &insertText)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::Replace(int32_t start, int32_t end, EdnVectorBin<int8_t> &insertText)
|
||||
void EdnBuf::Replace(int32_t start, int32_t end, Edn::VectorType<int8_t> &insertText)
|
||||
{
|
||||
EdnVectorBin<int8_t> deletedText;
|
||||
Edn::VectorType<int8_t> 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<int8_t> &insertTex
|
||||
void EdnBuf::Remove(int32_t start, int32_t end)
|
||||
{
|
||||
|
||||
EdnVectorBin<int8_t> deletedText;
|
||||
Edn::VectorType<int8_t> 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<int8_t> l_tmpData;
|
||||
Edn::VectorType<int8_t> 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<int8_t> l_tmpData;
|
||||
Edn::VectorType<int8_t> 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<int8_t> &text)
|
||||
void EdnBuf::GetLineText(int32_t pos, Edn::VectorType<int8_t> &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<int8_t> &data)
|
||||
int32_t EdnBuf::CountLines(Edn::VectorType<int8_t> &data)
|
||||
{
|
||||
EdnVectorBin<int8_t>::Iterator myPosIt = data.Begin();
|
||||
Edn::VectorType<int8_t>::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<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive)
|
||||
bool EdnBuf::SearchForward(int32_t startPos, Edn::VectorType<int8_t> &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<int8_t> &searchVect, i
|
||||
* @return false ==> not found data
|
||||
*
|
||||
*/
|
||||
bool EdnBuf::SearchBackward(int32_t startPos, EdnVectorBin<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive)
|
||||
bool EdnBuf::SearchBackward(int32_t startPos, Edn::VectorType<int8_t> &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<int8_t> &insertText)
|
||||
int32_t EdnBuf::insert(int32_t pos, Edn::VectorType<int8_t> &insertText)
|
||||
{
|
||||
// Insert data in buffer
|
||||
m_data.Insert(pos, insertText);
|
||||
@ -998,7 +998,7 @@ int32_t EdnBuf::insert(int32_t pos, EdnVectorBin<int8_t> &insertText)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::eventModification(int32_t pos, int32_t nInserted, EdnVectorBin<int8_t> &deletedText)
|
||||
void EdnBuf::eventModification(int32_t pos, int32_t nInserted, Edn::VectorType<int8_t> &deletedText)
|
||||
{
|
||||
if( 0 == deletedText.Size()
|
||||
&& 0 == nInserted)
|
||||
|
@ -82,21 +82,21 @@ class EdnBuf {
|
||||
// destructer
|
||||
~EdnBuf(void);
|
||||
// public function :
|
||||
void GetAll( EdnVectorBin<int8_t> &text);
|
||||
void SetAll( EdnVectorBin<int8_t> &text);
|
||||
void GetRange( int32_t start, int32_t end, EdnVectorBin<int8_t> &output);
|
||||
void GetAll( Edn::VectorType<int8_t> &text);
|
||||
void SetAll( Edn::VectorType<int8_t> &text);
|
||||
void GetRange( int32_t start, int32_t end, Edn::VectorType<int8_t> &output);
|
||||
bool DumpIn( FILE *myFile);
|
||||
bool DumpFrom( FILE *myFile);
|
||||
// replace with operator [] ...
|
||||
int8_t operator[] (int32_t);
|
||||
void Insert( int32_t pos, EdnVectorBin<int8_t> &insertText);
|
||||
void Replace( int32_t start, int32_t end, EdnVectorBin<int8_t> &insertText);
|
||||
void Insert( int32_t pos, Edn::VectorType<int8_t> &insertText);
|
||||
void Replace( int32_t start, int32_t end, Edn::VectorType<int8_t> &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<int8_t> &text);
|
||||
void GetLineText( int32_t pos, Edn::VectorType<int8_t> &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<int8_t> &data);
|
||||
int32_t CountLines( Edn::VectorType<int8_t> &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<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive = true);
|
||||
bool SearchBackward( int32_t startPos, EdnVectorBin<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive = true);
|
||||
bool SearchForward( int32_t startPos, Edn::VectorType<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive = true);
|
||||
bool SearchBackward( int32_t startPos, Edn::VectorType<int8_t> &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<int8_t> &text);
|
||||
void GetSelectionText( selectionType_te select, Edn::VectorType<int8_t> &text);
|
||||
void RemoveSelected( selectionType_te select);
|
||||
void ReplaceSelected( selectionType_te select, EdnVectorBin<int8_t> &text);
|
||||
void ReplaceSelected( selectionType_te select, Edn::VectorType<int8_t> &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<EdnBufHistory*> m_historyUndo;
|
||||
EdnVectorBin<EdnBufHistory*> m_historyRedo;
|
||||
Edn::VectorType<EdnBufHistory*> m_historyUndo;
|
||||
Edn::VectorType<EdnBufHistory*> 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<int8_t> &deletedText);
|
||||
void eventModification( int32_t pos, int32_t nInserted, Edn::VectorType<int8_t> &deletedText);
|
||||
|
||||
|
||||
int32_t insert( int32_t pos, EdnVectorBin<int8_t> &insertText);
|
||||
int32_t insert( int32_t pos, Edn::VectorType<int8_t> &insertText);
|
||||
|
||||
bool charMatch( char first, char second, bool caseSensitive = true);
|
||||
};
|
||||
|
@ -39,7 +39,7 @@ EdnBufHistory::EdnBufHistory(void)
|
||||
m_nInserted = 0;
|
||||
}
|
||||
|
||||
EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin<int8_t> &deletedText)
|
||||
EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, Edn::VectorType<int8_t> &deletedText)
|
||||
{
|
||||
//EDN_INFO("EdnBufHistory new + data");
|
||||
m_pos = pos;
|
||||
@ -47,7 +47,7 @@ EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin<int8_t
|
||||
m_deletedText = deletedText;
|
||||
}
|
||||
|
||||
void EdnBufHistory::Set(int32_t pos, int32_t nInserted, EdnVectorBin<int8_t> &deletedText)
|
||||
void EdnBufHistory::Set(int32_t pos, int32_t nInserted, Edn::VectorType<int8_t> &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<int8_t> &deletedText)
|
||||
void EdnBufHistory::getData(Edn::VectorType<int8_t> &deletedText)
|
||||
{
|
||||
deletedText = m_deletedText;
|
||||
}
|
||||
|
@ -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<int8_t> &deletedText);
|
||||
EdnBufHistory(int32_t pos, int32_t nInserted, Edn::VectorType<int8_t> &deletedText);
|
||||
~EdnBufHistory(void);
|
||||
void Set(int32_t pos, int32_t nInserted, EdnVectorBin<int8_t> &deletedText);
|
||||
void Set(int32_t pos, int32_t nInserted, Edn::VectorType<int8_t> &deletedText);
|
||||
int32_t getPos(void);
|
||||
int32_t getnbDeleted(void);
|
||||
int32_t getnbInserted(void);
|
||||
void getData(EdnVectorBin<int8_t> &deletedText);
|
||||
void getData(Edn::VectorType<int8_t> &deletedText);
|
||||
private:
|
||||
int32_t m_pos;
|
||||
int32_t m_nInserted;
|
||||
EdnVectorBin<int8_t> m_deletedText;
|
||||
Edn::VectorType<int8_t> m_deletedText;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -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<int8_t> deletedText;
|
||||
Edn::VectorType<int8_t> 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<int8_t> deletedText;
|
||||
Edn::VectorType<int8_t> deletedText;
|
||||
m_historyRedo[nbElement]->getData(deletedText);
|
||||
m_isRedoProcessing = true;
|
||||
if (0 == nbInserted) {
|
||||
|
@ -136,7 +136,7 @@ bool EdnBuf::GetSelectionPos(selectionType_te select, int32_t &start, int32_t &e
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::GetSelectionText(selectionType_te select, EdnVectorBin<int8_t> &text)
|
||||
void EdnBuf::GetSelectionText(selectionType_te select, Edn::VectorType<int8_t> &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<int8_t> &text)
|
||||
void EdnBuf::ReplaceSelected(selectionType_te select, Edn::VectorType<int8_t> &text)
|
||||
{
|
||||
int32_t start, end, rectStart, rectEnd;
|
||||
bool isRect;
|
||||
|
@ -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<int32_t> plop;
|
||||
EdnVectorBin<int8_t> plop2;
|
||||
Edn::VectorType<int32_t> plop;
|
||||
Edn::VectorType<int8_t> plop2;
|
||||
|
||||
plop.PushBack(15365);
|
||||
plop.PushBack(1);
|
||||
|
@ -227,7 +227,7 @@ int8_t& EdnVectorBuf::Get(int32_t pos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, EdnVectorBin<int8_t> &tmpBuffer)
|
||||
void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, Edn::VectorType<int8_t> &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<int8_t>& items)
|
||||
void EdnVectorBuf::Insert(int32_t pos, Edn::VectorType<int8_t>& 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<int8_t>& items)
|
||||
void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, Edn::VectorType<int8_t>& items)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
@ -652,7 +652,7 @@ void TestEdnVectorBuf(void)
|
||||
myBufferTmp.Display();
|
||||
plop='m';
|
||||
|
||||
EdnVectorBin<int8_t> items;
|
||||
Edn::VectorType<int8_t> items;
|
||||
items.PushBack('i');
|
||||
items.PushBack('j');
|
||||
items.PushBack('k');
|
||||
|
@ -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<int8_t> &tmpBuffer);
|
||||
void Get( int32_t pos, int32_t nbElement, Edn::VectorType<int8_t> &tmpBuffer);
|
||||
// insert functions
|
||||
void PushBack( const int8_t& item);
|
||||
void Insert( int32_t pos, const int8_t& item);
|
||||
void Insert( int32_t pos, EdnVectorBin<int8_t>& items);
|
||||
void Insert( int32_t pos, Edn::VectorType<int8_t>& items);
|
||||
// Remove and insert functions
|
||||
void Replace( int32_t pos, const int8_t& item);
|
||||
void Replace( int32_t pos, int32_t nbRemoveElement, EdnVectorBin<int8_t>& items);
|
||||
void Replace( int32_t pos, int32_t nbRemoveElement, Edn::VectorType<int8_t>& items);
|
||||
// Revove fonctions
|
||||
void Remove( int32_t pos, int32_t nbRemoveElement = 1);
|
||||
void PopBack( void);
|
||||
|
@ -188,9 +188,9 @@ class MsgBroadcastCore: public Singleton<MsgBroadcastCore>
|
||||
void RmReceiver(MsgBroadcast * pointerOnReceiver);
|
||||
|
||||
private:
|
||||
EdnVectorBin<MsgBroadcast*> m_listMessage;
|
||||
Edn::VectorType<MsgBroadcast*> m_listMessage;
|
||||
uint32_t m_messageID;
|
||||
EdnVectorBin<messageElement_ts> m_listOfMessage;
|
||||
Edn::VectorType<messageElement_ts> m_listOfMessage;
|
||||
};
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "tools_debug.h"
|
||||
#include "toolsMemory.h"
|
||||
#include "EdnVectorBin.h"
|
||||
#include "VectorType.h"
|
||||
|
||||
|
||||
#include "String.h"
|
||||
|
@ -92,7 +92,7 @@ const int32_t constConvertionTableSize = sizeof(constConvertionTable) / sizeof(c
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void DisplayData(EdnVectorBin<char> &data)
|
||||
void DisplayData(Edn::VectorType<char> &data)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<(int32_t)data.Size() ; i++) {
|
||||
@ -110,7 +110,7 @@ void DisplayData(EdnVectorBin<char> &data)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void DisplayElem(EdnVectorBin<int16_t> &data, int32_t start, int32_t stop)
|
||||
void DisplayElem(Edn::VectorType<int16_t> &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<int16_t> &data, int32_t startPos)
|
||||
int32_t GetLenOfPTheseElem(Edn::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
int32_t nbOpen = 0;
|
||||
@ -229,7 +229,7 @@ int32_t GetLenOfPTheseElem(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t GetLenOfPThese(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
int32_t GetLenOfPThese(Edn::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
int32_t nbOpen = 0;
|
||||
@ -282,7 +282,7 @@ int32_t GetLenOfPThese(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t GetLenOfBracket(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
int32_t GetLenOfBracket(Edn::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
// special case of the (...) or | ==> we search '|' or ')'
|
||||
@ -326,7 +326,7 @@ int32_t GetLenOfBracket(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t GetLenOfBrace(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
int32_t GetLenOfBrace(Edn::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
// special case of the (...) or | ==> we search '|' or ')'
|
||||
@ -370,7 +370,7 @@ int32_t GetLenOfBrace(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t GetLenOfNormal(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
int32_t GetLenOfNormal(Edn::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
|
||||
@ -427,7 +427,7 @@ int32_t GetLenOfNormal(EdnVectorBin<int16_t> &data, int32_t startPos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool ParseBrace(EdnVectorBin<int16_t> &data, int32_t &min, int32_t &max)
|
||||
bool ParseBrace(Edn::VectorType<int16_t> &data, int32_t &min, int32_t &max)
|
||||
{
|
||||
//EDN_INFO("parse {...} in "; DisplayElem(data); );
|
||||
int32_t k=0;
|
||||
|
@ -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<char> &data);
|
||||
void DisplayElem(EdnVectorBin<int16_t> &data, int32_t start=0, int32_t stop=0x7FFFFFFF);
|
||||
void DisplayData(Edn::VectorType<char> &data);
|
||||
void DisplayElem(Edn::VectorType<int16_t> &data, int32_t start=0, int32_t stop=0x7FFFFFFF);
|
||||
char * levelSpace(int32_t level);
|
||||
int32_t GetLenOfPTheseElem(EdnVectorBin<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfPThese(EdnVectorBin<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfBracket(EdnVectorBin<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfBrace(EdnVectorBin<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfNormal(EdnVectorBin<int16_t> &data, int32_t startPos);
|
||||
bool ParseBrace(EdnVectorBin<int16_t> &data, int32_t &min, int32_t &max);
|
||||
int32_t GetLenOfPTheseElem(Edn::VectorType<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfPThese(Edn::VectorType<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfBracket(Edn::VectorType<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfBrace(Edn::VectorType<int16_t> &data, int32_t startPos);
|
||||
int32_t GetLenOfNormal(Edn::VectorType<int16_t> &data, int32_t startPos);
|
||||
bool ParseBrace(Edn::VectorType<int16_t> &data, int32_t &min, int32_t &max);
|
||||
|
||||
|
||||
#undef __class__
|
||||
@ -134,7 +134,7 @@ template<class CLASS_TYPE> class RegExpNode{
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
virtual int32_t Generate(EdnVectorBin<int16_t> &data, int32_t startPos, int32_t nbElement)
|
||||
virtual int32_t Generate(Edn::VectorType<int16_t> &data, int32_t startPos, int32_t nbElement)
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
@ -194,7 +194,7 @@ template<class CLASS_TYPE> class RegExpNode{
|
||||
int32_t m_multipleMin; //!< minimum repetition (included)
|
||||
int32_t m_multipleMax; //!< maximum repetition (included)
|
||||
// Data Section ... (can have no data...)
|
||||
EdnVectorBin<int16_t> m_RegExpData; //!< data to parse and compare in some case ...
|
||||
Edn::VectorType<int16_t> m_RegExpData; //!< data to parse and compare in some case ...
|
||||
};
|
||||
|
||||
#undef __class__
|
||||
@ -228,7 +228,7 @@ template<class CLASS_TYPE> class RegExpNodeValue : public RegExpNode<CLASS_TYPE>
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
int32_t Generate(EdnVectorBin<int16_t> &data)
|
||||
int32_t Generate(Edn::VectorType<int16_t> &data)
|
||||
{
|
||||
RegExpNode<CLASS_TYPE>::m_RegExpData = data;
|
||||
//EDN_DEBUG("Request Parse \"Value\" data="; DisplayElem(RegExpNode<CLASS_TYPE>::m_RegExpData););
|
||||
@ -298,7 +298,7 @@ template<class CLASS_TYPE> class RegExpNodeValue : public RegExpNode<CLASS_TYPE>
|
||||
};
|
||||
protected :
|
||||
// SubNodes :
|
||||
EdnVectorBin<char> m_data;
|
||||
Edn::VectorType<char> m_data;
|
||||
};
|
||||
#undef __class__
|
||||
#define __class__ "RegExpNodeBracket"
|
||||
@ -331,7 +331,7 @@ template<class CLASS_TYPE> class RegExpNodeBracket : public RegExpNode<CLASS_TYP
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
int32_t Generate(EdnVectorBin<int16_t> &data)
|
||||
int32_t Generate(Edn::VectorType<int16_t> &data)
|
||||
{
|
||||
RegExpNode<CLASS_TYPE>::m_RegExpData = data;
|
||||
//EDN_DEBUG("Request Parse [...] data="; DisplayElem(RegExpNode<CLASS_TYPE>::m_RegExpData););
|
||||
@ -416,7 +416,7 @@ template<class CLASS_TYPE> class RegExpNodeBracket : public RegExpNode<CLASS_TYP
|
||||
};
|
||||
protected :
|
||||
// SubNodes :
|
||||
EdnVectorBin<char> m_data;
|
||||
Edn::VectorType<char> m_data;
|
||||
};
|
||||
#undef __class__
|
||||
#define __class__ "RegExpNodeDigit"
|
||||
@ -1206,14 +1206,14 @@ template<class CLASS_TYPE> class RegExpNodePTheseElem : public RegExpNode<CLASS_
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
int32_t Generate(EdnVectorBin<int16_t> &data)
|
||||
int32_t Generate(Edn::VectorType<int16_t> &data)
|
||||
{
|
||||
RegExpNode<CLASS_TYPE>::m_RegExpData = data;
|
||||
//EDN_DEBUG("Request Parse (elem) data="; DisplayElem(RegExpNode<CLASS_TYPE>::m_RegExpData););
|
||||
|
||||
int32_t pos = 0;
|
||||
int32_t elementSize = 0;
|
||||
EdnVectorBin<int16_t> tmpData;
|
||||
Edn::VectorType<int16_t> tmpData;
|
||||
while (pos < RegExpNode<CLASS_TYPE>::m_RegExpData.Size()) {
|
||||
tmpData.Clear();
|
||||
switch (RegExpNode<CLASS_TYPE>::m_RegExpData[pos])
|
||||
@ -1399,7 +1399,7 @@ template<class CLASS_TYPE> class RegExpNodePTheseElem : public RegExpNode<CLASS_
|
||||
};
|
||||
protected :
|
||||
// SubNodes :
|
||||
EdnVectorBin<RegExpNode<CLASS_TYPE>*> m_subNode;
|
||||
Edn::VectorType<RegExpNode<CLASS_TYPE>*> m_subNode;
|
||||
private :
|
||||
/**
|
||||
* @brief Set the number of repeate time on a the last node in the list ...
|
||||
@ -1456,7 +1456,7 @@ template<class CLASS_TYPE> class RegExpNodePThese : public RegExpNode<CLASS_TYPE
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
int32_t Generate(EdnVectorBin<int16_t> &data)
|
||||
int32_t Generate(Edn::VectorType<int16_t> &data)
|
||||
{
|
||||
RegExpNode<CLASS_TYPE>::m_RegExpData = data;
|
||||
//EDN_DEBUG("Request Parse (...) data="; DisplayElem(RegExpNode<CLASS_TYPE>::m_RegExpData););
|
||||
@ -1466,7 +1466,7 @@ template<class CLASS_TYPE> class RegExpNodePThese : public RegExpNode<CLASS_TYPE
|
||||
// generate all the "elemTypePTheseElem" of the Node
|
||||
while (elementSize>0) {
|
||||
// geerate output deta ...
|
||||
EdnVectorBin<int16_t> tmpData;
|
||||
Edn::VectorType<int16_t> tmpData;
|
||||
for (int32_t k=pos; k<pos+elementSize; k++) {
|
||||
tmpData.PushBack(RegExpNode<CLASS_TYPE>::m_RegExpData[k]);
|
||||
}
|
||||
@ -1542,7 +1542,7 @@ template<class CLASS_TYPE> class RegExpNodePThese : public RegExpNode<CLASS_TYPE
|
||||
|
||||
protected :
|
||||
// SubNodes :
|
||||
EdnVectorBin<RegExpNode<CLASS_TYPE>*> m_subNode;
|
||||
Edn::VectorType<RegExpNode<CLASS_TYPE>*> m_subNode;
|
||||
//int32_t m_posPthese; //!< position of the element is detected in the output element
|
||||
};
|
||||
#undef __class__
|
||||
@ -1629,7 +1629,7 @@ template<class CLASS_TYPE> class EdnRegExp {
|
||||
void SetRegExp(Edn::String &expressionRequested)
|
||||
{
|
||||
m_expressionRequested = expressionRequested; // TODO : Must be deprecated ...
|
||||
EdnVectorBin<int16_t> tmpExp;
|
||||
Edn::VectorType<int16_t> tmpExp;
|
||||
|
||||
//EDN_DEBUG("Parse RegExp : " << expressionRequested.c_str() );
|
||||
m_isOk = false;
|
||||
@ -1905,7 +1905,7 @@ template<class CLASS_TYPE> class EdnRegExp {
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
bool CheckGoodPosition(EdnVectorBin<int16_t> tmpExp, int32_t &pos)
|
||||
bool CheckGoodPosition(Edn::VectorType<int16_t> tmpExp, int32_t &pos)
|
||||
{
|
||||
int16_t curentCode = tmpExp[pos];
|
||||
int16_t endCode = OPCODE_PTHESE_OUT;
|
||||
@ -2010,7 +2010,7 @@ template<class CLASS_TYPE> class EdnRegExp {
|
||||
* @param[in,out]
|
||||
* @return
|
||||
*/
|
||||
bool CheckGoodPosition(EdnVectorBin<int16_t> tmpExp)
|
||||
bool CheckGoodPosition(Edn::VectorType<int16_t> tmpExp)
|
||||
{
|
||||
int32_t pos = 0;
|
||||
while (pos < (int32_t)tmpExp.Size()) {
|
||||
|
@ -205,7 +205,7 @@ const Edn::String& Edn::String::operator= (const char * inputData)
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
const Edn::String& Edn::String::operator= (EdnVectorBin<int8_t> inputData)
|
||||
const Edn::String& Edn::String::operator= (Edn::VectorType<int8_t> 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<int8_t> Edn::String::GetVector(void)
|
||||
Edn::VectorType<int8_t> Edn::String::GetVector(void)
|
||||
{
|
||||
EdnVectorBin<int8_t> out = m_data;
|
||||
Edn::VectorType<int8_t> 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<int8_t> vb1;
|
||||
Edn::VectorType<int8_t> vb1;
|
||||
vb1.PushBack('v');
|
||||
vb1.PushBack('b');
|
||||
vb1.PushBack('1');
|
||||
|
@ -45,7 +45,7 @@ namespace Edn
|
||||
|
||||
const Edn::String& operator= (const Edn::String &ednS ); // assigment
|
||||
const Edn::String& operator= (const char * inputData);
|
||||
const Edn::String& operator= (EdnVectorBin<int8_t> inputData);
|
||||
const Edn::String& operator= (Edn::VectorType<int8_t> inputData);
|
||||
bool operator== (const Edn::String& ednS) const; // == operator
|
||||
bool operator== (const char * inputData) const;
|
||||
bool operator!= (const Edn::String& ednS) const; // != operator
|
||||
@ -56,7 +56,6 @@ namespace Edn
|
||||
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<int8_t> GetVector(void);
|
||||
Edn::VectorType<int8_t> 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<int8_t> m_data;
|
||||
Edn::VectorType<int8_t> m_data;
|
||||
};
|
||||
|
||||
void TestUntaire_String(void);
|
||||
|
@ -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<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
|
||||
namespace Edn
|
||||
{
|
||||
|
||||
template<typename MY_TYPE=int32_t> class VectorType
|
||||
{
|
||||
public:
|
||||
class Iterator
|
||||
{
|
||||
// Private data :
|
||||
private:
|
||||
int32_t m_current; // curent Id on the vector
|
||||
EdnVectorBin<MY_TYPE> * m_EdnVectorBin; // Pointer on the curent element of the vectorBin
|
||||
int32_t m_current; //!< curent Id on the vector
|
||||
VectorType<MY_TYPE> * 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<typename MY_TYPE=int32_t> 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<typename MY_TYPE=int32_t> 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<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
~Iterator()
|
||||
{
|
||||
m_current = -1;
|
||||
m_EdnVectorBin = NULL;
|
||||
m_VectorType = NULL;
|
||||
}
|
||||
/**
|
||||
* @brief basic boolean cast
|
||||
@ -120,7 +124,7 @@ template<typename MY_TYPE=int32_t> 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<typename MY_TYPE=int32_t> 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<typename MY_TYPE=int32_t> 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<typename MY_TYPE=int32_t> 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,13 +202,13 @@ template<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Iterator(EdnVectorBin<MY_TYPE> * Evb, int32_t pos):
|
||||
Iterator(VectorType<MY_TYPE> * Evb, int32_t pos):
|
||||
m_current(pos),
|
||||
m_EdnVectorBin(Evb)
|
||||
m_VectorType(Evb)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
friend class EdnVectorBin;
|
||||
friend class VectorType;
|
||||
};
|
||||
|
||||
private:
|
||||
@ -217,7 +221,7 @@ template<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
* @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,7 +234,7 @@ template<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
* @brief Re-copy constructor (copy all needed data)
|
||||
* @param[in] Evb Vector that might be copy
|
||||
*/
|
||||
EdnVectorBin(const EdnVectorBin<MY_TYPE> & Evb)
|
||||
VectorType(const Edn::VectorType<MY_TYPE> & Evb)
|
||||
{
|
||||
m_allocated = Evb.m_allocated;
|
||||
m_size = Evb.m_size;
|
||||
@ -247,7 +251,7 @@ template<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
/**
|
||||
* @brief Destructor of the current Class
|
||||
*/
|
||||
~EdnVectorBin()
|
||||
~VectorType()
|
||||
{
|
||||
if (NULL!=m_data) {
|
||||
EDN_FREE(m_data);
|
||||
@ -263,7 +267,7 @@ template<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
* @param[in] Evb Vector that might be copy
|
||||
* @return reference on the curent re-copy vector
|
||||
*/
|
||||
EdnVectorBin& operator=(const EdnVectorBin<MY_TYPE> & Evb)
|
||||
VectorType& operator=(const Edn::VectorType<MY_TYPE> & 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<typename MY_TYPE=int32_t> 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<MY_TYPE> & Evb) // += operator
|
||||
VectorType& operator+= (const Edn::VectorType<MY_TYPE> & Evb) // += operator
|
||||
{
|
||||
int32_t nbElememt = Evb.Size();
|
||||
int32_t idx = m_size;
|
||||
@ -502,9 +506,9 @@ template<typename MY_TYPE=int32_t> 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<MY_TYPE> out;
|
||||
VectorType<MY_TYPE> out;
|
||||
if (posStart < 0) {
|
||||
posStart = 0;
|
||||
} else if (posStart >= Size() ) {
|
||||
@ -633,8 +637,8 @@ template<typename MY_TYPE=int32_t> class EdnVectorBin
|
||||
// set the new allocation size
|
||||
m_allocated = requestSize;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#undef __class__
|
||||
#define __class__ NULL
|
@ -101,14 +101,14 @@ void convertUnicodeToIso(charset_te inputCharset, int32_t input_Unicode, char &
|
||||
}
|
||||
|
||||
|
||||
int32_t convertIsoToUnicode(charset_te inputCharset, EdnVectorBin<char>& input_ISO, EdnVectorBin<int32_t>& output_Unicode)
|
||||
int32_t convertIsoToUnicode(charset_te inputCharset, Edn::VectorType<char>& input_ISO, Edn::VectorType<int32_t>& output_Unicode)
|
||||
{
|
||||
EDN_WARNING("TODO : not coded...");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin<int32_t>& input_Unicode, EdnVectorBin<char>& output_ISO)
|
||||
int32_t convertUnicodeToIso(charset_te inputCharset, Edn::VectorType<int32_t>& input_Unicode, Edn::VectorType<char>& 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<int32_t>& input_Unicode, EdnVectorBin<char>& output_UTF8)
|
||||
int32_t convertUnicodeToUtf8(Edn::VectorType<int32_t>& input_Unicode, Edn::VectorType<char>& output_UTF8)
|
||||
{
|
||||
EDN_WARNING("TODO : not coded...");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32_t convertUtf8ToUnicode(EdnVectorBin<char>& input_UTF8, EdnVectorBin<int32_t>& output_Unicode)
|
||||
int32_t convertUtf8ToUnicode(Edn::VectorType<char>& input_UTF8, Edn::VectorType<int32_t>& 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<char>& input_ISO, EdnVectorBin<char>& output_UTF8)
|
||||
int32_t convertIsoToUtf8(charset_te inputCharset, Edn::VectorType<char>& input_ISO, Edn::VectorType<char>& output_UTF8)
|
||||
{
|
||||
EDN_WARNING("TODO : not coded...");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32_t convertUtf8ToIso(charset_te inputCharset, EdnVectorBin<char>& input_UTF8, EdnVectorBin<char>& output_ISO)
|
||||
int32_t convertUtf8ToIso(charset_te inputCharset, Edn::VectorType<char>& input_UTF8, Edn::VectorType<char>& output_ISO)
|
||||
{
|
||||
EDN_WARNING("TODO : not coded...");
|
||||
return 0;
|
||||
|
@ -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<char>& input_ISO, EdnVectorBin<int32_t>& output_Unicode);
|
||||
int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin<int32_t>& input_Unicode, EdnVectorBin<char>& output_ISO);
|
||||
int32_t convertIsoToUnicode(charset_te inputCharset, Edn::VectorType<char>& input_ISO, Edn::VectorType<int32_t>& output_Unicode);
|
||||
int32_t convertUnicodeToIso(charset_te inputCharset, Edn::VectorType<int32_t>& input_Unicode, Edn::VectorType<char>& 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<int32_t>& input_Unicode, EdnVectorBin<char>& output_UTF8);
|
||||
int32_t convertUtf8ToUnicode( EdnVectorBin<char>& input_UTF8, EdnVectorBin<int32_t>& output_Unicode);
|
||||
int32_t convertUnicodeToUtf8( Edn::VectorType<int32_t>& input_Unicode, Edn::VectorType<char>& output_UTF8);
|
||||
int32_t convertUtf8ToUnicode( Edn::VectorType<char>& input_UTF8, Edn::VectorType<int32_t>& 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<char>& input_ISO, EdnVectorBin<char>& output_UTF8);
|
||||
int32_t convertUtf8ToIso( charset_te inputCharset, EdnVectorBin<char>& input_UTF8, EdnVectorBin<char>& output_ISO);
|
||||
int32_t convertIsoToUtf8( charset_te inputCharset, Edn::VectorType<char>& input_ISO, Edn::VectorType<char>& output_UTF8);
|
||||
int32_t convertUtf8ToIso( charset_te inputCharset, Edn::VectorType<char>& input_UTF8, Edn::VectorType<char>& output_ISO);
|
||||
|
||||
void Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid);
|
||||
int32_t strUtf8Len(const char *input_UTF8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user