From fa25024b32ba8cc054685cbdee821ba40f92391d Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sat, 10 Nov 2012 14:43:01 +0100 Subject: [PATCH] [TREE] try to rework the tree of the librairie --- .gitmodules | 51 +- Build | 1 - CreateTagEwol.sh | 4 - Sources/Android.mk | 58 +- Sources/{libewol => }/Config.in | 0 Sources/{libewol => }/ConfigAndroid.in | 0 Sources/{libewol => }/Linux.mk | 0 Sources/{libewol => }/Windows.mk | 0 Sources/{libewol => }/ewol/ClipBoard.cpp | 0 Sources/{libewol => }/ewol/ClipBoard.h | 0 Sources/{libewol => }/ewol/Debug.cpp | 0 Sources/{libewol => }/ewol/Debug.h | 0 Sources/{libewol => }/ewol/Mesh/Mesh.cpp | 0 Sources/{libewol => }/ewol/Mesh/Mesh.h | 0 Sources/{libewol => }/ewol/Mesh/MeshObj.cpp | 0 Sources/{libewol => }/ewol/Mesh/MeshObj.h | 0 Sources/{libewol => }/ewol/Resource.h | 0 .../{libewol => }/ewol/ResourceManager.cpp | 0 Sources/{libewol => }/ewol/ResourceManager.h | 0 .../{libewol => }/ewol/ShortCutManager.cpp | 0 Sources/{libewol => }/ewol/ShortCutManager.h | 0 .../{libewol => }/ewol/SimpleConfigFile.cpp | 0 Sources/{libewol => }/ewol/SimpleConfigFile.h | 0 Sources/{libewol => }/ewol/audio/audio.cpp | 0 Sources/{libewol => }/ewol/audio/audio.h | 0 Sources/{libewol => }/ewol/audio/decWav.cpp | 0 Sources/{libewol => }/ewol/audio/decWav.h | 0 .../ewol/audio/interfacePortAudio.cpp | 0 .../ewol/audio/interfacePortAudio.h | 0 .../{libewol => }/ewol/eObject/EObject.cpp | 0 Sources/{libewol => }/ewol/eObject/EObject.h | 0 .../ewol/eObject/EObjectManager.cpp | 0 .../ewol/eObject/EObjectManager.h | 0 Sources/{libewol => }/ewol/ewol.cpp | 0 Sources/{libewol => }/ewol/ewol.h | 0 .../ewol/font/DistantFieldFont.cpp | 0 .../ewol/font/DistantFieldFont.h | 0 Sources/{libewol => }/ewol/font/Font.h | 0 .../{libewol => }/ewol/font/FontFreeType.cpp | 0 .../{libewol => }/ewol/font/FontFreeType.h | 0 .../{libewol => }/ewol/font/FontManager.cpp | 0 Sources/{libewol => }/ewol/font/FontManager.h | 0 .../{libewol => }/ewol/font/TexturedFont.cpp | 0 .../{libewol => }/ewol/font/TexturedFont.h | 0 .../{libewol => }/ewol/game/GameElement.cpp | 0 Sources/{libewol => }/ewol/game/GameElement.h | 0 .../ewol/game/GameElementLua.cpp | 0 .../{libewol => }/ewol/game/GameElementLua.h | 0 .../{libewol => }/ewol/game/SceneElement.cpp | 0 .../{libewol => }/ewol/game/SceneElement.h | 0 .../{libewol => }/ewol/oObject/2DColored.cpp | 0 .../{libewol => }/ewol/oObject/2DColored.h | 0 .../ewol/oObject/2DTextColored.cpp | 0 .../ewol/oObject/2DTextColored.h | 0 .../ewol/oObject/2DTextShader.cpp | 0 .../{libewol => }/ewol/oObject/2DTextShader.h | 0 .../{libewol => }/ewol/oObject/2DTextured.cpp | 0 .../{libewol => }/ewol/oObject/2DTextured.h | 0 .../{libewol => }/ewol/oObject/3DTextured.cpp | 0 .../{libewol => }/ewol/oObject/3DTextured.h | 0 .../{libewol => }/ewol/oObject/OObject.cpp | 0 Sources/{libewol => }/ewol/oObject/OObject.h | 0 Sources/{libewol => }/ewol/oObject/Sprite.cpp | 0 Sources/{libewol => }/ewol/oObject/Sprite.h | 0 Sources/{libewol => }/ewol/openGL/Program.cpp | 0 Sources/{libewol => }/ewol/openGL/Program.h | 0 Sources/{libewol => }/ewol/openGL/Shader.cpp | 0 Sources/{libewol => }/ewol/openGL/Shader.h | 0 .../ewol/openGL/VirtualBufferObject.cpp | 0 .../ewol/openGL/VirtualBufferObject.h | 0 Sources/{libewol => }/ewol/openGL/openGL.cpp | 0 Sources/{libewol => }/ewol/openGL/openGL.h | 0 Sources/{libewol => }/ewol/os/Fps.h | 0 Sources/{libewol => }/ewol/os/eSystem.cpp | 0 Sources/{libewol => }/ewol/os/eSystem.h | 0 .../{libewol => }/ewol/os/eSystemInput.cpp | 0 Sources/{libewol => }/ewol/os/eSystemInput.h | 0 .../ewol/os/gui.Android.base.cpp | 0 Sources/{libewol => }/ewol/os/gui.Android.cpp | 0 Sources/{libewol => }/ewol/os/gui.Example.cpp | 0 Sources/{libewol => }/ewol/os/gui.IOs.cpp | 0 Sources/{libewol => }/ewol/os/gui.MacOs.cpp | 0 Sources/{libewol => }/ewol/os/gui.Windows.cpp | 0 Sources/{libewol => }/ewol/os/gui.X11.cpp | 0 Sources/{libewol => }/ewol/os/gui.h | 0 .../{libewol => }/ewol/texture/Texture.cpp | 0 Sources/{libewol => }/ewol/texture/Texture.h | 0 .../{libewol => }/ewol/texture/TextureBMP.cpp | 0 .../{libewol => }/ewol/texture/TextureBMP.h | 0 .../ewol/texture/TextureFile.cpp | 0 .../{libewol => }/ewol/texture/TextureFile.h | 0 .../{libewol => }/ewol/texture/TexturePNG.cpp | 0 .../{libewol => }/ewol/texture/TexturePNG.h | 0 .../{libewol => }/ewol/texture/TextureSVG.cpp | 0 .../{libewol => }/ewol/texture/TextureSVG.h | 0 Sources/{libewol => }/ewol/widget/Button.cpp | 0 Sources/{libewol => }/ewol/widget/Button.h | 0 .../{libewol => }/ewol/widget/ButtonColor.cpp | 0 .../{libewol => }/ewol/widget/ButtonColor.h | 0 .../{libewol => }/ewol/widget/ButtonImage.cpp | 0 .../{libewol => }/ewol/widget/ButtonImage.h | 0 .../{libewol => }/ewol/widget/CheckBox.cpp | 0 Sources/{libewol => }/ewol/widget/CheckBox.h | 0 .../{libewol => }/ewol/widget/ColorBar.cpp | 0 Sources/{libewol => }/ewol/widget/ColorBar.h | 0 .../{libewol => }/ewol/widget/ContextMenu.cpp | 0 .../{libewol => }/ewol/widget/ContextMenu.h | 0 .../{libewol => }/ewol/widget/Drawable.cpp | 0 Sources/{libewol => }/ewol/widget/Drawable.h | 0 Sources/{libewol => }/ewol/widget/Entry.cpp | 0 Sources/{libewol => }/ewol/widget/Entry.h | 0 Sources/{libewol => }/ewol/widget/Image.cpp | 0 Sources/{libewol => }/ewol/widget/Image.h | 0 .../{libewol => }/ewol/widget/Joystick.cpp | 0 Sources/{libewol => }/ewol/widget/Joystick.h | 0 Sources/{libewol => }/ewol/widget/Label.cpp | 0 Sources/{libewol => }/ewol/widget/Label.h | 0 Sources/{libewol => }/ewol/widget/Layer.cpp | 0 Sources/{libewol => }/ewol/widget/Layer.h | 0 Sources/{libewol => }/ewol/widget/List.cpp | 0 Sources/{libewol => }/ewol/widget/List.h | 0 .../ewol/widget/ListFileSystem.cpp | 0 .../ewol/widget/ListFileSystem.h | 0 Sources/{libewol => }/ewol/widget/Menu.cpp | 0 Sources/{libewol => }/ewol/widget/Menu.h | 0 Sources/{libewol => }/ewol/widget/PopUp.cpp | 0 Sources/{libewol => }/ewol/widget/PopUp.h | 0 .../{libewol => }/ewol/widget/ProgressBar.cpp | 0 .../{libewol => }/ewol/widget/ProgressBar.h | 0 Sources/{libewol => }/ewol/widget/Scene.cpp | 0 Sources/{libewol => }/ewol/widget/Scene.h | 0 .../{libewol => }/ewol/widget/SizerHori.cpp | 0 Sources/{libewol => }/ewol/widget/SizerHori.h | 0 .../{libewol => }/ewol/widget/SizerVert.cpp | 0 Sources/{libewol => }/ewol/widget/SizerVert.h | 0 Sources/{libewol => }/ewol/widget/Slider.cpp | 0 Sources/{libewol => }/ewol/widget/Slider.h | 0 Sources/{libewol => }/ewol/widget/Spacer.cpp | 0 Sources/{libewol => }/ewol/widget/Spacer.h | 0 Sources/{libewol => }/ewol/widget/WSlider.cpp | 0 Sources/{libewol => }/ewol/widget/WSlider.h | 0 Sources/{libewol => }/ewol/widget/Widget.cpp | 0 Sources/{libewol => }/ewol/widget/Widget.h | 0 .../ewol/widget/WidgetManager.cpp | 0 .../{libewol => }/ewol/widget/WidgetManager.h | 0 .../ewol/widget/WidgetScrolled.cpp | 0 .../ewol/widget/WidgetScrolled.h | 0 Sources/{libewol => }/ewol/widget/Windows.cpp | 0 Sources/{libewol => }/ewol/widget/Windows.h | 0 .../ewol/widget/meta/ColorChooser.cpp | 0 .../ewol/widget/meta/ColorChooser.h | 0 .../ewol/widget/meta/FileChooser.cpp | 0 .../ewol/widget/meta/FileChooser.h | 0 .../ewol/widget/meta/Parameter.cpp | 0 .../ewol/widget/meta/Parameter.h | 0 .../ewol/widget/meta/ParameterList.cpp | 0 .../ewol/widget/meta/ParameterList.h | 0 .../ewol/widget/meta/StdPopUp.cpp | 0 .../{libewol => }/ewol/widget/meta/StdPopUp.h | 0 Sources/{libewol => }/file.mk | 0 {Java => Sources/java}/PROJECT_NAME.java | 0 .../java}/src/org/ewol/interfaceAudio.java | 0 .../java}/src/org/ewol/interfaceJNI.java | 0 .../java}/src/org/ewol/interfaceOpenGL.java | 0 .../src/org/ewol/interfaceSurfaceView.java | 0 Sources/libagg | 1 - Sources/libetk/Generic.mk | 28 - Sources/libetk/etk/Debug.cpp | 68 - Sources/libetk/etk/Debug.h | 86 - Sources/libetk/etk/DebugInternal.cpp | 9 - Sources/libetk/etk/DebugInternal.h | 28 - Sources/libetk/etk/MessageFifo.h | 104 - Sources/libetk/etk/RegExp.cpp | 403 ---- Sources/libetk/etk/RegExp.h | 2109 ----------------- Sources/libetk/etk/Stream.cpp | 15 - Sources/libetk/etk/Stream.h | 279 --- Sources/libetk/etk/Types.h | 69 - Sources/libetk/etk/UString.cpp | 574 ----- Sources/libetk/etk/UString.h | 141 -- Sources/libetk/etk/Vector.h | 776 ------ Sources/libetk/etk/math/Matrix.h | 347 --- Sources/libetk/etk/math/Matrix4.cpp | 84 - Sources/libetk/etk/math/Matrix4.h | 213 -- Sources/libetk/etk/math/Plane.h | 231 -- Sources/libetk/etk/math/Vector2D.h | 242 -- Sources/libetk/etk/math/Vector3D.h | 404 ---- Sources/libetk/etk/math/Vector4D.h | 189 -- Sources/libetk/etk/math/math.h | 20 - Sources/libetk/etk/os/FSNode.cpp | 1291 ---------- Sources/libetk/etk/os/FSNode.h | 230 -- Sources/libetk/etk/os/FSNodeRight.cpp | 236 -- Sources/libetk/etk/os/FSNodeRight.h | 58 - Sources/libetk/etk/os/Memory.cpp | 35 - Sources/libetk/etk/os/Memory.h | 80 - Sources/libetk/etk/os/Mutex.Generic.cpp | 44 - Sources/libetk/etk/os/Mutex.Windows.cpp | 40 - Sources/libetk/etk/os/Mutex.h | 40 - Sources/libetk/etk/os/Semaphore.Generic.cpp | 96 - Sources/libetk/etk/os/Semaphore.Windows.cpp | 54 - Sources/libetk/etk/os/Semaphore.cpp | 0 Sources/libetk/etk/os/Semaphore.h | 45 - Sources/libetk/etk/tool.cpp | 135 -- Sources/libetk/etk/tool.h | 25 - Sources/libetk/etk/unicode.cpp | 763 ------ Sources/libetk/etk/unicode.h | 59 - Sources/libetk/etk/unicodeTable.cpp | 282 --- Sources/libetk/etk/unicodeTable.h | 34 - Sources/libetk/file.mk | 32 - Sources/libewol/Android.mk | 58 - Sources/libewol/licence_BSD.txt | 35 - Sources/libfreetype | 1 - Sources/libglew/glew | 1 - Sources/liblua | 1 - Sources/libogg | 1 - Sources/libparsersvg | 1 - Sources/libpng | 1 - Sources/libportaudio | 1 - Sources/libtinyxml | 1 - Sources/libz/zlib | 1 - Sources/libzip | 1 - Sources/{libewol => }/tag | 0 avancement.boo | 39 - {Sources/libglew => external/glew}/Windows.mk | 0 {Sources/libz => external/z}/Generic.mk | 0 {Sources/libz => external/z}/Windows.mk | 0 {Sources/libz => external/z}/file.mk | 0 Sources/libetk/licence_BSD.txt => license.txt | 0 tutorial.boo | 59 - 228 files changed, 84 insertions(+), 10230 deletions(-) delete mode 160000 Build delete mode 100755 CreateTagEwol.sh rename Sources/{libewol => }/Config.in (100%) rename Sources/{libewol => }/ConfigAndroid.in (100%) rename Sources/{libewol => }/Linux.mk (100%) rename Sources/{libewol => }/Windows.mk (100%) rename Sources/{libewol => }/ewol/ClipBoard.cpp (100%) rename Sources/{libewol => }/ewol/ClipBoard.h (100%) rename Sources/{libewol => }/ewol/Debug.cpp (100%) rename Sources/{libewol => }/ewol/Debug.h (100%) rename Sources/{libewol => }/ewol/Mesh/Mesh.cpp (100%) rename Sources/{libewol => }/ewol/Mesh/Mesh.h (100%) rename Sources/{libewol => }/ewol/Mesh/MeshObj.cpp (100%) rename Sources/{libewol => }/ewol/Mesh/MeshObj.h (100%) rename Sources/{libewol => }/ewol/Resource.h (100%) rename Sources/{libewol => }/ewol/ResourceManager.cpp (100%) rename Sources/{libewol => }/ewol/ResourceManager.h (100%) rename Sources/{libewol => }/ewol/ShortCutManager.cpp (100%) rename Sources/{libewol => }/ewol/ShortCutManager.h (100%) rename Sources/{libewol => }/ewol/SimpleConfigFile.cpp (100%) rename Sources/{libewol => }/ewol/SimpleConfigFile.h (100%) rename Sources/{libewol => }/ewol/audio/audio.cpp (100%) rename Sources/{libewol => }/ewol/audio/audio.h (100%) rename Sources/{libewol => }/ewol/audio/decWav.cpp (100%) rename Sources/{libewol => }/ewol/audio/decWav.h (100%) rename Sources/{libewol => }/ewol/audio/interfacePortAudio.cpp (100%) rename Sources/{libewol => }/ewol/audio/interfacePortAudio.h (100%) rename Sources/{libewol => }/ewol/eObject/EObject.cpp (100%) rename Sources/{libewol => }/ewol/eObject/EObject.h (100%) rename Sources/{libewol => }/ewol/eObject/EObjectManager.cpp (100%) rename Sources/{libewol => }/ewol/eObject/EObjectManager.h (100%) rename Sources/{libewol => }/ewol/ewol.cpp (100%) rename Sources/{libewol => }/ewol/ewol.h (100%) rename Sources/{libewol => }/ewol/font/DistantFieldFont.cpp (100%) rename Sources/{libewol => }/ewol/font/DistantFieldFont.h (100%) rename Sources/{libewol => }/ewol/font/Font.h (100%) rename Sources/{libewol => }/ewol/font/FontFreeType.cpp (100%) rename Sources/{libewol => }/ewol/font/FontFreeType.h (100%) rename Sources/{libewol => }/ewol/font/FontManager.cpp (100%) rename Sources/{libewol => }/ewol/font/FontManager.h (100%) rename Sources/{libewol => }/ewol/font/TexturedFont.cpp (100%) rename Sources/{libewol => }/ewol/font/TexturedFont.h (100%) rename Sources/{libewol => }/ewol/game/GameElement.cpp (100%) rename Sources/{libewol => }/ewol/game/GameElement.h (100%) rename Sources/{libewol => }/ewol/game/GameElementLua.cpp (100%) rename Sources/{libewol => }/ewol/game/GameElementLua.h (100%) rename Sources/{libewol => }/ewol/game/SceneElement.cpp (100%) rename Sources/{libewol => }/ewol/game/SceneElement.h (100%) rename Sources/{libewol => }/ewol/oObject/2DColored.cpp (100%) rename Sources/{libewol => }/ewol/oObject/2DColored.h (100%) rename Sources/{libewol => }/ewol/oObject/2DTextColored.cpp (100%) rename Sources/{libewol => }/ewol/oObject/2DTextColored.h (100%) rename Sources/{libewol => }/ewol/oObject/2DTextShader.cpp (100%) rename Sources/{libewol => }/ewol/oObject/2DTextShader.h (100%) rename Sources/{libewol => }/ewol/oObject/2DTextured.cpp (100%) rename Sources/{libewol => }/ewol/oObject/2DTextured.h (100%) rename Sources/{libewol => }/ewol/oObject/3DTextured.cpp (100%) rename Sources/{libewol => }/ewol/oObject/3DTextured.h (100%) rename Sources/{libewol => }/ewol/oObject/OObject.cpp (100%) rename Sources/{libewol => }/ewol/oObject/OObject.h (100%) rename Sources/{libewol => }/ewol/oObject/Sprite.cpp (100%) rename Sources/{libewol => }/ewol/oObject/Sprite.h (100%) rename Sources/{libewol => }/ewol/openGL/Program.cpp (100%) rename Sources/{libewol => }/ewol/openGL/Program.h (100%) rename Sources/{libewol => }/ewol/openGL/Shader.cpp (100%) rename Sources/{libewol => }/ewol/openGL/Shader.h (100%) rename Sources/{libewol => }/ewol/openGL/VirtualBufferObject.cpp (100%) rename Sources/{libewol => }/ewol/openGL/VirtualBufferObject.h (100%) rename Sources/{libewol => }/ewol/openGL/openGL.cpp (100%) rename Sources/{libewol => }/ewol/openGL/openGL.h (100%) rename Sources/{libewol => }/ewol/os/Fps.h (100%) rename Sources/{libewol => }/ewol/os/eSystem.cpp (100%) rename Sources/{libewol => }/ewol/os/eSystem.h (100%) rename Sources/{libewol => }/ewol/os/eSystemInput.cpp (100%) rename Sources/{libewol => }/ewol/os/eSystemInput.h (100%) rename Sources/{libewol => }/ewol/os/gui.Android.base.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.Android.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.Example.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.IOs.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.MacOs.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.Windows.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.X11.cpp (100%) rename Sources/{libewol => }/ewol/os/gui.h (100%) rename Sources/{libewol => }/ewol/texture/Texture.cpp (100%) rename Sources/{libewol => }/ewol/texture/Texture.h (100%) rename Sources/{libewol => }/ewol/texture/TextureBMP.cpp (100%) rename Sources/{libewol => }/ewol/texture/TextureBMP.h (100%) rename Sources/{libewol => }/ewol/texture/TextureFile.cpp (100%) rename Sources/{libewol => }/ewol/texture/TextureFile.h (100%) rename Sources/{libewol => }/ewol/texture/TexturePNG.cpp (100%) rename Sources/{libewol => }/ewol/texture/TexturePNG.h (100%) rename Sources/{libewol => }/ewol/texture/TextureSVG.cpp (100%) rename Sources/{libewol => }/ewol/texture/TextureSVG.h (100%) rename Sources/{libewol => }/ewol/widget/Button.cpp (100%) rename Sources/{libewol => }/ewol/widget/Button.h (100%) rename Sources/{libewol => }/ewol/widget/ButtonColor.cpp (100%) rename Sources/{libewol => }/ewol/widget/ButtonColor.h (100%) rename Sources/{libewol => }/ewol/widget/ButtonImage.cpp (100%) rename Sources/{libewol => }/ewol/widget/ButtonImage.h (100%) rename Sources/{libewol => }/ewol/widget/CheckBox.cpp (100%) rename Sources/{libewol => }/ewol/widget/CheckBox.h (100%) rename Sources/{libewol => }/ewol/widget/ColorBar.cpp (100%) rename Sources/{libewol => }/ewol/widget/ColorBar.h (100%) rename Sources/{libewol => }/ewol/widget/ContextMenu.cpp (100%) rename Sources/{libewol => }/ewol/widget/ContextMenu.h (100%) rename Sources/{libewol => }/ewol/widget/Drawable.cpp (100%) rename Sources/{libewol => }/ewol/widget/Drawable.h (100%) rename Sources/{libewol => }/ewol/widget/Entry.cpp (100%) rename Sources/{libewol => }/ewol/widget/Entry.h (100%) rename Sources/{libewol => }/ewol/widget/Image.cpp (100%) rename Sources/{libewol => }/ewol/widget/Image.h (100%) rename Sources/{libewol => }/ewol/widget/Joystick.cpp (100%) rename Sources/{libewol => }/ewol/widget/Joystick.h (100%) rename Sources/{libewol => }/ewol/widget/Label.cpp (100%) rename Sources/{libewol => }/ewol/widget/Label.h (100%) rename Sources/{libewol => }/ewol/widget/Layer.cpp (100%) rename Sources/{libewol => }/ewol/widget/Layer.h (100%) rename Sources/{libewol => }/ewol/widget/List.cpp (100%) rename Sources/{libewol => }/ewol/widget/List.h (100%) rename Sources/{libewol => }/ewol/widget/ListFileSystem.cpp (100%) rename Sources/{libewol => }/ewol/widget/ListFileSystem.h (100%) rename Sources/{libewol => }/ewol/widget/Menu.cpp (100%) rename Sources/{libewol => }/ewol/widget/Menu.h (100%) rename Sources/{libewol => }/ewol/widget/PopUp.cpp (100%) rename Sources/{libewol => }/ewol/widget/PopUp.h (100%) rename Sources/{libewol => }/ewol/widget/ProgressBar.cpp (100%) rename Sources/{libewol => }/ewol/widget/ProgressBar.h (100%) rename Sources/{libewol => }/ewol/widget/Scene.cpp (100%) rename Sources/{libewol => }/ewol/widget/Scene.h (100%) rename Sources/{libewol => }/ewol/widget/SizerHori.cpp (100%) rename Sources/{libewol => }/ewol/widget/SizerHori.h (100%) rename Sources/{libewol => }/ewol/widget/SizerVert.cpp (100%) rename Sources/{libewol => }/ewol/widget/SizerVert.h (100%) rename Sources/{libewol => }/ewol/widget/Slider.cpp (100%) rename Sources/{libewol => }/ewol/widget/Slider.h (100%) rename Sources/{libewol => }/ewol/widget/Spacer.cpp (100%) rename Sources/{libewol => }/ewol/widget/Spacer.h (100%) rename Sources/{libewol => }/ewol/widget/WSlider.cpp (100%) rename Sources/{libewol => }/ewol/widget/WSlider.h (100%) rename Sources/{libewol => }/ewol/widget/Widget.cpp (100%) rename Sources/{libewol => }/ewol/widget/Widget.h (100%) rename Sources/{libewol => }/ewol/widget/WidgetManager.cpp (100%) rename Sources/{libewol => }/ewol/widget/WidgetManager.h (100%) rename Sources/{libewol => }/ewol/widget/WidgetScrolled.cpp (100%) rename Sources/{libewol => }/ewol/widget/WidgetScrolled.h (100%) rename Sources/{libewol => }/ewol/widget/Windows.cpp (100%) rename Sources/{libewol => }/ewol/widget/Windows.h (100%) rename Sources/{libewol => }/ewol/widget/meta/ColorChooser.cpp (100%) rename Sources/{libewol => }/ewol/widget/meta/ColorChooser.h (100%) rename Sources/{libewol => }/ewol/widget/meta/FileChooser.cpp (100%) rename Sources/{libewol => }/ewol/widget/meta/FileChooser.h (100%) rename Sources/{libewol => }/ewol/widget/meta/Parameter.cpp (100%) rename Sources/{libewol => }/ewol/widget/meta/Parameter.h (100%) rename Sources/{libewol => }/ewol/widget/meta/ParameterList.cpp (100%) rename Sources/{libewol => }/ewol/widget/meta/ParameterList.h (100%) rename Sources/{libewol => }/ewol/widget/meta/StdPopUp.cpp (100%) rename Sources/{libewol => }/ewol/widget/meta/StdPopUp.h (100%) rename Sources/{libewol => }/file.mk (100%) rename {Java => Sources/java}/PROJECT_NAME.java (100%) rename {Java => Sources/java}/src/org/ewol/interfaceAudio.java (100%) rename {Java => Sources/java}/src/org/ewol/interfaceJNI.java (100%) rename {Java => Sources/java}/src/org/ewol/interfaceOpenGL.java (100%) rename {Java => Sources/java}/src/org/ewol/interfaceSurfaceView.java (100%) delete mode 160000 Sources/libagg delete mode 100644 Sources/libetk/Generic.mk delete mode 100644 Sources/libetk/etk/Debug.cpp delete mode 100644 Sources/libetk/etk/Debug.h delete mode 100644 Sources/libetk/etk/DebugInternal.cpp delete mode 100644 Sources/libetk/etk/DebugInternal.h delete mode 100644 Sources/libetk/etk/MessageFifo.h delete mode 100644 Sources/libetk/etk/RegExp.cpp delete mode 100644 Sources/libetk/etk/RegExp.h delete mode 100644 Sources/libetk/etk/Stream.cpp delete mode 100644 Sources/libetk/etk/Stream.h delete mode 100644 Sources/libetk/etk/Types.h delete mode 100644 Sources/libetk/etk/UString.cpp delete mode 100644 Sources/libetk/etk/UString.h delete mode 100644 Sources/libetk/etk/Vector.h delete mode 100644 Sources/libetk/etk/math/Matrix.h delete mode 100644 Sources/libetk/etk/math/Matrix4.cpp delete mode 100644 Sources/libetk/etk/math/Matrix4.h delete mode 100644 Sources/libetk/etk/math/Plane.h delete mode 100644 Sources/libetk/etk/math/Vector2D.h delete mode 100644 Sources/libetk/etk/math/Vector3D.h delete mode 100644 Sources/libetk/etk/math/Vector4D.h delete mode 100644 Sources/libetk/etk/math/math.h delete mode 100644 Sources/libetk/etk/os/FSNode.cpp delete mode 100644 Sources/libetk/etk/os/FSNode.h delete mode 100644 Sources/libetk/etk/os/FSNodeRight.cpp delete mode 100644 Sources/libetk/etk/os/FSNodeRight.h delete mode 100644 Sources/libetk/etk/os/Memory.cpp delete mode 100644 Sources/libetk/etk/os/Memory.h delete mode 100644 Sources/libetk/etk/os/Mutex.Generic.cpp delete mode 100644 Sources/libetk/etk/os/Mutex.Windows.cpp delete mode 100644 Sources/libetk/etk/os/Mutex.h delete mode 100644 Sources/libetk/etk/os/Semaphore.Generic.cpp delete mode 100644 Sources/libetk/etk/os/Semaphore.Windows.cpp delete mode 100644 Sources/libetk/etk/os/Semaphore.cpp delete mode 100644 Sources/libetk/etk/os/Semaphore.h delete mode 100644 Sources/libetk/etk/tool.cpp delete mode 100644 Sources/libetk/etk/tool.h delete mode 100644 Sources/libetk/etk/unicode.cpp delete mode 100644 Sources/libetk/etk/unicode.h delete mode 100644 Sources/libetk/etk/unicodeTable.cpp delete mode 100644 Sources/libetk/etk/unicodeTable.h delete mode 100644 Sources/libetk/file.mk delete mode 100644 Sources/libewol/Android.mk delete mode 100644 Sources/libewol/licence_BSD.txt delete mode 160000 Sources/libfreetype delete mode 160000 Sources/libglew/glew delete mode 160000 Sources/liblua delete mode 160000 Sources/libogg delete mode 160000 Sources/libparsersvg delete mode 160000 Sources/libpng delete mode 160000 Sources/libportaudio delete mode 160000 Sources/libtinyxml delete mode 160000 Sources/libz/zlib delete mode 160000 Sources/libzip rename Sources/{libewol => }/tag (100%) delete mode 100644 avancement.boo rename {Sources/libglew => external/glew}/Windows.mk (100%) rename {Sources/libz => external/z}/Generic.mk (100%) rename {Sources/libz => external/z}/Windows.mk (100%) rename {Sources/libz => external/z}/file.mk (100%) rename Sources/libetk/licence_BSD.txt => license.txt (100%) delete mode 100644 tutorial.boo diff --git a/.gitmodules b/.gitmodules index 765d4a93..816d0811 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,36 +1,39 @@ -[submodule "Build"] - path = Build +[submodule "build"] + path = build url = https://github.com/HeeroYui/Build.git -[submodule "Sources/libagg"] - path = Sources/libagg +[submodule "agg"] + path = external/agg url = https://github.com/HeeroYui/libagg.git -[submodule "Sources/liblua"] - path = Sources/liblua +[submodule "lua"] + path = external/lua url = https://github.com/HeeroYui/liblua.git -[submodule "Sources/libogg"] - path = Sources/libogg +[submodule "ogg"] + path = external/ogg url = https://github.com/HeeroYui/libogg.git -[submodule "Sources/libparsersvg"] - path = Sources/libparsersvg +[submodule "parsersvg"] + path = external/parsersvg url = https://github.com/HeeroYui/libparsersvg.git -[submodule "Sources/libpng"] - path = Sources/libpng +[submodule "png"] + path = external/png url = https://github.com/HeeroYui/libpng.git -[submodule "Sources/libportaudio"] - path = Sources/libportaudio +[submodule "portaudio"] + path = external/portaudio url = https://github.com/HeeroYui/libportaudio.git -[submodule "Sources/libtinyxml"] - path = Sources/libtinyxml +[submodule "tinyxml"] + path = external/tinyxml url = https://github.com/HeeroYui/libtinyxml.git -[submodule "Sources/libzip"] - path = Sources/libzip +[submodule "zip"] + path = external/zip url = https://github.com/HeeroYui/libzip.git -[submodule "Sources/libfreetype"] - path = Sources/libfreetype +[submodule "freetype"] + path = external/freetype url = https://github.com/HeeroYui/libfreetype.git -[submodule "Sources/libz/zlib"] - path = Sources/libz/zlib +[submodule "zlib"] + path = external/z/zlib url = https://github.com/madler/zlib.git -[submodule "Sources/libglew/glew"] - path = Sources/libglew/glew +[submodule "glew"] + path = external/glew/glew url = https://github.com/HeeroYui/glew.git +[submodule "etk"] + path = external/etk + url = https://github.com/HeeroYui/etk.git diff --git a/Build b/Build deleted file mode 160000 index a9bfdcbc..00000000 --- a/Build +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9bfdcbc6bad8a1b435296b71d852631ab38a76e diff --git a/CreateTagEwol.sh b/CreateTagEwol.sh deleted file mode 100755 index 92c7abce..00000000 --- a/CreateTagEwol.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo $* > Sources/libewol/tag -git tag $* diff --git a/Sources/Android.mk b/Sources/Android.mk index aa2f4b59..3ba6ba26 100644 --- a/Sources/Android.mk +++ b/Sources/Android.mk @@ -1,2 +1,58 @@ LOCAL_PATH := $(call my-dir) -include $(call all-subdir-makefiles) + +include $(CLEAR_VARS) + +# name of the librairy +LOCAL_MODULE := ewol + +LOCAL_CONFIG_FILES := Config.in ConfigAndroid.in + +# get the tag of the current project : +LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag) +$(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION)) + +# name of the dependency +LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg lua libzip + +LOCAL_C_INCLUDES := + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) + +LOCAL_CFLAGS := -Wno-write-strings \ + -DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG)-$(BUILD_DIRECTORY_MODE)\"" \ + -DDATA_IN_APK + +LOCAL_EXPORT_LDLIBS := -lGLESv2 + +LOCAL_EXPORT_LDLIBS += -ldl -llog + + +FILE_ABSTRACTION:=$(LOCAL_PATH)/ewol/os/gui.Android.base.cpp +FILE_ABSTRACTION_DEST:=ewol/os/gui.Android.tmp.cpp + +EWOL_TMP_PATH:=$(LOCAL_PATH) + +$(shell rm -f $(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST)) + +$(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST): $(FILE_ABSTRACTION) + $(Q)mkdir -p $(dir $@) + $(Q)cp -f $(FILE_ABSTRACTION) $@ + $(Q)sed -i "s|__PROJECT_ORG_TYPE__|$(PROJECT_COMPAGNY_TYPE)|" $@ + $(Q)sed -i "s|__PROJECT_VENDOR__|$(PROJECT_COMPAGNY_NAME2)|" $@ + $(Q)sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME2)|" $@ + $(Q)sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_NAME2)|" $@ +$(FILE_ABSTRACTION_DEST): $(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST) + + + +# this is the abstraction file for Android +LOCAL_PREREQUISITES := $(FILE_ABSTRACTION_DEST) + +# load the common sources file of the platform +include $(LOCAL_PATH)/file.mk + +LOCAL_SRC_FILES := ewol/os/gui.Android.cpp $(FILE_LIST) + +include $(BUILD_STATIC_LIBRARY) + + diff --git a/Sources/libewol/Config.in b/Sources/Config.in similarity index 100% rename from Sources/libewol/Config.in rename to Sources/Config.in diff --git a/Sources/libewol/ConfigAndroid.in b/Sources/ConfigAndroid.in similarity index 100% rename from Sources/libewol/ConfigAndroid.in rename to Sources/ConfigAndroid.in diff --git a/Sources/libewol/Linux.mk b/Sources/Linux.mk similarity index 100% rename from Sources/libewol/Linux.mk rename to Sources/Linux.mk diff --git a/Sources/libewol/Windows.mk b/Sources/Windows.mk similarity index 100% rename from Sources/libewol/Windows.mk rename to Sources/Windows.mk diff --git a/Sources/libewol/ewol/ClipBoard.cpp b/Sources/ewol/ClipBoard.cpp similarity index 100% rename from Sources/libewol/ewol/ClipBoard.cpp rename to Sources/ewol/ClipBoard.cpp diff --git a/Sources/libewol/ewol/ClipBoard.h b/Sources/ewol/ClipBoard.h similarity index 100% rename from Sources/libewol/ewol/ClipBoard.h rename to Sources/ewol/ClipBoard.h diff --git a/Sources/libewol/ewol/Debug.cpp b/Sources/ewol/Debug.cpp similarity index 100% rename from Sources/libewol/ewol/Debug.cpp rename to Sources/ewol/Debug.cpp diff --git a/Sources/libewol/ewol/Debug.h b/Sources/ewol/Debug.h similarity index 100% rename from Sources/libewol/ewol/Debug.h rename to Sources/ewol/Debug.h diff --git a/Sources/libewol/ewol/Mesh/Mesh.cpp b/Sources/ewol/Mesh/Mesh.cpp similarity index 100% rename from Sources/libewol/ewol/Mesh/Mesh.cpp rename to Sources/ewol/Mesh/Mesh.cpp diff --git a/Sources/libewol/ewol/Mesh/Mesh.h b/Sources/ewol/Mesh/Mesh.h similarity index 100% rename from Sources/libewol/ewol/Mesh/Mesh.h rename to Sources/ewol/Mesh/Mesh.h diff --git a/Sources/libewol/ewol/Mesh/MeshObj.cpp b/Sources/ewol/Mesh/MeshObj.cpp similarity index 100% rename from Sources/libewol/ewol/Mesh/MeshObj.cpp rename to Sources/ewol/Mesh/MeshObj.cpp diff --git a/Sources/libewol/ewol/Mesh/MeshObj.h b/Sources/ewol/Mesh/MeshObj.h similarity index 100% rename from Sources/libewol/ewol/Mesh/MeshObj.h rename to Sources/ewol/Mesh/MeshObj.h diff --git a/Sources/libewol/ewol/Resource.h b/Sources/ewol/Resource.h similarity index 100% rename from Sources/libewol/ewol/Resource.h rename to Sources/ewol/Resource.h diff --git a/Sources/libewol/ewol/ResourceManager.cpp b/Sources/ewol/ResourceManager.cpp similarity index 100% rename from Sources/libewol/ewol/ResourceManager.cpp rename to Sources/ewol/ResourceManager.cpp diff --git a/Sources/libewol/ewol/ResourceManager.h b/Sources/ewol/ResourceManager.h similarity index 100% rename from Sources/libewol/ewol/ResourceManager.h rename to Sources/ewol/ResourceManager.h diff --git a/Sources/libewol/ewol/ShortCutManager.cpp b/Sources/ewol/ShortCutManager.cpp similarity index 100% rename from Sources/libewol/ewol/ShortCutManager.cpp rename to Sources/ewol/ShortCutManager.cpp diff --git a/Sources/libewol/ewol/ShortCutManager.h b/Sources/ewol/ShortCutManager.h similarity index 100% rename from Sources/libewol/ewol/ShortCutManager.h rename to Sources/ewol/ShortCutManager.h diff --git a/Sources/libewol/ewol/SimpleConfigFile.cpp b/Sources/ewol/SimpleConfigFile.cpp similarity index 100% rename from Sources/libewol/ewol/SimpleConfigFile.cpp rename to Sources/ewol/SimpleConfigFile.cpp diff --git a/Sources/libewol/ewol/SimpleConfigFile.h b/Sources/ewol/SimpleConfigFile.h similarity index 100% rename from Sources/libewol/ewol/SimpleConfigFile.h rename to Sources/ewol/SimpleConfigFile.h diff --git a/Sources/libewol/ewol/audio/audio.cpp b/Sources/ewol/audio/audio.cpp similarity index 100% rename from Sources/libewol/ewol/audio/audio.cpp rename to Sources/ewol/audio/audio.cpp diff --git a/Sources/libewol/ewol/audio/audio.h b/Sources/ewol/audio/audio.h similarity index 100% rename from Sources/libewol/ewol/audio/audio.h rename to Sources/ewol/audio/audio.h diff --git a/Sources/libewol/ewol/audio/decWav.cpp b/Sources/ewol/audio/decWav.cpp similarity index 100% rename from Sources/libewol/ewol/audio/decWav.cpp rename to Sources/ewol/audio/decWav.cpp diff --git a/Sources/libewol/ewol/audio/decWav.h b/Sources/ewol/audio/decWav.h similarity index 100% rename from Sources/libewol/ewol/audio/decWav.h rename to Sources/ewol/audio/decWav.h diff --git a/Sources/libewol/ewol/audio/interfacePortAudio.cpp b/Sources/ewol/audio/interfacePortAudio.cpp similarity index 100% rename from Sources/libewol/ewol/audio/interfacePortAudio.cpp rename to Sources/ewol/audio/interfacePortAudio.cpp diff --git a/Sources/libewol/ewol/audio/interfacePortAudio.h b/Sources/ewol/audio/interfacePortAudio.h similarity index 100% rename from Sources/libewol/ewol/audio/interfacePortAudio.h rename to Sources/ewol/audio/interfacePortAudio.h diff --git a/Sources/libewol/ewol/eObject/EObject.cpp b/Sources/ewol/eObject/EObject.cpp similarity index 100% rename from Sources/libewol/ewol/eObject/EObject.cpp rename to Sources/ewol/eObject/EObject.cpp diff --git a/Sources/libewol/ewol/eObject/EObject.h b/Sources/ewol/eObject/EObject.h similarity index 100% rename from Sources/libewol/ewol/eObject/EObject.h rename to Sources/ewol/eObject/EObject.h diff --git a/Sources/libewol/ewol/eObject/EObjectManager.cpp b/Sources/ewol/eObject/EObjectManager.cpp similarity index 100% rename from Sources/libewol/ewol/eObject/EObjectManager.cpp rename to Sources/ewol/eObject/EObjectManager.cpp diff --git a/Sources/libewol/ewol/eObject/EObjectManager.h b/Sources/ewol/eObject/EObjectManager.h similarity index 100% rename from Sources/libewol/ewol/eObject/EObjectManager.h rename to Sources/ewol/eObject/EObjectManager.h diff --git a/Sources/libewol/ewol/ewol.cpp b/Sources/ewol/ewol.cpp similarity index 100% rename from Sources/libewol/ewol/ewol.cpp rename to Sources/ewol/ewol.cpp diff --git a/Sources/libewol/ewol/ewol.h b/Sources/ewol/ewol.h similarity index 100% rename from Sources/libewol/ewol/ewol.h rename to Sources/ewol/ewol.h diff --git a/Sources/libewol/ewol/font/DistantFieldFont.cpp b/Sources/ewol/font/DistantFieldFont.cpp similarity index 100% rename from Sources/libewol/ewol/font/DistantFieldFont.cpp rename to Sources/ewol/font/DistantFieldFont.cpp diff --git a/Sources/libewol/ewol/font/DistantFieldFont.h b/Sources/ewol/font/DistantFieldFont.h similarity index 100% rename from Sources/libewol/ewol/font/DistantFieldFont.h rename to Sources/ewol/font/DistantFieldFont.h diff --git a/Sources/libewol/ewol/font/Font.h b/Sources/ewol/font/Font.h similarity index 100% rename from Sources/libewol/ewol/font/Font.h rename to Sources/ewol/font/Font.h diff --git a/Sources/libewol/ewol/font/FontFreeType.cpp b/Sources/ewol/font/FontFreeType.cpp similarity index 100% rename from Sources/libewol/ewol/font/FontFreeType.cpp rename to Sources/ewol/font/FontFreeType.cpp diff --git a/Sources/libewol/ewol/font/FontFreeType.h b/Sources/ewol/font/FontFreeType.h similarity index 100% rename from Sources/libewol/ewol/font/FontFreeType.h rename to Sources/ewol/font/FontFreeType.h diff --git a/Sources/libewol/ewol/font/FontManager.cpp b/Sources/ewol/font/FontManager.cpp similarity index 100% rename from Sources/libewol/ewol/font/FontManager.cpp rename to Sources/ewol/font/FontManager.cpp diff --git a/Sources/libewol/ewol/font/FontManager.h b/Sources/ewol/font/FontManager.h similarity index 100% rename from Sources/libewol/ewol/font/FontManager.h rename to Sources/ewol/font/FontManager.h diff --git a/Sources/libewol/ewol/font/TexturedFont.cpp b/Sources/ewol/font/TexturedFont.cpp similarity index 100% rename from Sources/libewol/ewol/font/TexturedFont.cpp rename to Sources/ewol/font/TexturedFont.cpp diff --git a/Sources/libewol/ewol/font/TexturedFont.h b/Sources/ewol/font/TexturedFont.h similarity index 100% rename from Sources/libewol/ewol/font/TexturedFont.h rename to Sources/ewol/font/TexturedFont.h diff --git a/Sources/libewol/ewol/game/GameElement.cpp b/Sources/ewol/game/GameElement.cpp similarity index 100% rename from Sources/libewol/ewol/game/GameElement.cpp rename to Sources/ewol/game/GameElement.cpp diff --git a/Sources/libewol/ewol/game/GameElement.h b/Sources/ewol/game/GameElement.h similarity index 100% rename from Sources/libewol/ewol/game/GameElement.h rename to Sources/ewol/game/GameElement.h diff --git a/Sources/libewol/ewol/game/GameElementLua.cpp b/Sources/ewol/game/GameElementLua.cpp similarity index 100% rename from Sources/libewol/ewol/game/GameElementLua.cpp rename to Sources/ewol/game/GameElementLua.cpp diff --git a/Sources/libewol/ewol/game/GameElementLua.h b/Sources/ewol/game/GameElementLua.h similarity index 100% rename from Sources/libewol/ewol/game/GameElementLua.h rename to Sources/ewol/game/GameElementLua.h diff --git a/Sources/libewol/ewol/game/SceneElement.cpp b/Sources/ewol/game/SceneElement.cpp similarity index 100% rename from Sources/libewol/ewol/game/SceneElement.cpp rename to Sources/ewol/game/SceneElement.cpp diff --git a/Sources/libewol/ewol/game/SceneElement.h b/Sources/ewol/game/SceneElement.h similarity index 100% rename from Sources/libewol/ewol/game/SceneElement.h rename to Sources/ewol/game/SceneElement.h diff --git a/Sources/libewol/ewol/oObject/2DColored.cpp b/Sources/ewol/oObject/2DColored.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/2DColored.cpp rename to Sources/ewol/oObject/2DColored.cpp diff --git a/Sources/libewol/ewol/oObject/2DColored.h b/Sources/ewol/oObject/2DColored.h similarity index 100% rename from Sources/libewol/ewol/oObject/2DColored.h rename to Sources/ewol/oObject/2DColored.h diff --git a/Sources/libewol/ewol/oObject/2DTextColored.cpp b/Sources/ewol/oObject/2DTextColored.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/2DTextColored.cpp rename to Sources/ewol/oObject/2DTextColored.cpp diff --git a/Sources/libewol/ewol/oObject/2DTextColored.h b/Sources/ewol/oObject/2DTextColored.h similarity index 100% rename from Sources/libewol/ewol/oObject/2DTextColored.h rename to Sources/ewol/oObject/2DTextColored.h diff --git a/Sources/libewol/ewol/oObject/2DTextShader.cpp b/Sources/ewol/oObject/2DTextShader.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/2DTextShader.cpp rename to Sources/ewol/oObject/2DTextShader.cpp diff --git a/Sources/libewol/ewol/oObject/2DTextShader.h b/Sources/ewol/oObject/2DTextShader.h similarity index 100% rename from Sources/libewol/ewol/oObject/2DTextShader.h rename to Sources/ewol/oObject/2DTextShader.h diff --git a/Sources/libewol/ewol/oObject/2DTextured.cpp b/Sources/ewol/oObject/2DTextured.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/2DTextured.cpp rename to Sources/ewol/oObject/2DTextured.cpp diff --git a/Sources/libewol/ewol/oObject/2DTextured.h b/Sources/ewol/oObject/2DTextured.h similarity index 100% rename from Sources/libewol/ewol/oObject/2DTextured.h rename to Sources/ewol/oObject/2DTextured.h diff --git a/Sources/libewol/ewol/oObject/3DTextured.cpp b/Sources/ewol/oObject/3DTextured.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/3DTextured.cpp rename to Sources/ewol/oObject/3DTextured.cpp diff --git a/Sources/libewol/ewol/oObject/3DTextured.h b/Sources/ewol/oObject/3DTextured.h similarity index 100% rename from Sources/libewol/ewol/oObject/3DTextured.h rename to Sources/ewol/oObject/3DTextured.h diff --git a/Sources/libewol/ewol/oObject/OObject.cpp b/Sources/ewol/oObject/OObject.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/OObject.cpp rename to Sources/ewol/oObject/OObject.cpp diff --git a/Sources/libewol/ewol/oObject/OObject.h b/Sources/ewol/oObject/OObject.h similarity index 100% rename from Sources/libewol/ewol/oObject/OObject.h rename to Sources/ewol/oObject/OObject.h diff --git a/Sources/libewol/ewol/oObject/Sprite.cpp b/Sources/ewol/oObject/Sprite.cpp similarity index 100% rename from Sources/libewol/ewol/oObject/Sprite.cpp rename to Sources/ewol/oObject/Sprite.cpp diff --git a/Sources/libewol/ewol/oObject/Sprite.h b/Sources/ewol/oObject/Sprite.h similarity index 100% rename from Sources/libewol/ewol/oObject/Sprite.h rename to Sources/ewol/oObject/Sprite.h diff --git a/Sources/libewol/ewol/openGL/Program.cpp b/Sources/ewol/openGL/Program.cpp similarity index 100% rename from Sources/libewol/ewol/openGL/Program.cpp rename to Sources/ewol/openGL/Program.cpp diff --git a/Sources/libewol/ewol/openGL/Program.h b/Sources/ewol/openGL/Program.h similarity index 100% rename from Sources/libewol/ewol/openGL/Program.h rename to Sources/ewol/openGL/Program.h diff --git a/Sources/libewol/ewol/openGL/Shader.cpp b/Sources/ewol/openGL/Shader.cpp similarity index 100% rename from Sources/libewol/ewol/openGL/Shader.cpp rename to Sources/ewol/openGL/Shader.cpp diff --git a/Sources/libewol/ewol/openGL/Shader.h b/Sources/ewol/openGL/Shader.h similarity index 100% rename from Sources/libewol/ewol/openGL/Shader.h rename to Sources/ewol/openGL/Shader.h diff --git a/Sources/libewol/ewol/openGL/VirtualBufferObject.cpp b/Sources/ewol/openGL/VirtualBufferObject.cpp similarity index 100% rename from Sources/libewol/ewol/openGL/VirtualBufferObject.cpp rename to Sources/ewol/openGL/VirtualBufferObject.cpp diff --git a/Sources/libewol/ewol/openGL/VirtualBufferObject.h b/Sources/ewol/openGL/VirtualBufferObject.h similarity index 100% rename from Sources/libewol/ewol/openGL/VirtualBufferObject.h rename to Sources/ewol/openGL/VirtualBufferObject.h diff --git a/Sources/libewol/ewol/openGL/openGL.cpp b/Sources/ewol/openGL/openGL.cpp similarity index 100% rename from Sources/libewol/ewol/openGL/openGL.cpp rename to Sources/ewol/openGL/openGL.cpp diff --git a/Sources/libewol/ewol/openGL/openGL.h b/Sources/ewol/openGL/openGL.h similarity index 100% rename from Sources/libewol/ewol/openGL/openGL.h rename to Sources/ewol/openGL/openGL.h diff --git a/Sources/libewol/ewol/os/Fps.h b/Sources/ewol/os/Fps.h similarity index 100% rename from Sources/libewol/ewol/os/Fps.h rename to Sources/ewol/os/Fps.h diff --git a/Sources/libewol/ewol/os/eSystem.cpp b/Sources/ewol/os/eSystem.cpp similarity index 100% rename from Sources/libewol/ewol/os/eSystem.cpp rename to Sources/ewol/os/eSystem.cpp diff --git a/Sources/libewol/ewol/os/eSystem.h b/Sources/ewol/os/eSystem.h similarity index 100% rename from Sources/libewol/ewol/os/eSystem.h rename to Sources/ewol/os/eSystem.h diff --git a/Sources/libewol/ewol/os/eSystemInput.cpp b/Sources/ewol/os/eSystemInput.cpp similarity index 100% rename from Sources/libewol/ewol/os/eSystemInput.cpp rename to Sources/ewol/os/eSystemInput.cpp diff --git a/Sources/libewol/ewol/os/eSystemInput.h b/Sources/ewol/os/eSystemInput.h similarity index 100% rename from Sources/libewol/ewol/os/eSystemInput.h rename to Sources/ewol/os/eSystemInput.h diff --git a/Sources/libewol/ewol/os/gui.Android.base.cpp b/Sources/ewol/os/gui.Android.base.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.Android.base.cpp rename to Sources/ewol/os/gui.Android.base.cpp diff --git a/Sources/libewol/ewol/os/gui.Android.cpp b/Sources/ewol/os/gui.Android.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.Android.cpp rename to Sources/ewol/os/gui.Android.cpp diff --git a/Sources/libewol/ewol/os/gui.Example.cpp b/Sources/ewol/os/gui.Example.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.Example.cpp rename to Sources/ewol/os/gui.Example.cpp diff --git a/Sources/libewol/ewol/os/gui.IOs.cpp b/Sources/ewol/os/gui.IOs.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.IOs.cpp rename to Sources/ewol/os/gui.IOs.cpp diff --git a/Sources/libewol/ewol/os/gui.MacOs.cpp b/Sources/ewol/os/gui.MacOs.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.MacOs.cpp rename to Sources/ewol/os/gui.MacOs.cpp diff --git a/Sources/libewol/ewol/os/gui.Windows.cpp b/Sources/ewol/os/gui.Windows.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.Windows.cpp rename to Sources/ewol/os/gui.Windows.cpp diff --git a/Sources/libewol/ewol/os/gui.X11.cpp b/Sources/ewol/os/gui.X11.cpp similarity index 100% rename from Sources/libewol/ewol/os/gui.X11.cpp rename to Sources/ewol/os/gui.X11.cpp diff --git a/Sources/libewol/ewol/os/gui.h b/Sources/ewol/os/gui.h similarity index 100% rename from Sources/libewol/ewol/os/gui.h rename to Sources/ewol/os/gui.h diff --git a/Sources/libewol/ewol/texture/Texture.cpp b/Sources/ewol/texture/Texture.cpp similarity index 100% rename from Sources/libewol/ewol/texture/Texture.cpp rename to Sources/ewol/texture/Texture.cpp diff --git a/Sources/libewol/ewol/texture/Texture.h b/Sources/ewol/texture/Texture.h similarity index 100% rename from Sources/libewol/ewol/texture/Texture.h rename to Sources/ewol/texture/Texture.h diff --git a/Sources/libewol/ewol/texture/TextureBMP.cpp b/Sources/ewol/texture/TextureBMP.cpp similarity index 100% rename from Sources/libewol/ewol/texture/TextureBMP.cpp rename to Sources/ewol/texture/TextureBMP.cpp diff --git a/Sources/libewol/ewol/texture/TextureBMP.h b/Sources/ewol/texture/TextureBMP.h similarity index 100% rename from Sources/libewol/ewol/texture/TextureBMP.h rename to Sources/ewol/texture/TextureBMP.h diff --git a/Sources/libewol/ewol/texture/TextureFile.cpp b/Sources/ewol/texture/TextureFile.cpp similarity index 100% rename from Sources/libewol/ewol/texture/TextureFile.cpp rename to Sources/ewol/texture/TextureFile.cpp diff --git a/Sources/libewol/ewol/texture/TextureFile.h b/Sources/ewol/texture/TextureFile.h similarity index 100% rename from Sources/libewol/ewol/texture/TextureFile.h rename to Sources/ewol/texture/TextureFile.h diff --git a/Sources/libewol/ewol/texture/TexturePNG.cpp b/Sources/ewol/texture/TexturePNG.cpp similarity index 100% rename from Sources/libewol/ewol/texture/TexturePNG.cpp rename to Sources/ewol/texture/TexturePNG.cpp diff --git a/Sources/libewol/ewol/texture/TexturePNG.h b/Sources/ewol/texture/TexturePNG.h similarity index 100% rename from Sources/libewol/ewol/texture/TexturePNG.h rename to Sources/ewol/texture/TexturePNG.h diff --git a/Sources/libewol/ewol/texture/TextureSVG.cpp b/Sources/ewol/texture/TextureSVG.cpp similarity index 100% rename from Sources/libewol/ewol/texture/TextureSVG.cpp rename to Sources/ewol/texture/TextureSVG.cpp diff --git a/Sources/libewol/ewol/texture/TextureSVG.h b/Sources/ewol/texture/TextureSVG.h similarity index 100% rename from Sources/libewol/ewol/texture/TextureSVG.h rename to Sources/ewol/texture/TextureSVG.h diff --git a/Sources/libewol/ewol/widget/Button.cpp b/Sources/ewol/widget/Button.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Button.cpp rename to Sources/ewol/widget/Button.cpp diff --git a/Sources/libewol/ewol/widget/Button.h b/Sources/ewol/widget/Button.h similarity index 100% rename from Sources/libewol/ewol/widget/Button.h rename to Sources/ewol/widget/Button.h diff --git a/Sources/libewol/ewol/widget/ButtonColor.cpp b/Sources/ewol/widget/ButtonColor.cpp similarity index 100% rename from Sources/libewol/ewol/widget/ButtonColor.cpp rename to Sources/ewol/widget/ButtonColor.cpp diff --git a/Sources/libewol/ewol/widget/ButtonColor.h b/Sources/ewol/widget/ButtonColor.h similarity index 100% rename from Sources/libewol/ewol/widget/ButtonColor.h rename to Sources/ewol/widget/ButtonColor.h diff --git a/Sources/libewol/ewol/widget/ButtonImage.cpp b/Sources/ewol/widget/ButtonImage.cpp similarity index 100% rename from Sources/libewol/ewol/widget/ButtonImage.cpp rename to Sources/ewol/widget/ButtonImage.cpp diff --git a/Sources/libewol/ewol/widget/ButtonImage.h b/Sources/ewol/widget/ButtonImage.h similarity index 100% rename from Sources/libewol/ewol/widget/ButtonImage.h rename to Sources/ewol/widget/ButtonImage.h diff --git a/Sources/libewol/ewol/widget/CheckBox.cpp b/Sources/ewol/widget/CheckBox.cpp similarity index 100% rename from Sources/libewol/ewol/widget/CheckBox.cpp rename to Sources/ewol/widget/CheckBox.cpp diff --git a/Sources/libewol/ewol/widget/CheckBox.h b/Sources/ewol/widget/CheckBox.h similarity index 100% rename from Sources/libewol/ewol/widget/CheckBox.h rename to Sources/ewol/widget/CheckBox.h diff --git a/Sources/libewol/ewol/widget/ColorBar.cpp b/Sources/ewol/widget/ColorBar.cpp similarity index 100% rename from Sources/libewol/ewol/widget/ColorBar.cpp rename to Sources/ewol/widget/ColorBar.cpp diff --git a/Sources/libewol/ewol/widget/ColorBar.h b/Sources/ewol/widget/ColorBar.h similarity index 100% rename from Sources/libewol/ewol/widget/ColorBar.h rename to Sources/ewol/widget/ColorBar.h diff --git a/Sources/libewol/ewol/widget/ContextMenu.cpp b/Sources/ewol/widget/ContextMenu.cpp similarity index 100% rename from Sources/libewol/ewol/widget/ContextMenu.cpp rename to Sources/ewol/widget/ContextMenu.cpp diff --git a/Sources/libewol/ewol/widget/ContextMenu.h b/Sources/ewol/widget/ContextMenu.h similarity index 100% rename from Sources/libewol/ewol/widget/ContextMenu.h rename to Sources/ewol/widget/ContextMenu.h diff --git a/Sources/libewol/ewol/widget/Drawable.cpp b/Sources/ewol/widget/Drawable.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Drawable.cpp rename to Sources/ewol/widget/Drawable.cpp diff --git a/Sources/libewol/ewol/widget/Drawable.h b/Sources/ewol/widget/Drawable.h similarity index 100% rename from Sources/libewol/ewol/widget/Drawable.h rename to Sources/ewol/widget/Drawable.h diff --git a/Sources/libewol/ewol/widget/Entry.cpp b/Sources/ewol/widget/Entry.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Entry.cpp rename to Sources/ewol/widget/Entry.cpp diff --git a/Sources/libewol/ewol/widget/Entry.h b/Sources/ewol/widget/Entry.h similarity index 100% rename from Sources/libewol/ewol/widget/Entry.h rename to Sources/ewol/widget/Entry.h diff --git a/Sources/libewol/ewol/widget/Image.cpp b/Sources/ewol/widget/Image.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Image.cpp rename to Sources/ewol/widget/Image.cpp diff --git a/Sources/libewol/ewol/widget/Image.h b/Sources/ewol/widget/Image.h similarity index 100% rename from Sources/libewol/ewol/widget/Image.h rename to Sources/ewol/widget/Image.h diff --git a/Sources/libewol/ewol/widget/Joystick.cpp b/Sources/ewol/widget/Joystick.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Joystick.cpp rename to Sources/ewol/widget/Joystick.cpp diff --git a/Sources/libewol/ewol/widget/Joystick.h b/Sources/ewol/widget/Joystick.h similarity index 100% rename from Sources/libewol/ewol/widget/Joystick.h rename to Sources/ewol/widget/Joystick.h diff --git a/Sources/libewol/ewol/widget/Label.cpp b/Sources/ewol/widget/Label.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Label.cpp rename to Sources/ewol/widget/Label.cpp diff --git a/Sources/libewol/ewol/widget/Label.h b/Sources/ewol/widget/Label.h similarity index 100% rename from Sources/libewol/ewol/widget/Label.h rename to Sources/ewol/widget/Label.h diff --git a/Sources/libewol/ewol/widget/Layer.cpp b/Sources/ewol/widget/Layer.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Layer.cpp rename to Sources/ewol/widget/Layer.cpp diff --git a/Sources/libewol/ewol/widget/Layer.h b/Sources/ewol/widget/Layer.h similarity index 100% rename from Sources/libewol/ewol/widget/Layer.h rename to Sources/ewol/widget/Layer.h diff --git a/Sources/libewol/ewol/widget/List.cpp b/Sources/ewol/widget/List.cpp similarity index 100% rename from Sources/libewol/ewol/widget/List.cpp rename to Sources/ewol/widget/List.cpp diff --git a/Sources/libewol/ewol/widget/List.h b/Sources/ewol/widget/List.h similarity index 100% rename from Sources/libewol/ewol/widget/List.h rename to Sources/ewol/widget/List.h diff --git a/Sources/libewol/ewol/widget/ListFileSystem.cpp b/Sources/ewol/widget/ListFileSystem.cpp similarity index 100% rename from Sources/libewol/ewol/widget/ListFileSystem.cpp rename to Sources/ewol/widget/ListFileSystem.cpp diff --git a/Sources/libewol/ewol/widget/ListFileSystem.h b/Sources/ewol/widget/ListFileSystem.h similarity index 100% rename from Sources/libewol/ewol/widget/ListFileSystem.h rename to Sources/ewol/widget/ListFileSystem.h diff --git a/Sources/libewol/ewol/widget/Menu.cpp b/Sources/ewol/widget/Menu.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Menu.cpp rename to Sources/ewol/widget/Menu.cpp diff --git a/Sources/libewol/ewol/widget/Menu.h b/Sources/ewol/widget/Menu.h similarity index 100% rename from Sources/libewol/ewol/widget/Menu.h rename to Sources/ewol/widget/Menu.h diff --git a/Sources/libewol/ewol/widget/PopUp.cpp b/Sources/ewol/widget/PopUp.cpp similarity index 100% rename from Sources/libewol/ewol/widget/PopUp.cpp rename to Sources/ewol/widget/PopUp.cpp diff --git a/Sources/libewol/ewol/widget/PopUp.h b/Sources/ewol/widget/PopUp.h similarity index 100% rename from Sources/libewol/ewol/widget/PopUp.h rename to Sources/ewol/widget/PopUp.h diff --git a/Sources/libewol/ewol/widget/ProgressBar.cpp b/Sources/ewol/widget/ProgressBar.cpp similarity index 100% rename from Sources/libewol/ewol/widget/ProgressBar.cpp rename to Sources/ewol/widget/ProgressBar.cpp diff --git a/Sources/libewol/ewol/widget/ProgressBar.h b/Sources/ewol/widget/ProgressBar.h similarity index 100% rename from Sources/libewol/ewol/widget/ProgressBar.h rename to Sources/ewol/widget/ProgressBar.h diff --git a/Sources/libewol/ewol/widget/Scene.cpp b/Sources/ewol/widget/Scene.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Scene.cpp rename to Sources/ewol/widget/Scene.cpp diff --git a/Sources/libewol/ewol/widget/Scene.h b/Sources/ewol/widget/Scene.h similarity index 100% rename from Sources/libewol/ewol/widget/Scene.h rename to Sources/ewol/widget/Scene.h diff --git a/Sources/libewol/ewol/widget/SizerHori.cpp b/Sources/ewol/widget/SizerHori.cpp similarity index 100% rename from Sources/libewol/ewol/widget/SizerHori.cpp rename to Sources/ewol/widget/SizerHori.cpp diff --git a/Sources/libewol/ewol/widget/SizerHori.h b/Sources/ewol/widget/SizerHori.h similarity index 100% rename from Sources/libewol/ewol/widget/SizerHori.h rename to Sources/ewol/widget/SizerHori.h diff --git a/Sources/libewol/ewol/widget/SizerVert.cpp b/Sources/ewol/widget/SizerVert.cpp similarity index 100% rename from Sources/libewol/ewol/widget/SizerVert.cpp rename to Sources/ewol/widget/SizerVert.cpp diff --git a/Sources/libewol/ewol/widget/SizerVert.h b/Sources/ewol/widget/SizerVert.h similarity index 100% rename from Sources/libewol/ewol/widget/SizerVert.h rename to Sources/ewol/widget/SizerVert.h diff --git a/Sources/libewol/ewol/widget/Slider.cpp b/Sources/ewol/widget/Slider.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Slider.cpp rename to Sources/ewol/widget/Slider.cpp diff --git a/Sources/libewol/ewol/widget/Slider.h b/Sources/ewol/widget/Slider.h similarity index 100% rename from Sources/libewol/ewol/widget/Slider.h rename to Sources/ewol/widget/Slider.h diff --git a/Sources/libewol/ewol/widget/Spacer.cpp b/Sources/ewol/widget/Spacer.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Spacer.cpp rename to Sources/ewol/widget/Spacer.cpp diff --git a/Sources/libewol/ewol/widget/Spacer.h b/Sources/ewol/widget/Spacer.h similarity index 100% rename from Sources/libewol/ewol/widget/Spacer.h rename to Sources/ewol/widget/Spacer.h diff --git a/Sources/libewol/ewol/widget/WSlider.cpp b/Sources/ewol/widget/WSlider.cpp similarity index 100% rename from Sources/libewol/ewol/widget/WSlider.cpp rename to Sources/ewol/widget/WSlider.cpp diff --git a/Sources/libewol/ewol/widget/WSlider.h b/Sources/ewol/widget/WSlider.h similarity index 100% rename from Sources/libewol/ewol/widget/WSlider.h rename to Sources/ewol/widget/WSlider.h diff --git a/Sources/libewol/ewol/widget/Widget.cpp b/Sources/ewol/widget/Widget.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Widget.cpp rename to Sources/ewol/widget/Widget.cpp diff --git a/Sources/libewol/ewol/widget/Widget.h b/Sources/ewol/widget/Widget.h similarity index 100% rename from Sources/libewol/ewol/widget/Widget.h rename to Sources/ewol/widget/Widget.h diff --git a/Sources/libewol/ewol/widget/WidgetManager.cpp b/Sources/ewol/widget/WidgetManager.cpp similarity index 100% rename from Sources/libewol/ewol/widget/WidgetManager.cpp rename to Sources/ewol/widget/WidgetManager.cpp diff --git a/Sources/libewol/ewol/widget/WidgetManager.h b/Sources/ewol/widget/WidgetManager.h similarity index 100% rename from Sources/libewol/ewol/widget/WidgetManager.h rename to Sources/ewol/widget/WidgetManager.h diff --git a/Sources/libewol/ewol/widget/WidgetScrolled.cpp b/Sources/ewol/widget/WidgetScrolled.cpp similarity index 100% rename from Sources/libewol/ewol/widget/WidgetScrolled.cpp rename to Sources/ewol/widget/WidgetScrolled.cpp diff --git a/Sources/libewol/ewol/widget/WidgetScrolled.h b/Sources/ewol/widget/WidgetScrolled.h similarity index 100% rename from Sources/libewol/ewol/widget/WidgetScrolled.h rename to Sources/ewol/widget/WidgetScrolled.h diff --git a/Sources/libewol/ewol/widget/Windows.cpp b/Sources/ewol/widget/Windows.cpp similarity index 100% rename from Sources/libewol/ewol/widget/Windows.cpp rename to Sources/ewol/widget/Windows.cpp diff --git a/Sources/libewol/ewol/widget/Windows.h b/Sources/ewol/widget/Windows.h similarity index 100% rename from Sources/libewol/ewol/widget/Windows.h rename to Sources/ewol/widget/Windows.h diff --git a/Sources/libewol/ewol/widget/meta/ColorChooser.cpp b/Sources/ewol/widget/meta/ColorChooser.cpp similarity index 100% rename from Sources/libewol/ewol/widget/meta/ColorChooser.cpp rename to Sources/ewol/widget/meta/ColorChooser.cpp diff --git a/Sources/libewol/ewol/widget/meta/ColorChooser.h b/Sources/ewol/widget/meta/ColorChooser.h similarity index 100% rename from Sources/libewol/ewol/widget/meta/ColorChooser.h rename to Sources/ewol/widget/meta/ColorChooser.h diff --git a/Sources/libewol/ewol/widget/meta/FileChooser.cpp b/Sources/ewol/widget/meta/FileChooser.cpp similarity index 100% rename from Sources/libewol/ewol/widget/meta/FileChooser.cpp rename to Sources/ewol/widget/meta/FileChooser.cpp diff --git a/Sources/libewol/ewol/widget/meta/FileChooser.h b/Sources/ewol/widget/meta/FileChooser.h similarity index 100% rename from Sources/libewol/ewol/widget/meta/FileChooser.h rename to Sources/ewol/widget/meta/FileChooser.h diff --git a/Sources/libewol/ewol/widget/meta/Parameter.cpp b/Sources/ewol/widget/meta/Parameter.cpp similarity index 100% rename from Sources/libewol/ewol/widget/meta/Parameter.cpp rename to Sources/ewol/widget/meta/Parameter.cpp diff --git a/Sources/libewol/ewol/widget/meta/Parameter.h b/Sources/ewol/widget/meta/Parameter.h similarity index 100% rename from Sources/libewol/ewol/widget/meta/Parameter.h rename to Sources/ewol/widget/meta/Parameter.h diff --git a/Sources/libewol/ewol/widget/meta/ParameterList.cpp b/Sources/ewol/widget/meta/ParameterList.cpp similarity index 100% rename from Sources/libewol/ewol/widget/meta/ParameterList.cpp rename to Sources/ewol/widget/meta/ParameterList.cpp diff --git a/Sources/libewol/ewol/widget/meta/ParameterList.h b/Sources/ewol/widget/meta/ParameterList.h similarity index 100% rename from Sources/libewol/ewol/widget/meta/ParameterList.h rename to Sources/ewol/widget/meta/ParameterList.h diff --git a/Sources/libewol/ewol/widget/meta/StdPopUp.cpp b/Sources/ewol/widget/meta/StdPopUp.cpp similarity index 100% rename from Sources/libewol/ewol/widget/meta/StdPopUp.cpp rename to Sources/ewol/widget/meta/StdPopUp.cpp diff --git a/Sources/libewol/ewol/widget/meta/StdPopUp.h b/Sources/ewol/widget/meta/StdPopUp.h similarity index 100% rename from Sources/libewol/ewol/widget/meta/StdPopUp.h rename to Sources/ewol/widget/meta/StdPopUp.h diff --git a/Sources/libewol/file.mk b/Sources/file.mk similarity index 100% rename from Sources/libewol/file.mk rename to Sources/file.mk diff --git a/Java/PROJECT_NAME.java b/Sources/java/PROJECT_NAME.java similarity index 100% rename from Java/PROJECT_NAME.java rename to Sources/java/PROJECT_NAME.java diff --git a/Java/src/org/ewol/interfaceAudio.java b/Sources/java/src/org/ewol/interfaceAudio.java similarity index 100% rename from Java/src/org/ewol/interfaceAudio.java rename to Sources/java/src/org/ewol/interfaceAudio.java diff --git a/Java/src/org/ewol/interfaceJNI.java b/Sources/java/src/org/ewol/interfaceJNI.java similarity index 100% rename from Java/src/org/ewol/interfaceJNI.java rename to Sources/java/src/org/ewol/interfaceJNI.java diff --git a/Java/src/org/ewol/interfaceOpenGL.java b/Sources/java/src/org/ewol/interfaceOpenGL.java similarity index 100% rename from Java/src/org/ewol/interfaceOpenGL.java rename to Sources/java/src/org/ewol/interfaceOpenGL.java diff --git a/Java/src/org/ewol/interfaceSurfaceView.java b/Sources/java/src/org/ewol/interfaceSurfaceView.java similarity index 100% rename from Java/src/org/ewol/interfaceSurfaceView.java rename to Sources/java/src/org/ewol/interfaceSurfaceView.java diff --git a/Sources/libagg b/Sources/libagg deleted file mode 160000 index 197525df..00000000 --- a/Sources/libagg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 197525dfc6cbe138767392466ad4f450aa7b2bd6 diff --git a/Sources/libetk/Generic.mk b/Sources/libetk/Generic.mk deleted file mode 100644 index cbdb702d..00000000 --- a/Sources/libetk/Generic.mk +++ /dev/null @@ -1,28 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := etk -LOCAL_LIBRARIES := libzip - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) - -ifeq ($(DEBUG),1) -LOCAL_CFLAGS := -Wno-write-strings \ - -Wall -else -LOCAL_CFLAGS := -Wno-write-strings \ - -DMODE_RELEASE -endif - - -# load the common sources file of the platform -include $(LOCAL_PATH)/file.mk - -LOCAL_SRC_FILES := $(FILE_LIST) - - - - - -include $(BUILD_STATIC_LIBRARY) diff --git a/Sources/libetk/etk/Debug.cpp b/Sources/libetk/etk/Debug.cpp deleted file mode 100644 index 6e815cd5..00000000 --- a/Sources/libetk/etk/Debug.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - -// Max string size : (wide screan console nb caractere) -#define EDN_LOG_MAX_LENGTH 250 - - -#define FUNCTION_NAME_SIZE (70) - -void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName, const char* libName) -{ - char tmpName[FUNCTION_NAME_SIZE] = ""; - - if (NULL == className) { - if (NULL == libName) { - snprintf(tmpName, FUNCTION_NAME_SIZE-1, "???????? | (l=%5d) %s ",ligne, funcName); - } else { - snprintf(tmpName, FUNCTION_NAME_SIZE-1, "%s | (l=%5d) %s ",libName, ligne, funcName); - } - } else { - if (NULL == libName) { - snprintf(tmpName, FUNCTION_NAME_SIZE-1, "???????? | (l=%5d) %s::%s ",ligne, className, funcName); - } else { - snprintf(tmpName, FUNCTION_NAME_SIZE-1, "%s | (l=%5d) %s::%s ", libName, ligne, className, funcName); - } - } - tmpName[FUNCTION_NAME_SIZE-4] = ' '; - tmpName[FUNCTION_NAME_SIZE-3] = '|'; - tmpName[FUNCTION_NAME_SIZE-2] = ' '; - tmpName[FUNCTION_NAME_SIZE-1] = '\0'; - etk::cout << tmpName; -} - -void TOOLS_DisplayTime(void) -{ - char tmpdata[50]; -#ifdef __TARGET_OS__Android - struct timeval now; - gettimeofday(&now, NULL); - sprintf(tmpdata, " %2dh %2dmin %2ds | ", (int32_t)(now.tv_sec/3600)%24, (int32_t)(now.tv_sec/60)%60, (int32_t)(now.tv_sec%60)); -#else - time_t rawtime; - struct tm * timeinfo; - time(&rawtime); - timeinfo = localtime(&rawtime); - sprintf(tmpdata, " %2dh %2dmin %2ds | ", (timeinfo->tm_hour)%24, timeinfo->tm_min, timeinfo->tm_sec); -#endif - etk::cout << tmpdata ; -} - - -#ifdef __TARGET_OS__Android -etk::logLevel_te g_requestedLevel = etk::LOG_LEVEL_VERBOSE; -#else -etk::logLevel_te g_requestedLevel = etk::LOG_LEVEL_ERROR; -#endif -void GeneralDebugSetLevel(etk::logLevel_te ccc) { - g_requestedLevel = ccc; -} - diff --git a/Sources/libetk/etk/Debug.h b/Sources/libetk/etk/Debug.h deleted file mode 100644 index 6df6fdb9..00000000 --- a/Sources/libetk/etk/Debug.h +++ /dev/null @@ -1,86 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - -#ifndef __ETK_DEBUG_H__ -#define __ETK_DEBUG_H__ - -// Log Message System For EDN -void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName, const char* libName); -void TOOLS_DisplayTime(void); - - -#undef __class__ -#define __class__ (NULL) - -extern etk::logLevel_te g_requestedLevel; -void GeneralDebugSetLevel(etk::logLevel_te ccc); - -#define ETK_DBG_COMMON(libName, info, data) do { \ - if (info <= g_requestedLevel) { \ - etk::cout << etk::cstart << info; \ - TOOLS_DisplayTime(); \ - TOOLS_DisplayFuncName(__LINE__, __class__, __func__, libName); \ - etk::cout << data; \ - etk::cout < 0 -# define ETK_WARNING(libName, data) ETK_DBG_COMMON(libName, etk::LOG_LEVEL_WARNING, data) -# define ETK_ERROR(libName, data) ETK_DBG_COMMON(libName, etk::LOG_LEVEL_ERROR, data) -#else -# define ETK_WARNING(libName, data) do {}while(0) -# define ETK_ERROR(libName, data) do {}while(0) -#endif - -#if DEBUG_LEVEL > 1 -# define ETK_INFO(libName, data) ETK_DBG_COMMON(libName, etk::LOG_LEVEL_INFO, data) -#else -# define ETK_INFO(libName, data) do {}while(0) -#endif - -#if DEBUG_LEVEL > 2 -# define ETK_DEBUG(libName, data) ETK_DBG_COMMON(libName, etk::LOG_LEVEL_DEBUG, data) -#else -# define ETK_DEBUG(libName, data) do {}while(0) -#endif - -#if DEBUG_LEVEL > 3 -# define ETK_VERBOSE(libName, data) ETK_DBG_COMMON(libName, etk::LOG_LEVEL_VERBOSE, data) -#else -# define ETK_VERBOSE(libName, data) do {}while(0) -#endif - -#define ETK_ASSERT(libName, cond, data) do { \ - if (!(cond)) { \ - ETK_CRITICAL(libName, data); \ - assert(!#cond); \ - } \ - } while (0) - -#if DEBUG_LEVEL > 1 -# define ETK_CHECK_INOUT(libName, cond) ETK_ASSERT(libName, (cond), "Internal input error : "#cond) -#elif DEBUG_LEVEL > 0 -# define ETK_CHECK_INOUT(libName, cond) do { \ - if (!(cond)) { \ - ETK_CRITICAL(libName, "Internal input error : "#cond); \ - } \ - } while (0) -#else -# define ETK_CHECK_INOUT(libName, cond) do { } while (0) -#endif - -#define ETK_TODO(libName, data) ETK_INFO(libName, "TODO : " << data) - -#endif diff --git a/Sources/libetk/etk/DebugInternal.cpp b/Sources/libetk/etk/DebugInternal.cpp deleted file mode 100644 index fc83830e..00000000 --- a/Sources/libetk/etk/DebugInternal.cpp +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -const char * etkLibName = "Etk "; diff --git a/Sources/libetk/etk/DebugInternal.h b/Sources/libetk/etk/DebugInternal.h deleted file mode 100644 index d94fad15..00000000 --- a/Sources/libetk/etk/DebugInternal.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include "etk/Debug.h" - -#ifndef __ETK_DEBUG_INTERNAL_H__ -#define __ETK_DEBUG_INTERNAL_H__ - - -extern const char * etkLibName; - -#define TK_CRITICAL(data) ETK_CRITICAL(etkLibName, data) -#define TK_WARNING(data) ETK_WARNING(etkLibName, data) -#define TK_ERROR(data) ETK_ERROR(etkLibName, data) -#define TK_INFO(data) ETK_INFO(etkLibName, data) -#define TK_DEBUG(data) ETK_DEBUG(etkLibName, data) -#define TK_VERBOSE(data) ETK_VERBOSE(etkLibName, data) -#define TK_ASSERT(cond, data) ETK_ASSERT(etkLibName, cond, data) -#define TK_CHECK_INOUT(cond) ETK_CHECK_INOUT(etkLibName, cond) -#define TK_TODO(cond) ETK_TODO(etkLibName, cond) - -#endif - diff --git a/Sources/libetk/etk/MessageFifo.h b/Sources/libetk/etk/MessageFifo.h deleted file mode 100644 index b7ec2a13..00000000 --- a/Sources/libetk/etk/MessageFifo.h +++ /dev/null @@ -1,104 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_MESSAGE_FIFO_H__ -#define __ETK_MESSAGE_FIFO_H__ - -#include -#include -#include - -namespace etk -{ - template class MessageFifo - { - private : - etk::Mutex m_mutex; - etk::Semaphore m_semaphore; - etk::Vector m_data; - public : - MessageFifo(void) - { - // nothing to do ... - }; - ~MessageFifo(void) - { - // nothing to do ... - }; - - bool Wait(MY_TYPE &data) - { - m_mutex.Lock(); - // Check if data is not previously here - while(0==m_data.Size()) { - m_mutex.UnLock(); - m_semaphore.Wait(); - m_mutex.Lock(); - } - // End Waiting message : - if (0 - - - -const etk::convertionTable_ts etk::constConvertionTable[] = { - // haveBackSlash, inputValue, newValue - { false , '(' , REGEXP_OPCODE_PTHESE_IN}, - { true , '(' , (int16_t)'('}, - { false , ')' , REGEXP_OPCODE_PTHESE_OUT}, - { true , ')' , (int16_t)')'}, - { false , '[' , REGEXP_OPCODE_BRACKET_IN}, - { true , '[' , (int16_t)'['}, - { false , ']' , REGEXP_OPCODE_BRACKET_OUT}, - { true , ']' , (int16_t)']'}, - { false , '{' , REGEXP_OPCODE_BRACE_IN}, - { true , '{' , (int16_t)'{'}, - { false , '}' , REGEXP_OPCODE_BRACE_OUT}, - { true , '}' , (int16_t)'}'}, - { false , '-' , REGEXP_OPCODE_TO}, - { true , '-' , (int16_t)'-'}, - { false , '*' , REGEXP_OPCODE_STAR}, - { true , '*' , (int16_t)'*'}, - { false , '.' , REGEXP_OPCODE_DOT}, - { true , '.' , (int16_t)'.'}, - { false , '?' , REGEXP_OPCODE_QUESTION}, - { true , '?' , (int16_t)'?'}, - { false , '+' , REGEXP_OPCODE_PLUS}, - { true , '+' , (int16_t)'+'}, - { false , '|' , REGEXP_OPCODE_PIPE}, - { true , '|' , (int16_t)'|'}, - { false , '^' , REGEXP_OPCODE_START_OF_LINE}, - { true , '^' , (int16_t)'^'}, - { false , '$' , REGEXP_OPCODE_END_OF_LINE}, - { true , '$' , (int16_t)'$'}, - { true , 'd' , REGEXP_OPCODE_DIGIT}, - { true , 'D' , REGEXP_OPCODE_DIGIT_NOT}, - { true , 'l' , REGEXP_OPCODE_LETTER}, - { true , 'L' , REGEXP_OPCODE_LETTER_NOT}, - { true , 's' , REGEXP_OPCODE_SPACE}, - { true , 'S' , REGEXP_OPCODE_SPACE_NOT}, - { true , 'w' , REGEXP_OPCODE_WORD}, - { true , 'W' , REGEXP_OPCODE_WORD_NOT}, - { true , 'a' , (int16_t)'\a'}, - { true , 'b' , (int16_t)'\b'}, - { true , 'e' , 0x001B}, // Escape character - { true , 'f' , (int16_t)'\f'}, - { true , 'n' , (int16_t)'\n'}, - { true , 'r' , (int16_t)'\r'}, - { true , 't' , (int16_t)'\t'}, - { true , 'v' , (int16_t)'\v'}, - { true , '\\' , (int16_t)'\\'}, - { true , '&' , (int16_t)'&'}, - { true , '0' , (int16_t)'\0'}, - { true , '@' , REGEXP_OPCODE_NO_CHAR}, -}; -const int32_t etk::constConvertionTableSize = sizeof(etk::constConvertionTable) / sizeof(etk::convertionTable_ts) ; - - -void etk::DisplayData(etk::Vector &data) -{ - int32_t i; - for (i=0; i<(int32_t)data.Size() ; i++) { - etk::cout<< (char)(data[i]&0x00FF ); - } -} - -void etk::DisplayElem(etk::Vector &data, int32_t start, int32_t stop) -{ - int32_t i; - etk::cout<< ETK_BASH_COLOR_NORMAL; - for (i=start; i<(int32_t)data.Size() && i &data, int32_t startPos) -{ - int32_t pos = startPos; - int32_t nbOpen = 0; - // special case of the (...) or | ==> we search '|' or ')' - if( REGEXP_OPCODE_PTHESE_OUT == data[pos] - || REGEXP_OPCODE_PIPE == data[pos]) { - return 0; - } - // find size ... - while (pos < (int32_t)data.Size() ) { - if(REGEXP_OPCODE_PTHESE_IN == data[pos]) { - // find a sub section : - nbOpen++; - } else if(0 < nbOpen) { - if (REGEXP_OPCODE_PTHESE_OUT == data[pos]) - { - nbOpen--; - if (0 > nbOpen) { - TK_ERROR("Error in the (...) find element at "<< pos); - return -1; - } - } - } else if( REGEXP_OPCODE_PTHESE_OUT == data[pos] - || REGEXP_OPCODE_PIPE == data[pos]) - { - // Find the end of the (...) - // just return the size inside - int32_t sizeInside = pos - startPos; - if (0 >= sizeInside) { - TK_ERROR("Error in the (...) no data at "<< pos-1); - return -1; - } else { - return sizeInside; - } - } - pos++; - } - return pos - startPos; -} - -int32_t etk::GetLenOfPThese(etk::Vector &data, int32_t startPos) -{ - int32_t pos = startPos; - int32_t nbOpen = 0; - // special case of the (...) or | ==> we search '|' or ')' - if( REGEXP_OPCODE_PTHESE_OUT == data[pos]) { - return 0; - } else if( REGEXP_OPCODE_PTHESE_IN == data[pos]) - { - pos++; - // find size ... - while (pos < (int32_t)data.Size() ) { - if(REGEXP_OPCODE_PTHESE_IN == data[pos]) { - // find a sub section : - nbOpen++; - } else if(0 < nbOpen) { - if (REGEXP_OPCODE_PTHESE_OUT == data[pos]) - { - nbOpen--; - if (0 > nbOpen) { - TK_ERROR("Error in the (...) find element at "<< pos); - return -1; - } - } - } else if( REGEXP_OPCODE_PTHESE_OUT == data[pos]) - { - // Find the end of the (...) - // just return the size inside - int32_t sizeInside = pos - startPos-1; - if (0 >= sizeInside) { - TK_ERROR("Error in the (...) no data at "<< pos-1); - return -1; - } else { - return sizeInside; - } - } - pos++; - } - } else { - return -1; - } - return 0; -} - - -int32_t etk::GetLenOfBracket(etk::Vector &data, int32_t startPos) -{ - int32_t pos = startPos; - // special case of the (...) or | ==> we search '|' or ')' - if( REGEXP_OPCODE_BRACKET_OUT == data[pos]) { - return 0; - } else if( REGEXP_OPCODE_BRACKET_IN == data[pos]) { - pos++; - // find size ... - while (pos < (int32_t)data.Size() ) { - if(REGEXP_OPCODE_BRACKET_OUT == data[pos]) { - // Find the end of the [...] - // just return the size inside - int32_t sizeInside = pos - startPos -1 ; - if (0 >= sizeInside) { - TK_ERROR("Error in the [...] no data at "<< pos-1); - return sizeInside; - } else { - return sizeInside; - } - } else if( REGEXP_OPCODE_TO != data[pos] - && ( 0 > data[pos] - || 0xFF < data[pos]) ) - { - TK_ERROR("Error in the [...] not permited element at "<< pos << " '" << (char)data[pos] << "'"); - return false; - } - pos++; - } - } else { - return -1; - } - return 0; -} - - -int32_t etk::GetLenOfBrace(etk::Vector &data, int32_t startPos) -{ - int32_t pos = startPos; - // special case of the (...) or | ==> we search '|' or ')' - if( REGEXP_OPCODE_BRACE_OUT == data[pos]) { - return 0; - } else if( REGEXP_OPCODE_BRACE_IN == data[pos]) { - pos++; - // find size ... - while (pos < (int32_t)data.Size() ) { - if(REGEXP_OPCODE_BRACE_OUT == data[pos]) { - // Find the end of the [...] - // just return the size inside - int32_t sizeInside = pos - startPos -1 ; - if (0 >= sizeInside) { - TK_ERROR("Error in the {...} no data at "<< pos-1); - return sizeInside; - } else { - return sizeInside; - } - } else if( ',' != data[pos] - && ( '0' > data[pos] - || '9' < data[pos]) ) - { - TK_ERROR("Error in the {...} not permited element at "<< pos << " '" << (char)data[pos] << "'"); - return false; - } - pos++; - } - } else { - return -1; - } - return 0; -} - - -int32_t etk::GetLenOfNormal(etk::Vector &data, int32_t startPos) -{ - int32_t pos = startPos; - - // find size ... - while (pos < (int32_t)data.Size() ) { - switch(data[pos]) - { - case REGEXP_OPCODE_PTHESE_IN: - case REGEXP_OPCODE_PTHESE_OUT: - case REGEXP_OPCODE_BRACKET_IN: - case REGEXP_OPCODE_BRACKET_OUT: - case REGEXP_OPCODE_BRACE_IN: - case REGEXP_OPCODE_BRACE_OUT: - case REGEXP_OPCODE_TO: - case REGEXP_OPCODE_STAR: - case REGEXP_OPCODE_DOT: - case REGEXP_OPCODE_QUESTION: - case REGEXP_OPCODE_PLUS: - case REGEXP_OPCODE_PIPE: - case REGEXP_OPCODE_START_OF_LINE: - case REGEXP_OPCODE_END_OF_LINE: - case REGEXP_OPCODE_DIGIT: - case REGEXP_OPCODE_DIGIT_NOT: - case REGEXP_OPCODE_LETTER: - case REGEXP_OPCODE_LETTER_NOT: - case REGEXP_OPCODE_SPACE: - case REGEXP_OPCODE_SPACE_NOT: - case REGEXP_OPCODE_WORD: - case REGEXP_OPCODE_WORD_NOT: - { - // just return the size inside - int32_t sizeInside = pos - startPos; - if (0 >= sizeInside) { - TK_ERROR("Error in the normal data : no data ..."); - } - return sizeInside; - } - break; - default : - // nothing to do ... - break; - } - pos++; - } - return pos - startPos ; -} - - -bool etk::ParseBrace(etk::Vector &data, int32_t &min, int32_t &max) -{ - //TK_INFO("parse {...} in "; DisplayElem(data); ); - int32_t k=0; - - int32_t firstElement = 0; - int32_t SecondElement = 0; - - while(k= (char)data[k]) { - firstElement *=10; - firstElement += (char)data[k] - '0'; - } else { - TK_ERROR("Can not parse this element " << (char)data[k] << " at pos " << k); - return false; - } - k++; - } - if (k==data.Size()) { - SecondElement = firstElement; - } - while(k= (char)data[k]) { - SecondElement *=10; - SecondElement += (char)data[k] - '0'; - } else { - TK_ERROR("Can not parse this element " << (char)data[k] << " at pos " << k); - return false; - } - k++; - } - -allIsSet: - if (SecondElement == 0 && firstElement != 0) { - min = 0; - max = firstElement; - } else { - min = firstElement; - max = SecondElement; - } - if (min > max) { - TK_ERROR("Minimum=" << min << " can not be < maximum=" << max ); - return false; - } - return true; -} - - diff --git a/Sources/libetk/etk/RegExp.h b/Sources/libetk/etk/RegExp.h deleted file mode 100644 index 9b0bcaf8..00000000 --- a/Sources/libetk/etk/RegExp.h +++ /dev/null @@ -1,2109 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __TK_REG_EXP_H__ -#define __TK_REG_EXP_H__ - -#include -#include -#include -#include -#include - -namespace etk { - -/* -normal mode : - (...) sub element is separate with | - \d Digits [0-9] - \D NOT a digit [^0-9] - \l Letters [a-zA-Z] - \L NOT a Letter [^a-zA-Z] - \s Whitespace [ \t\n\r\f\v] - \S NOT Whitespace [^ \t\n\r\f\v] - \w "Word" character [a-zA-Z0-9_] - \W NOT a "Word" character [^a-zA-Z0-9_] - \@ at the start or the end not in the parsing of element ==> check if \w is not present (other regExp will be <> ...) - [anjdi] or [a-gt-j] range - . dot [^\x00-\x08\x0A-\x1F\x7F] -==> TODO : - $ End / Start of line of line ==> ce sera un truc suplémentaire comme le \@ - ^in the [] invertion of the range element - -multiplicity : - * ==> {0, 2147483647} - ? ==> {0, 1} - + ==> {1, 2147483647} - {x} ==> {x, x} - {x,y} ==> {x, y} -*/ - - -// internal define to permit to have all needed system -#define REGEXP_OPCODE_PTHESE_IN (-300) /* ( */ -#define REGEXP_OPCODE_PTHESE_OUT ( 300) /* ) */ -#define REGEXP_OPCODE_BRACKET_IN (-301) /* [ */ -#define REGEXP_OPCODE_BRACKET_OUT ( 301) /* ] */ -#define REGEXP_OPCODE_BRACE_IN (-302) /* { */ -#define REGEXP_OPCODE_BRACE_OUT ( 302) /* } */ -#define REGEXP_OPCODE_TO (-305) /* - */ -#define REGEXP_OPCODE_STAR (-306) /* * */ -#define REGEXP_OPCODE_DOT (-307) /* . */ -#define REGEXP_OPCODE_QUESTION (-308) /* ? */ -#define REGEXP_OPCODE_PLUS (-309) /* + */ -#define REGEXP_OPCODE_PIPE (-310) /* | */ -#define REGEXP_OPCODE_START_OF_LINE (-311) /* ^ this is also NOT, but not manage */ -#define REGEXP_OPCODE_END_OF_LINE (-312) /* $ */ -#define REGEXP_OPCODE_DIGIT ( 313) /* \d */ -#define REGEXP_OPCODE_DIGIT_NOT (-313) /* \D */ -#define REGEXP_OPCODE_LETTER ( 314) /* \l */ -#define REGEXP_OPCODE_LETTER_NOT (-314) /* \L */ -#define REGEXP_OPCODE_SPACE ( 315) /* \s */ -#define REGEXP_OPCODE_SPACE_NOT (-315) /* \S */ -#define REGEXP_OPCODE_WORD ( 316) /* \w */ -#define REGEXP_OPCODE_WORD_NOT (-316) /* \W */ -#define REGEXP_OPCODE_NO_CHAR (-317) /* \@ */ - -typedef struct { - bool haveBackSlash; - char inputValue; - int16_t newValue; -}convertionTable_ts; - -extern const convertionTable_ts constConvertionTable[]; -extern const int32_t constConvertionTableSize; - -void DisplayData(etk::Vector &data); -void DisplayElem(etk::Vector &data, int32_t start=0, int32_t stop=0x7FFFFFFF); -char * levelSpace(int32_t level); -int32_t GetLenOfPTheseElem(etk::Vector &data, int32_t startPos); -int32_t GetLenOfPThese(etk::Vector &data, int32_t startPos); -int32_t GetLenOfBracket(etk::Vector &data, int32_t startPos); -int32_t GetLenOfBrace(etk::Vector &data, int32_t startPos); -int32_t GetLenOfNormal(etk::Vector &data, int32_t startPos); -bool ParseBrace(etk::Vector &data, int32_t &min, int32_t &max); - - -#undef __class__ -#define __class__ "etk::RegExpNode" - -/** - * @brief Node Elements for every-one - */ -template class RegExpNode{ - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNode(void) - { - SetMult(1,1); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - virtual ~RegExpNode(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - virtual int32_t Generate(etk::Vector &data) - { - return 0; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - virtual bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - virtual void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@???@ {" << GetMultMin() << "," << GetMultMax() << "} subdata="; DisplayElem(m_RegExpData);); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void SetMult(int32_t min, int32_t max) - { - m_multipleMin = etk_max(min, 0); - m_multipleMax = etk_max(max, 1); - } - protected: - /** - * @brief - * @param[in,out] - * @return - */ - int32_t GetMultMin(void) - { - return m_multipleMin; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t GetMultMax(void) - { - return m_multipleMax; - }; - protected : - int32_t m_multipleMin; //!< minimum repetition (included) - int32_t m_multipleMax; //!< maximum repetition (included) - // Data Section ... (can have no data...) - etk::Vector m_RegExpData; //!< data to parse and compare in some case ... -}; - -#undef __class__ -#define __class__ "etk::RegExpNodeValue" - -template class RegExpNodeValue : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeValue(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeValue(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t Generate(etk::Vector &data) - { - RegExpNode::m_RegExpData = data; - //TK_DEBUG("Request Parse \"Value\" data="; DisplayElem(RegExpNode::m_RegExpData);); - m_data.Clear(); - for (int32_t i=0; i::m_RegExpData.Size(); i++) { - m_data.PushBack((char)RegExpNode::m_RegExpData[i]); - } - return data.Size(); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : Value{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - if (0==m_data.Size()) { - TK_ERROR("No data inside type elemTypeValue"); - return false; - } - //TK_DEBUG("check element value : '" << m_data[0] << "'"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind == true; j++) { - int32_t ofset = 0; - int32_t k; - for (k=0; findLen+k=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@Value@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData); etk::cout<< " data: "; DisplayData(m_data); ); - }; - protected : - // SubNodes : - etk::Vector m_data; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeBracket" - -template class RegExpNodeBracket : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeBracket(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeBracket(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t Generate(etk::Vector &data) - { - RegExpNode::m_RegExpData = data; - //TK_DEBUG("Request Parse [...] data="; DisplayElem(RegExpNode::m_RegExpData);); - m_data.Clear(); - - char lastElement = 'a'; - bool multipleElement = false; - // - for (int32_t k=0; k::m_RegExpData.Size(); k++) { - if (RegExpNode::m_RegExpData[k] == REGEXP_OPCODE_TO && multipleElement == true) { - TK_ERROR("Can not have 2 consecutive - in [...]"); - return 0; - } else if (multipleElement == true) { - char j='\0'; - for (j=lastElement+1; j <= (char)RegExpNode::m_RegExpData[k]; j++) { - m_data.PushBack(j); - } - multipleElement = false; - } else if(RegExpNode::m_RegExpData[k] == REGEXP_OPCODE_TO) { - multipleElement = true; - } else { - lastElement = (char)RegExpNode::m_RegExpData[k]; - m_data.PushBack(lastElement); - } - } - // check size ... - if (m_data.Size() == 0) { - TK_ERROR("No data inside [...] "); - return 0; - } - return data.Size(); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : [...]{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - if (0==m_data.Size()) { - TK_ERROR("No data inside type elemTypeValue"); - return false; - } - //TK_DEBUG("one of element value List : "; DisplayData(element->m_data);); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - int32_t i; - tmpFind=false; - for (i=0; i=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@[...]@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData); etk::cout<< " data: "; DisplayData(m_data); ); - }; - protected : - // SubNodes : - etk::Vector m_data; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeDigit" - -template class RegExpNodeDigit : public RegExpNode { - public : - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeDigit(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeDigit(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : Digit{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} : "<< data[currentPos] << " lenMax=" << lenMax); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - //TK_DEBUG("compare : " << tmpVal); - if( '0' <= tmpVal - && '9' >= tmpVal) - { - //TK_DEBUG("find ++"); - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@Digit@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeDigitNot" - -template class RegExpNodeDigitNot : public RegExpNode { - public : - RegExpNodeDigitNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeDigitNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : DigitNot{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( '0' > tmpVal - || '9' < tmpVal) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@DigitNot@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeLetter" - -template class RegExpNodeLetter : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeLetter(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeLetter(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : Letter{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ( 'a' <= tmpVal - && 'z' >= tmpVal ) - || ( 'A' <= tmpVal - && 'Z' >= tmpVal )) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@Letter@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeLetterNot" - -template class RegExpNodeLetterNot : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeLetterNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeLetterNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : LetterNot{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ( 'a' > tmpVal - && 'Z' < tmpVal ) - || 'A' > tmpVal - || 'z' < tmpVal ) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@LetterNot@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeWhiteSpace" - -template class RegExpNodeWhiteSpace : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeWhiteSpace(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeWhiteSpace(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : Space{" << m_multipleMin << "," << m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ' ' == tmpVal - || '\t' == tmpVal - || '\n' == tmpVal - || '\r' == tmpVal - || '\f' == tmpVal - || '\v' == tmpVal ) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@Space@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeWhiteSpaceNot" - -template class RegExpNodeWhiteSpaceNot : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeWhiteSpaceNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeWhiteSpaceNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : SpaceNot{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ' ' != tmpVal - && '\t' != tmpVal - && '\n' != tmpVal - && '\r' != tmpVal - && '\f' != tmpVal - && '\v' != tmpVal ) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@SpaceNot@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeWordChar" - -template class RegExpNodeWordChar : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeWordChar(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeWordChar(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : Word{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ( 'a' <= tmpVal - && 'z' >= tmpVal ) - || ( 'A' <= tmpVal - && 'Z' >= tmpVal ) - || ( '0' <= tmpVal - && '9' >= tmpVal )) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@Word@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeWordCharNot" - -template class RegExpNodeWordCharNot : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeWordCharNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeWordCharNot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : WordNot{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ( 'A' > tmpVal - && '9' < tmpVal ) - || ( 'a' > tmpVal - && 'Z' < tmpVal ) - || '0' > tmpVal - || 'z' < tmpVal ) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@WordNot@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; -#undef __class__ -#define __class__ "etk::RegExpNodeDot" - -template class RegExpNodeDot : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeDot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeDot(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : '.'{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - // equivalent a : [^\x00-\x08\x0A-\x1F\x7F] - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind ==true && j < lenMax; j++) { - char tmpVal = data[currentPos+j]; - if( ( 0x08 < tmpVal - && 0x0A > tmpVal ) - || ( 0x1F < tmpVal - && 0x7F > tmpVal ) - || ( 0x7F < tmpVal - && 0xFF > tmpVal )) - { - findLen += 1; - } else { - tmpFind=false; - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@.@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; - -#undef __class__ -#define __class__ "etk::RegExpNodeSOL" - -template class RegExpNodeSOL : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeSOL(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeSOL(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - TK_INFO("Parse node : SOL{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@SOL@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; - -#undef __class__ -#define __class__ "etk::RegExpNodeEOL" - -template class RegExpNodeEOL : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodeEOL(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodeEOL(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - TK_INFO("Parse node : EOL{" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@EOL@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - }; -}; - -typedef struct { - int32_t start; - int32_t stop; -}elementPos_ts; - -#undef __class__ -#define __class__ "etk::RegExpNodePTheseElem" - -template class RegExpNodePThese; - -template class RegExpNodePTheseElem : public RegExpNode { - public : - - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodePTheseElem(void) - { - - }; - - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodePTheseElem(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t Generate(etk::Vector &data) - { - RegExpNode::m_RegExpData = data; - //TK_DEBUG("Request Parse (elem) data="; DisplayElem(RegExpNode::m_RegExpData);); - - int32_t pos = 0; - int32_t elementSize = 0; - etk::Vector tmpData; - while (pos < RegExpNode::m_RegExpData.Size()) { - tmpData.Clear(); - switch (RegExpNode::m_RegExpData[pos]) - { - case REGEXP_OPCODE_PTHESE_IN: - { - elementSize=GetLenOfPThese(RegExpNode::m_RegExpData, pos); - for (int32_t k=pos+1; k::m_RegExpData[k]); - } - RegExpNodePThese * myElem = new RegExpNodePThese(); - (void)myElem->Generate(tmpData); - // add to the subnode list : - m_subNode.PushBack(myElem); - // move current position ... - pos += elementSize+1; - } - break; - case REGEXP_OPCODE_PTHESE_OUT: - TK_ERROR("Impossible case : ')' " << pos); - return false; - - case REGEXP_OPCODE_BRACKET_IN: - { - elementSize=GetLenOfBracket(RegExpNode::m_RegExpData, pos); - for (int32_t k=pos+1; k::m_RegExpData[k]); - } - RegExpNodeBracket * myElem = new RegExpNodeBracket(); - (void)myElem->Generate(tmpData); - // add to the subnode list : - m_subNode.PushBack(myElem); - // move current position ... - pos += elementSize+1; - } - break; - case REGEXP_OPCODE_BRACKET_OUT: - TK_ERROR("Impossible case : ']' " << pos); - return false; - - case REGEXP_OPCODE_BRACE_IN: - { - elementSize=GetLenOfBrace(RegExpNode::m_RegExpData, pos); - for (int32_t k=pos+1; k::m_RegExpData[k]); - } - int32_t min = 0; - int32_t max = 0; - if (false == ParseBrace(tmpData, min, max)) { - return false; - } - SetMultiplicityOnLastNode(min, max); - pos += elementSize+1; - } - break; - case REGEXP_OPCODE_BRACE_OUT: - TK_ERROR("Impossible case : '}' " << pos); - return false; - - case REGEXP_OPCODE_TO: - TK_ERROR("Impossible case : '-' " << pos); - return false; - - case REGEXP_OPCODE_STAR: - SetMultiplicityOnLastNode(0, 0x7FFFFFFF); - break; - - case REGEXP_OPCODE_QUESTION: - SetMultiplicityOnLastNode(0, 1); - break; - - case REGEXP_OPCODE_PLUS: - SetMultiplicityOnLastNode(1, 0x7FFFFFFF); - break; - - case REGEXP_OPCODE_PIPE: - TK_ERROR("Impossible case : '|' " << pos); - return false; - - case REGEXP_OPCODE_DOT: - m_subNode.PushBack(new RegExpNodeDot()); - break; - - case REGEXP_OPCODE_START_OF_LINE: - m_subNode.PushBack(new RegExpNodeSOL()); - break; - - case REGEXP_OPCODE_END_OF_LINE: - m_subNode.PushBack(new RegExpNodeEOL()); - break; - - case REGEXP_OPCODE_DIGIT: - m_subNode.PushBack(new RegExpNodeDigit()); - break; - - case REGEXP_OPCODE_DIGIT_NOT: - m_subNode.PushBack(new RegExpNodeDigitNot()); - break; - - case REGEXP_OPCODE_LETTER: - m_subNode.PushBack(new RegExpNodeLetter()); - break; - - case REGEXP_OPCODE_LETTER_NOT: - m_subNode.PushBack(new RegExpNodeLetterNot()); - break; - - case REGEXP_OPCODE_SPACE: - m_subNode.PushBack(new RegExpNodeWhiteSpace()); - break; - - case REGEXP_OPCODE_SPACE_NOT: - m_subNode.PushBack(new RegExpNodeWhiteSpaceNot()); - break; - - case REGEXP_OPCODE_WORD: - m_subNode.PushBack(new RegExpNodeWordChar()); - break; - - case REGEXP_OPCODE_WORD_NOT: - m_subNode.PushBack(new RegExpNodeWordCharNot()); - break; - - default: - { - elementSize=GetLenOfNormal(RegExpNode::m_RegExpData, pos); - for (int32_t k=pos; k::m_RegExpData[k]); - } - RegExpNodeValue * myElem = new RegExpNodeValue(); - (void)myElem->Generate(tmpData); - // add to the subnode list : - m_subNode.PushBack(myElem); - // move current position ... - pos += elementSize-1; - } - break; - } - pos++; - } - return data.Size(); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : (Elem){" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - // NOTE 1 : Must done only one time in EVERY case ... - // NOTE 2 : All element inside must be OK - if (0 == m_subNode.Size()) { - return false; - } - int32_t tmpCurrentPos = currentPos; - for (int32_t i=0; iParse(data, tmpCurrentPos, lenMax, tmpFindLen)) { - findLen = 0; - return false; - } else { - tmpCurrentPos += tmpFindLen; - } - } - findLen = tmpCurrentPos - currentPos; - return true; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - TK_INFO("Find NODE : " << levelSpace(level) << "@(Elem)@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - for(int32_t i=0; iDisplay(level+1); - } - }; - protected : - // SubNodes : - etk::Vector*> m_subNode; - private : - /** - * @brief Set the number of repeate time on a the last node in the list ... - * - * @param[in] min Minimum of the multiplicity - * @param[in] max Maximum of the multiplicity - * - * @return true if we find the node, false otherwise - * - */ - bool SetMultiplicityOnLastNode(int32_t min, int32_t max) - { - if (0==m_subNode.Size()) { - TK_ERROR("Set multiplicity on an inexistant element ...."); - return false; - } - RegExpNode * myNode = m_subNode[m_subNode.Size()-1]; - if (NULL==myNode) { - TK_ERROR("INTERNAL error ==> node not generated"); - return false; - } - myNode->SetMult(min, max); - return true; - } -}; - -#undef __class__ -#define __class__ "etk::RegExpNodePThese" - -template class RegExpNodePThese : public RegExpNode { - public : - /** - * @brief - * @param[in,out] - * @return - */ - RegExpNodePThese(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExpNodePThese(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t Generate(etk::Vector &data) - { - RegExpNode::m_RegExpData = data; - //TK_DEBUG("Request Parse (...) data="; DisplayElem(RegExpNode::m_RegExpData);); - //Find all the '|' in the string (and at the good level ...) - int32_t pos = 0; - int32_t elementSize = GetLenOfPTheseElem(RegExpNode::m_RegExpData, pos); - // generate all the "elemTypePTheseElem" of the Node - while (elementSize>0) { - // geerate output deta ... - etk::Vector tmpData; - for (int32_t k=pos; k::m_RegExpData[k]); - } - RegExpNodePTheseElem * myElem = new RegExpNodePTheseElem(); - (void)myElem->Generate(tmpData); - // add to the subnode list : - m_subNode.PushBack(myElem); - pos += elementSize+1; - //TK_DEBUG("plop="; DisplayElem(data, pos, pos+1);); - elementSize = GetLenOfPTheseElem(RegExpNode::m_RegExpData, pos); - //TK_DEBUG("find " << elementSize << " elements"); - } - if (0 == pos && 0 == elementSize) { - TK_ERROR("No data in the (...) element at " << pos); - return false; - } - return data.Size(); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool Parse(CLASS_TYPE &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) - { - findLen = 0; - //TK_INFO("Parse node : (...){" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "}"); - if (0 == m_subNode.Size()) { - return false; - } - bool tmpFind = true; - int32_t j; - for (j=0; j::m_multipleMax && tmpFind == true ; j++) { - tmpFind = false; - for (int32_t i=0; iParse(data, currentPos+findLen, lenMax, tmpFindLen)) { - findLen += tmpFindLen; - tmpFind = true; - } - } - } - if( j>=RegExpNode::m_multipleMin - && j<=RegExpNode::m_multipleMax - && findLen>0 ) - { - //TK_DEBUG("find " << findLen); - return true; - } else if( 0 == RegExpNode::m_multipleMin ) { - //TK_DEBUG("find size=0"); - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(int32_t level) - { - if (-1 == level) { - TK_INFO("regExp :"; DisplayElem(RegExpNode::m_RegExpData);); - } else { - TK_INFO("Find NODE : " << levelSpace(level) << "@(...)@ {" << RegExpNode::m_multipleMin << "," << RegExpNode::m_multipleMax << "} subdata="; DisplayElem(RegExpNode::m_RegExpData);); - for(int32_t i=0; iDisplay(level+1); - } - } - }; - - protected : - // SubNodes : - etk::Vector*> m_subNode; - //int32_t m_posPthese; //!< position of the element is detected in the output element -}; -#undef __class__ -#define __class__ "etk::RegExp" - -// Regular expression manager -template class RegExp { - // public API : - public: - // create the regular expression - - /** - * @brief - * @param[in,out] - * @return - */ - RegExp(const char *exp) - { - m_isOk = false; - m_areaFind.start=0; - m_areaFind.stop=0; - m_notBeginWithChar = false; - m_notEndWithChar = false; - SetRegExp(exp); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - RegExp(etk::UString &exp) - { - m_isOk = false; - m_areaFind.start=0; - m_areaFind.stop=0; - m_notBeginWithChar = false; - m_notEndWithChar = false; - SetRegExp(exp); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - RegExp(void) - { - m_isOk = false; - m_areaFind.start=0; - m_areaFind.stop=0; - m_notBeginWithChar = false; - m_notEndWithChar = false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - ~RegExp(void) - { - // TODO : remove all under nodes... - m_isOk = false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void SetRegExp(const char *exp) - { - TK_CHECK_INOUT(exp); - etk::UString expressionRequested = exp; - SetRegExp(expressionRequested); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void SetRegExp(etk::UString &expressionRequested) - { - m_expressionRequested = expressionRequested; // TODO : Must be deprecated ... - etk::Vector tmpExp; - - //TK_DEBUG("Parse RegExp : " << expressionRequested.c_str() ); - m_isOk = false; - m_areaFind.start=0; - m_areaFind.stop=0; - m_notBeginWithChar = false; - m_notEndWithChar = false; - - // TODO : Check this ... ==> could create some errors ... - char * exp = expressionRequested.c_str(); - int32_t regExpLen = strlen(exp); - // change in the regular Opcode ==> replace \x with the corect element ... x if needed - int32_t iii; - int32_t countBraceIn = 0; - int32_t countBraceOut = 0; - int32_t countPTheseIn = 0; - int32_t countPTheseOut = 0; - int32_t countBracketIn = 0; - int32_t countBracketOut = 0; - for (iii=0; iii=regExpLen) { - TK_ERROR("Dangerous parse of the element pos " << iii << " \\ with nothing after"); - // TODO : Generate Exeption ... - return; - } - int32_t j; - // Find the element in the list... - for (j=0; j0 - && REGEXP_OPCODE_NO_CHAR == tmpExp[0]) - { - //TK_DEBUG("=> must not begin with char"); - m_notBeginWithChar = true; - // remove element - tmpExp.Erase(0); - } - if( tmpExp.Size()>0 - && REGEXP_OPCODE_NO_CHAR == tmpExp[tmpExp.Size()-1]) - { - //TK_DEBUG("=> must not end with char"); - m_notEndWithChar = true; - // remove element - tmpExp.Erase(tmpExp.Size()-1); - } - - if (tmpExp.Size() != m_exprRootNode.Generate(tmpExp) ) { - return; - } - // TODO : optimize node here ... - - //Display(); - - // all OK ... play again - m_isOk = true; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - etk::UString GetRegExp(void) - { - return m_expressionRequested; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool GetStatus(void) - { - return m_isOk; - }; - // process the regular expression - - /** - * @brief - * @param[in,out] - * @return - */ - bool Process( CLASS_TYPE &SearchIn, - int32_t startPos, - int32_t endPos, - char escapeChar=0) - { - if (false == m_isOk) { - return false; - } - int32_t buflen = SearchIn.Size(); - if (endPos > buflen) { - endPos = buflen; - } - if (startPos > endPos) { - return false; - } - int32_t i = 0; - for (i=startPos; i0) { - char tmpVal = SearchIn[i-1]; - if( ( 'a' <= tmpVal - && 'z' >= tmpVal ) - || ( 'A' <= tmpVal - && 'Z' >= tmpVal ) - || ( '0' <= tmpVal - && '9' >= tmpVal ) - || ( '_' == tmpVal ) ) - { - // go on the next char ... - continue; - } - } - } - if (true == m_exprRootNode.Parse(SearchIn, i, maxlen, findLen)) { - if( 0!=escapeChar - && i>0) - { - if (escapeChar == (char)SearchIn[i-1]) { - //==> detected escape char ==> try find again ... - continue; - } - } - // Check end : - if (true == m_notEndWithChar) { - if (i+findLen < SearchIn.Size() ) { - char tmpVal = SearchIn[i+findLen]; - if( ( 'a' <= tmpVal - && 'z' >= tmpVal ) - || ( 'A' <= tmpVal - && 'Z' >= tmpVal ) - || ( '0' <= tmpVal - && '9' >= tmpVal ) - || ( '_' == tmpVal ) ) - { - // go on the next char ... - continue; - } - } - } - m_areaFind.start = i; - m_areaFind.stop = i + findLen; - /* - if (i == 812) { - std::cout << std::endl; - for(int32_t k=startPos; k buflen) { - endPos = buflen; - } - if (startPos > endPos) { - return false; - } - int32_t findLen=0; - int32_t maxlen = endPos-startPos; - if (true == m_notBeginWithChar) { - if (startPos>0) { - char tmpVal = SearchIn[startPos-1]; - if( ( 'a' <= tmpVal - && 'z' >= tmpVal ) - || ( 'A' <= tmpVal - && 'Z' >= tmpVal ) - || ( '0' <= tmpVal - && '9' >= tmpVal ) - || ( '_' == tmpVal ) ) - { - // go on the next char ... - return false; - } - } - } - if (true == m_exprRootNode.Parse(SearchIn, startPos, maxlen, findLen)) { - if( 0!=escapeChar - && startPos>0) - { - if (escapeChar == (char)SearchIn[startPos-1]) { - //==> detected escape char ==> try find again ... - return false; - } - } - // Check end : - if (true == m_notEndWithChar) { - if (startPos+findLen < SearchIn.Size() ) { - char tmpVal = SearchIn[startPos+findLen]; - if( ( 'a' <= tmpVal - && 'z' >= tmpVal ) - || ( 'A' <= tmpVal - && 'Z' >= tmpVal ) - || ( '0' <= tmpVal - && '9' >= tmpVal ) - || ( '_' == tmpVal ) ) - { - // go on the next char ... - return false; - } - } - } - m_areaFind.start = startPos; - m_areaFind.stop = startPos + findLen; - return true; - } - return false; - }; - - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t Start(void) - { - return m_areaFind.start; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - int32_t Stop(void) - { - return m_areaFind.stop; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void Display(void) - { - m_exprRootNode.Display(0); - }; - // internal parameters - private: - etk::UString m_expressionRequested; // TODO : Remove ... - elementPos_ts m_areaFind; //!< position around selection - RegExpNodePThese m_exprRootNode; //!< The tree where data is set - bool m_isOk; //!< Known if we can process with this regExp - bool m_notBeginWithChar; //!< The regular expression must not have previously a char [a-zA-Z0-9_] - bool m_notEndWithChar; //!< The regular expression must not have after the end a char [a-zA-Z0-9_] - // internal access - private: - /** - * @brief - * @param[in,out] - * @return - */ - bool CheckGoodPosition(etk::Vector tmpExp, int32_t &pos) - { - int16_t curentCode = tmpExp[pos]; - int16_t endCode = REGEXP_OPCODE_PTHESE_OUT; - char *input = (char*)"(...)"; - if (REGEXP_OPCODE_BRACKET_IN == curentCode) { - endCode = REGEXP_OPCODE_BRACKET_OUT; - input = (char*)"[...]"; - } else if (REGEXP_OPCODE_BRACE_IN == curentCode){ - endCode = REGEXP_OPCODE_BRACE_OUT; - input = (char*)"{x,x}"; - } - pos++; - if (pos >= (int32_t)tmpExp.Size()) { - TK_ERROR("ended with: ( or { or [ ... not permited"); - return false; - } - //TK_DEBUG(" ==> Find ELEMENT : ([{"); - // case dependent : - if( REGEXP_OPCODE_BRACKET_IN == curentCode - || REGEXP_OPCODE_BRACE_IN == curentCode) { - while(pos< (int32_t)tmpExp.Size()) { - //TK_DEBUG("check : " << tmpExp[pos]); - // if we find the end : - if (endCode == tmpExp[pos]) { - return true; - } else { - // otherwise, we check the error in the element ... - char *find = NULL; - switch (tmpExp[pos]) - { - case REGEXP_OPCODE_PTHESE_IN: find = (char*)"("; break; - case REGEXP_OPCODE_BRACKET_IN: find = (char*)"["; break; - case REGEXP_OPCODE_BRACE_IN: find = (char*)"{"; break; - case REGEXP_OPCODE_PTHESE_OUT: find = (char*)")"; break; - case REGEXP_OPCODE_BRACKET_OUT: find = (char*)"]"; break; - case REGEXP_OPCODE_BRACE_OUT: find = (char*)"}"; break; - case REGEXP_OPCODE_STAR: find = (char*)"*"; break; - case REGEXP_OPCODE_DOT: find = (char*)"."; break; - case REGEXP_OPCODE_QUESTION: find = (char*)"?"; break; - case REGEXP_OPCODE_PLUS: find = (char*)"+"; break; - case REGEXP_OPCODE_PIPE: find = (char*)"|"; break; - case REGEXP_OPCODE_START_OF_LINE: find = (char*)"^"; break; - case REGEXP_OPCODE_END_OF_LINE: find = (char*)"$"; break; - case REGEXP_OPCODE_DIGIT: find = (char*)"\\d"; break; - case REGEXP_OPCODE_DIGIT_NOT: find = (char*)"\\D"; break; - case REGEXP_OPCODE_LETTER: find = (char*)"\\l"; break; - case REGEXP_OPCODE_LETTER_NOT: find = (char*)"\\L"; break; - case REGEXP_OPCODE_SPACE: find = (char*)"\\s"; break; - case REGEXP_OPCODE_SPACE_NOT: find = (char*)"\\S"; break; - case REGEXP_OPCODE_WORD: find = (char*)"\\w"; break; - case REGEXP_OPCODE_WORD_NOT: find = (char*)"\\W"; break; - case REGEXP_OPCODE_NO_CHAR: find = (char*)"\\@"; break; - default: break; - } - if (NULL != find) { - (void)input; - TK_ERROR("can not have : '" << find << "' inside " << input << " element"); - return false; - } - } - pos++; - } - } else { - while(pos< (int32_t)tmpExp.Size()) { - if (endCode == tmpExp[pos]) { - // find the last element - return true; - } else if ( REGEXP_OPCODE_BRACE_OUT == tmpExp[pos]) { - TK_ERROR("find } inside a (...) without start {"); - return false; - } else if ( REGEXP_OPCODE_BRACKET_OUT == tmpExp[pos]) { - TK_ERROR("find ] inside a (...) without start ["); - return false; - } else { - if( REGEXP_OPCODE_PTHESE_IN == tmpExp[pos] - || REGEXP_OPCODE_BRACKET_IN == tmpExp[pos] - || REGEXP_OPCODE_BRACE_IN == tmpExp[pos]) - { - if (false==CheckGoodPosition(tmpExp, pos) ) { - return false; - } - } - } - pos++; - } - } - - // we did not find the cloder . ... - if (endCode == REGEXP_OPCODE_BRACKET_OUT) { - TK_ERROR("Missing ']' at the end"); - } - if (endCode == REGEXP_OPCODE_BRACE_OUT) { - TK_ERROR("Missing '}' at the end"); - } - if (endCode == REGEXP_OPCODE_PTHESE_OUT) { - TK_ERROR("Missing ')' at the end"); - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool CheckGoodPosition(etk::Vector tmpExp) - { - int32_t pos = 0; - while (pos < (int32_t)tmpExp.Size()) { - //TK_DEBUG("check : " << tmpExp[pos]); - if( REGEXP_OPCODE_PTHESE_IN == tmpExp[pos] - || REGEXP_OPCODE_BRACKET_IN == tmpExp[pos] - || REGEXP_OPCODE_BRACE_IN == tmpExp[pos]) - { - // attention the i position change inside the finction... - if (false==CheckGoodPosition(tmpExp, pos) ) { - TK_ERROR("Error at position : " << pos+1 ); - return false; - } else { - //TK_DEBUG(" <== Find ELEMENT : ]})"); - } - } else if(REGEXP_OPCODE_PTHESE_OUT == tmpExp[pos]) { - TK_ERROR("can find ')' with no start : ')'"); - return false; - } else if(REGEXP_OPCODE_BRACKET_OUT == tmpExp[pos]) { - TK_ERROR("can find ']' with no start : '['"); - return false; - } else if(REGEXP_OPCODE_BRACE_OUT == tmpExp[pos]) { - TK_ERROR("can find '}' with no start : '{'"); - return false; - } - pos++; - } - return true; - }; - - -}; - -}; // end of etk namespace - -#undef __class__ -#define __class__ (NULL) - -#endif diff --git a/Sources/libetk/etk/Stream.cpp b/Sources/libetk/etk/Stream.cpp deleted file mode 100644 index 78a226c2..00000000 --- a/Sources/libetk/etk/Stream.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include - -etk::CCout etk::cout; -etk::CEndl etk::endl; -etk::CHex etk::hex; -etk::CStart etk::cstart; - diff --git a/Sources/libetk/etk/Stream.h b/Sources/libetk/etk/Stream.h deleted file mode 100644 index f48c2a02..00000000 --- a/Sources/libetk/etk/Stream.h +++ /dev/null @@ -1,279 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_STREAM_DEC_H__ -#define __ETK_STREAM_DEC_H__ - -namespace etk{ - typedef enum { - LOG_LEVEL_NONE, - LOG_LEVEL_CRITICAL, - LOG_LEVEL_ERROR, - LOG_LEVEL_WARNING, - LOG_LEVEL_INFO, - LOG_LEVEL_DEBUG, - LOG_LEVEL_VERBOSE - } logLevel_te; -}; -#endif - -#include -#include -#include - -#ifndef __ETK_STREAM_H__ -#define __ETK_STREAM_H__ - -#if defined(__TARGET_OS__Android) -# include -# define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "EWOL", __VA_ARGS__)) -# define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "EWOL", __VA_ARGS__)) -# define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, "EWOL", __VA_ARGS__)) -#endif - -#define MAX_LOG_SIZE (16000) -#define MAX_LOG_SIZE_TMP (512) - - - -//regular colors -#define ETK_BASH_COLOR_BLACK "\e[0;30m" -#define ETK_BASH_COLOR_RED "\e[0;31m" -#define ETK_BASH_COLOR_GREEN "\e[0;32m" -#define ETK_BASH_COLOR_YELLOW "\e[0;33m" -#define ETK_BASH_COLOR_BLUE "\e[0;34m" -#define ETK_BASH_COLOR_MAGENTA "\e[0;35m" -#define ETK_BASH_COLOR_CYAN "\e[0;36m" -#define ETK_BASH_COLOR_WHITE "\e[0;37m" -//emphasized (bolded) colors -#define ETK_BASH_COLOR_BOLD_BLACK "\e[1;30m" -#define ETK_BASH_COLOR_BOLD_RED "\e[1;31m" -#define ETK_BASH_COLOR_BOLD_GREEN "\e[1;32m" -#define ETK_BASH_COLOR_BOLD_YELLOW "\e[1;33m" -#define ETK_BASH_COLOR_BOLD_BLUE "\e[1;34m" -#define ETK_BASH_COLOR_BOLD_MAGENTA "\e[1;35m" -#define ETK_BASH_COLOR_BOLD_CYAN "\e[1;36m" -#define ETK_BASH_COLOR_BOLD_WHITE "\e[1;37m" -//background colors -#define ETK_BASH_COLOR_BG_BLACK "\e[40m" -#define ETK_BASH_COLOR_BG_RED "\e[41m" -#define ETK_BASH_COLOR_BG_GREEN "\e[42m" -#define ETK_BASH_COLOR_BG_YELLOW "\e[43m" -#define ETK_BASH_COLOR_BG_BLUE "\e[44m" -#define ETK_BASH_COLOR_BG_MAGENTA "\e[45m" -#define ETK_BASH_COLOR_BG_CYAN "\e[46m" -#define ETK_BASH_COLOR_BG_WHITE "\e[47m" -// Return to the normal color setings -#define ETK_BASH_COLOR_NORMAL "\e[0m" -//go to the Top of bash -#define ETK_BASH_GO_TOP "\e[0;0f" - - -namespace etk{ - class CEndl{}; - class CHex{}; - class CStart{}; - class CCout{ - private: - bool hex; - char m_tmpChar[MAX_LOG_SIZE+1]; - char tmp[MAX_LOG_SIZE_TMP]; - etk::Mutex m_mutex; - public: - CCout(){ - hex=false; - memset(m_tmpChar, 0, (MAX_LOG_SIZE+1)*sizeof(char)); - }; - ~CCout() { - - }; - - CCout& operator << (CHex t) { - hex = true; - return *this; - } - CCout& operator << (int t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%d", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (unsigned int t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%u", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - /* - CCout& operator << (uniChar_t t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%c", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - return *this; - } - */ - CCout& operator << (long t) { - if (true == hex) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "0x%08X", (unsigned int)t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - } else { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%ld", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - } - return *this; - } - CCout& operator << (long long t) { - if (true == hex) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "0x%08X%08X", (unsigned int)(t>>32), (unsigned int)(t)); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - } else { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%lld", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - } - return *this; - } - CCout& operator << (double t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%f", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (float t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%f", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (char * t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%s", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (const char * t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%s", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (char t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "%c", t); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (bool t) { - if (t) { - strncat(m_tmpChar, "true", MAX_LOG_SIZE); - } else { - strncat(m_tmpChar, "false", MAX_LOG_SIZE); - } - return *this; - } - - CCout& operator << (Vector2D t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "(%f,%f)", t.x, t.y); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (Vector2D t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "(%i,%i)", t.x, t.y); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (Vector3D t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "(%f,%f,%f)", t.x, t.y, t.z); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (Vector3D t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "(%i,%i,%i)", t.x, t.y, t.z); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (clipping_ts t) { - snprintf(tmp, MAX_LOG_SIZE_TMP, "origin=(%f,%f) size=(%f,%f)", t.x, t.y, t.w, t.h); - strncat(m_tmpChar, tmp, MAX_LOG_SIZE); - hex = false; - return *this; - } - CCout& operator << (CStart ccc) { - m_mutex.Lock(); - return *this; - } - CCout& operator << (logLevel_te ccc) { - switch (ccc) - { - case LOG_LEVEL_CRITICAL: - #if !defined(__TARGET_OS__Windows) - strncat(m_tmpChar, ETK_BASH_COLOR_BOLD_RED, MAX_LOG_SIZE); - #endif - strncat(m_tmpChar, "[C]", MAX_LOG_SIZE); - break; - case LOG_LEVEL_ERROR: - #if !defined(__TARGET_OS__Windows) - strncat(m_tmpChar, ETK_BASH_COLOR_RED, MAX_LOG_SIZE); - #endif - strncat(m_tmpChar, "[E]", MAX_LOG_SIZE); - break; - case LOG_LEVEL_WARNING: - #if !defined(__TARGET_OS__Windows) - strncat(m_tmpChar, ETK_BASH_COLOR_MAGENTA, MAX_LOG_SIZE); - #endif - strncat(m_tmpChar, "[W]", MAX_LOG_SIZE); - break; - case LOG_LEVEL_INFO: - #if !defined(__TARGET_OS__Windows) - strncat(m_tmpChar, ETK_BASH_COLOR_CYAN, MAX_LOG_SIZE); - #endif - strncat(m_tmpChar, "[I]", MAX_LOG_SIZE); - break; - case LOG_LEVEL_DEBUG: - #if !defined(__TARGET_OS__Windows) - strncat(m_tmpChar, ETK_BASH_COLOR_YELLOW, MAX_LOG_SIZE); - #endif - strncat(m_tmpChar, "[D]", MAX_LOG_SIZE); - break; - case LOG_LEVEL_VERBOSE: - #if !defined(__TARGET_OS__Windows) - strncat(m_tmpChar, ETK_BASH_COLOR_WHITE, MAX_LOG_SIZE); - #endif - strncat(m_tmpChar, "[V]", MAX_LOG_SIZE); - break; - default: - strncat(m_tmpChar, "[?]", MAX_LOG_SIZE); - break; - } - return *this; - } - CCout& operator << (etk::CEndl t) { - strncat(m_tmpChar, ETK_BASH_COLOR_NORMAL, MAX_LOG_SIZE); - strncat(m_tmpChar, "\n", MAX_LOG_SIZE); - m_tmpChar[MAX_LOG_SIZE] = '\0'; -#if defined(__TARGET_OS__Android) - LOGI("%s", m_tmpChar); -#else - printf("%s", m_tmpChar); -#endif - memset(m_tmpChar, 0, (MAX_LOG_SIZE+1)*sizeof(char)); - m_mutex.UnLock(); - return *this; - } - }; - extern etk::CCout cout; - extern etk::CEndl endl; - extern etk::CHex hex; - extern etk::CStart cstart; -} -#endif - diff --git a/Sources/libetk/etk/Types.h b/Sources/libetk/etk/Types.h deleted file mode 100644 index 585fca5b..00000000 --- a/Sources/libetk/etk/Types.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_TYPES_H__ -#define __ETK_TYPES_H__ - -#include -#include -#include -#include -#include - - -#ifndef __int8_t_defined -# define __int8_t_defined - typedef signed char int8_t; - typedef signed short int int16_t; - typedef int int32_t; - typedef signed long long int int64_t; -#endif - -#ifndef __uint8_t_defined -# define __uint8_t_defined - typedef unsigned char uint8_t; - typedef unsigned short int uint16_t; - typedef unsigned int uint32_t; -# if __WORDSIZE == 64 - typedef unsigned long int uint64_t; -# else - typedef unsigned long long int uint64_t; -# endif -#endif -typedef uint32_t uniChar_t; - - -typedef enum { - ERR_NONE = 0, //!< No error, luckily everything went fine - ERR_FAIL, //!< Miscellaneous failure - ERR_INVAL, //!< Invalid entry parameter - ERR_MEM, //!< Dynamic memory allocation failure - ERR_TIMEOUT, //!< Request time out - ERR_BUSY, //!< Element curently Busy -}erreurCode_te; - - -#define etk_min(elemA, elemB) (((elemA)<(elemB)) ? (elemA) : (elemB)) -#define etk_max(elemA, elemB) (((elemA)<(elemB)) ? (elemB) : (elemA)) -#define etk_avg(minimim, elem, maximum) (((minimim)>(elem)) ? (minimim) : ((maximum)<(elem)) ? (maximum) : (elem)) - -typedef struct { - float u; - float v; -}texCoord_ts; - -typedef struct { - float x; - float y; - float w; - float h; -}clipping_ts; - -#include - -#endif diff --git a/Sources/libetk/etk/UString.cpp b/Sources/libetk/etk/UString.cpp deleted file mode 100644 index fb3422bd..00000000 --- a/Sources/libetk/etk/UString.cpp +++ /dev/null @@ -1,574 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include -#include - -int32_t strlen(const uniChar_t * data) -{ - if (NULL == data) { - return 0; - } - int32_t iii=0; - while (*data != 0) { - data++; - iii++; - if (iii > 0x7FFFFFF0) { - return iii; - } - } - return iii; -} - -#undef __class__ -#define __class__ "etk::UString" - -etk::CCout& etk::operator <<(etk::CCout &os, const etk::UString &obj) -{ - etk::Vector output_UTF8; - unicode::convertUnicodeToUtf8(obj.m_data, output_UTF8); - output_UTF8.PushBack('\0'); - os << &output_UTF8[0]; - return os; -} - -etk::UString::~UString(void) -{ - //m_data.Clear(); - //m_dataUtf8.Clear(); -} - - -etk::UString::UString(void) -{ - //TK_INFO("new etk::UString()"); - m_data.Clear(); - m_data.PushBack('\0'); -} - - -etk::UString::UString(const char* inputData, int32_t len) -{ - m_data.Clear(); - m_data.PushBack('\0'); - Set(inputData, len); -} - - -etk::UString::UString(const uniChar_t* inputData, int32_t len) -{ - m_data.Clear(); - m_data.PushBack('\0'); - Set(inputData, len); -} -/* -etk::UString::UString(const uniChar_t inputData) -{ - m_data.Clear(); - m_data.PushBack('\0'); - Set(&inputData, 1); -} -*/ - -void etk::UString::Set(const char * inputData, int32_t len) -{ - if (NULL == inputData) { - // nothing to add ... - return; - } - // overwrite the len if needed : - if ((-1) == len) { - len = strlen(inputData); - } - // convert the string - etk::Vector tmpChar; - for (int32_t iii=0; iii inputData) -{ - etk::Vector output_Unicode; - unicode::convertUtf8ToUnicode(inputData, output_Unicode); - *this = output_Unicode; - return *this; -} - -const etk::UString& etk::UString::operator= (etk::Vector inputData) -{ - etk::Vector output_Unicode; - unicode::convertUtf8ToUnicode(inputData, output_Unicode); - *this = output_Unicode; - return *this; -} - - -const etk::UString& etk::UString::operator= (etk::Vector inputData) -{ - m_data = inputData; - if (m_data.Size()>0) { - if (m_data[m_data.Size()-1] != '\0') { - m_data.PushBack('\0'); - } - } - //TK_DEBUG("m_dataLen="<'" << (char)etkS.m_data[iii] << "' ==> " << changeOrder(m_data[iii]) << ">" << changeOrder(etkS.m_data[iii]) << ""); - uniChar_t elemA = changeOrder(m_data[iii]); - uniChar_t elemB = changeOrder(etkS.m_data[iii]); - if (elemA != elemB) { - if (elemA > elemB) { - return true; - } - return false; - } - } - if (m_data.Size() > etkS.m_data.Size()) { - return true; - } - } - return false; -} - -bool etk::UString::operator>= (const etk::UString& etkS) const -{ - if( this != &etkS ) { - for (int32_t iii=0; iii < m_data.Size() && iii < etkS.m_data.Size(); iii++) { - uniChar_t elemA = changeOrder(m_data[iii]); - uniChar_t elemB = changeOrder(etkS.m_data[iii]); - if (elemA != elemB) { - if (elemA > elemB) { - return true; - } - return false; - } - } - if (m_data.Size() >= etkS.m_data.Size()) { - return true; - } - } - return false; -} - -bool etk::UString::operator< (const etk::UString& etkS) const -{ - if( this != &etkS ) { - for (int32_t iii=0; iii < m_data.Size() && iii < etkS.m_data.Size(); iii++) { - uniChar_t elemA = changeOrder(m_data[iii]); - uniChar_t elemB = changeOrder(etkS.m_data[iii]); - if (elemA != elemB) { - if (elemA < elemB) { - return true; - } - return false; - } - } - if (m_data.Size() < etkS.m_data.Size()) { - return true; - } - } - return false; -} - -bool etk::UString::operator<= (const etk::UString& etkS) const -{ - if( this != &etkS ) { - for (int32_t iii=0; iii < m_data.Size() && iii < etkS.m_data.Size(); iii++) { - uniChar_t elemA = changeOrder(m_data[iii]); - uniChar_t elemB = changeOrder(etkS.m_data[iii]); - if (elemA != elemB) { - if (elemA < elemB) { - return true; - } - return false; - } - } - if (m_data.Size() <= etkS.m_data.Size()) { - return true; - } - } - return false; -} - - -bool etk::UString::operator== (const etk::UString& etkS) const -{ - if( this != &etkS ) { - if (etkS.m_data.Size() != m_data.Size()) { - //TK_DEBUG(" not the same size : " << etkS.m_data.Size() << "!=" << m_data.Size()); - return false; - } - for (int32_t iii= 0; iii= m_data.Size() ) { - return true; - } else { - return false; - } -} - - -int32_t etk::UString::Size(void) const -{ - if (m_data.Size() == 0) { - return 0; - } else { - return m_data.Size() - 1; - } -} - - -void etk::UString::Add(int32_t currentID, const char* inputData) -{ - etk::UString tmpString(inputData); - Add(currentID, tmpString.pointer() ); -} - - -void etk::UString::Add(int32_t currentID, const uniChar_t* inputData) -{ - // get the input lenght - int32_t len = strlen(inputData); - if (0 == len) { - TK_WARNING("no data to add on the current UString"); - return; - } else if (currentID < 0) { - TK_WARNING("Curent ID(" << currentID << ") < 0 ==> Add at the start"); - currentID = 0; - } else if (currentID > Size() ) { - TK_ERROR("Curent ID(" << currentID << ") > maxSize ... (" << Size() << ") ==> add at the end ..."); - m_data.PushBack(inputData, len); - return; - } - m_data.Insert(currentID, inputData, len); -} - - -void etk::UString::Add(int32_t currentID, const uniChar_t inputData) -{ - uniChar_t data[2]; - data[0] = inputData; - data[1] = 0; - Add(currentID, data); -} - - -void etk::UString::Remove(int32_t currentID, int32_t len) -{ - if (0 >= len) { - TK_ERROR("no data to remove on the current UString"); - return; - } - // TODO : check the size of the data - m_data.EraseLen(currentID, len); -} - - -void etk::UString::Clear(void) -{ - m_data.Clear(); - m_data.PushBack('\0'); -} - - -int32_t etk::UString::FindForward(const char element, int32_t startPos) const -{ - return FindForward((uniChar_t)element, startPos); -} - - -int32_t etk::UString::FindForward(const uniChar_t element, int32_t startPos) const -{ - if (startPos < 0) { - startPos = 0; - } else if (startPos >= Size() ) { - return -1; - } - for (int32_t iii=startPos; iii< Size(); iii++) { - if (m_data[iii] == element) { - return iii; - } - } - return -1; -} - - -int32_t etk::UString::FindBack(const char element, int32_t startPos) const -{ - return FindBack((uniChar_t)element, startPos); -} - - -int32_t etk::UString::FindBack(const uniChar_t element, int32_t startPos) const -{ - if (startPos < 0) { - return -1; - } else if (startPos >= Size() ) { - startPos = Size(); - } - for (int32_t iii=startPos; iii>=0; iii--) { - if (m_data[iii] == element) { - return iii; - } - } - return -1; -} - - -etk::UString etk::UString::Extract(int32_t posStart, int32_t posEnd) const -{ - etk::UString out; - if (posStart < 0) { - posStart = 0; - } else if (posStart >= Size() ) { - return out; - } - if (posEnd < 0) { - return out; - } else if (posEnd >= Size() ) { - posEnd = Size(); - } - out.m_data = m_data.Extract(posStart, posEnd); - out.m_data.PushBack('\0'); - return out; -} - - -etk::Vector etk::UString::GetVector(void) -{ - etk::Vector out = m_data; - out.PopBack(); - return out; -} - - -bool etk::UString::StartWith(const etk::UString& data) -{ - if (data.Size() == 0) { - return false; - } - if (data.Size() > Size()) { - return false; - } - for (int32_t iii=0; iii Size()) { - return false; - } - for( int32_t iii=Size()-1, jjj=data.Size()-1; - iii>=0 && jjj>=0; - iii--, jjj--) { - if (data[jjj] != m_data[iii]) { - return false; - } - } - return true; -} - - -char * etk::UString::c_str(void) -{ - // UTF8 generation : - m_dataUtf8.Clear(); - unicode::convertUnicodeToUtf8(m_data, m_dataUtf8); - m_dataUtf8.PushBack('\0'); - - return &m_dataUtf8[0]; -} - - diff --git a/Sources/libetk/etk/UString.h b/Sources/libetk/etk/UString.h deleted file mode 100644 index 22ff8e18..00000000 --- a/Sources/libetk/etk/UString.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_USTRING_H__ -#define __ETK_USTRING_H__ - -#include -#include -#include - -namespace etk -{ - class UString - { - public: - // Constructeurs - UString(void); - UString(const uniChar_t* inputData, int32_t len = -1); - UString(const char* inputData, int32_t len = -1); - void Set(const uniChar_t* inputData, int32_t len=-1); - void Set(const char* inputData, int32_t len=-1); - // basic convertion integer en string - UString(char inputData); - UString(int inputData); - UString(unsigned int inputData); - UString(float inputData); - UString(double inputData); - UString(const etk::UString &etkS); - //UString(const uniChar_t inputData); - // destructor : - ~UString(void); - - /***************************************************** - * = assigment - *****************************************************/ - const etk::UString& operator= (const etk::UString &etkS ); - const etk::UString& operator= (etk::Vector inputData); - const etk::UString& operator= (etk::Vector inputData); - const etk::UString& operator= (etk::Vector inputData); - /***************************************************** - * == operator - *****************************************************/ - bool operator== (const etk::UString& etkS) const; - /***************************************************** - * != operator - *****************************************************/ - bool operator!= (const etk::UString& etkS) const; - /***************************************************** - * > < >= <= operator - *****************************************************/ - bool operator> (const etk::UString& etkS) const; - bool operator>= (const etk::UString& etkS) const; - bool operator< (const etk::UString& etkS) const; - bool operator<= (const etk::UString& etkS) const; - /***************************************************** - * += operator - *****************************************************/ - const etk::UString& operator+= (const etk::UString &etkS); - /***************************************************** - * + operator - *****************************************************/ - etk::UString operator+ (const etk::UString &etkS); - /***************************************************** - * << operator - *****************************************************/ - /* - const etk::UString& operator <<= (const char input); - const etk::UString& operator <<= (const int input); - const etk::UString& operator <<= (const unsigned int input); - */ - /***************************************************** - * >> operator - *****************************************************/ - - /***************************************************** - * Cout << operator - *****************************************************/ - friend etk::CCout& operator <<( etk::CCout &os,const etk::UString &obj); - /***************************************************** - * [] operator - *****************************************************/ - const uniChar_t& operator[] (int32_t pos) const { - return m_data[pos]; - } - uniChar_t& operator[] (int32_t pos) { - return m_data[pos]; - } - - /***************************************************** - * toolbox - *****************************************************/ - // Start With ... - bool StartWith(const etk::UString& data); - // End With ... - bool EndWith(const etk::UString& data); - // Find element - int32_t FindForward(const char data, int32_t startPos=0) const; - int32_t FindForward(const uniChar_t data, int32_t startPos=0) const; - int32_t FindBack(const char data, int32_t startPos=0x7FFFFFFF) const; - int32_t FindBack(const uniChar_t data, int32_t startPos=0x7FFFFFFF) const; - - bool IsEmpty(void) const; - int32_t Size(void) const; - - /***************************************************** - * Generic modification function - *****************************************************/ - void Add(int32_t currentID, const char* inputData); - void Add(int32_t currentID, const uniChar_t* inputData); - void Add(int32_t currentID, const uniChar_t inputData); - void Remove(int32_t currentID, int32_t len); - void Clear(void); - - etk::Vector GetVector(void); - uniChar_t * pointer(void) { return &m_data[0]; }; - // generate temporary allocation (auto unallocated...) - char * c_str(void); - - // Sting operation : - etk::UString Extract(int32_t posStart=0, int32_t posEnd=0x7FFFFFFF) const; - - private : - etk::Vector m_data; //!< internal data is stored in the Unicode properties ... - etk::Vector m_dataUtf8; //!< Tmp data for the Utf8Data() function - }; - - etk::CCout& operator <<(etk::CCout &os, const etk::UString &obj); - -} - -int32_t strlen(const uniChar_t * data); - - - -#endif - diff --git a/Sources/libetk/etk/Vector.h b/Sources/libetk/etk/Vector.h deleted file mode 100644 index 0d059c8f..00000000 --- a/Sources/libetk/etk/Vector.h +++ /dev/null @@ -1,776 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_VECTOR_H__ -#define __ETK_VECTOR_H__ - -#include -#include -#include - -#undef __class__ -#define __class__ "etk::Vector" - - -namespace etk -{ - /** - * @brief Vector classes ... - * - * @tparam[in] MY_TYPE class type of the current element. - * - * m_data - * <------------ m_dataSize ------------> - * ---------------------------------------- - * | 0 | - * |--------------------------------------| - * | 1 | - * |--------------------------------------| - * | 2 | - * |--------------------------------------| - * m_size | 3 | - * |--------------------------------------| - * | x | - * |--------------------------------------| - * | x | - * |--------------------------------------| - * | x | - * |--------------------------------------| - * | x | - * |--------------------------------------| - * | x | - * |--------------------------------------| - * | x | - * |--------------------------------------| - * m_allocated | x | - * ---------------------------------------- - * - */ - template class Vector - { - public: - class Iterator - { - // Private data : - private: - int32_t m_current; //!< curent Id on the vector - Vector * m_vector; //!< Pointer on the curent element of the vectorBin - public: - /** - * @brief Basic itarator constructor with no link with an etkVector - */ - Iterator(): - m_current(-1), - m_vector(NULL) - { - // nothing to do ... - } - /** - * @brief Recopy constructor on a specific etkVector. - * @param[in] otherIterator The Iterator that might be copy - */ - Iterator(const Iterator & otherIterator): - m_current(otherIterator.m_current), - m_vector(otherIterator.m_vector) - { - // nothing to do ... - } - /** - * @brief Asignation operator. - * @param[in] otherIterator The Iterator that might be copy - * @return reference on the curent Iterator - */ - Iterator& operator=(const Iterator & otherIterator) - { - m_current = otherIterator.m_current; - m_vector = otherIterator.m_vector; - return *this; - } - /** - * @brief Basic destructor - */ - ~Iterator() - { - m_current = -1; - m_vector = NULL; - } - /** - * @brief basic boolean cast - * @return true if the element is present in the etkVector size - */ - operator bool () - { - if( 0 <= m_current - && m_current < m_vector->Size() ) - { - return true; - } else { - return false; - } - } - /** - * @brief Incremental operator - * @return Reference on the current iterator incremented - */ - Iterator& operator++ () - { - if( NULL != m_vector - && m_current < m_vector->Size() ) - { - m_current++; - } - return *this; - } - /** - * @brief Decremental operator - * @return Reference on the current iterator decremented - */ - Iterator& operator-- () - { - if (m_current >= 0) { - m_current--; - } - return *this; - } - /** - * @brief Incremental operator - * @return Reference on a new iterator and increment the other one - */ - Iterator operator++ (int32_t) - { - Iterator it(*this); - ++(*this); - return it; - } - /** - * @brief Decremental operator - * @return Reference on a new iterator and decrement the other one - */ - Iterator operator-- (int32_t) - { - Iterator it(*this); - --(*this); - return it; - } - /** - * @brief Get reference on the current Element - * @return the reference on the current Element - */ - MY_TYPE & operator-> () const - { - TK_CHECK_INOUT(m_current >= 0 && m_current < m_vector->Size()); - return &m_vector->Get(m_current); - } - /** - * @brief Get reference on the current Element - * @return the reference on the current Element - */ - MY_TYPE & operator* () const - { - TK_CHECK_INOUT(m_current >= 0 && m_current < m_vector->Size()); - return m_vector->Get(m_current); - } - private: - /** - * @brief - * - * @param[in,out] --- - * - * @return --- - * - */ - Iterator(Vector * Evb, int32_t pos): - m_current(pos), - m_vector(Evb) - { - // nothing to do ... - } - friend class Vector; - }; - - 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 - public: - /** - * @brief Create an empty vector - * @param[in] count Minimum request size of the Buffer - */ - Vector(int32_t count = 0): - m_data(NULL), - m_size(0), - m_allocated(0) - { - ChangeAllocation(count); - } - - /** - * @brief Re-copy constructor (copy all needed data) - * @param[in] Evb Vector that might be copy - */ - Vector(const etk::Vector & Evb) - { - m_allocated = Evb.m_allocated; - m_size = Evb.m_size; - m_data = NULL; - //TK_DEBUG("USE Specific vector allocator ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment); - // allocate all same data - m_data = new MY_TYPE[m_allocated]; - if (NULL==m_data) { - TK_CRITICAL("Vector : Error in data allocation ... might nor work corectly anymore"); - return; - } - // Copy all data ... - for(int32_t iii=0; iii & Evb) - { - //TK_DEBUG("USE RECOPY vector ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment); - if( this != &Evb ) // avoid copy to itself - { - if (NULL!=m_data) { - delete[] m_data; - m_data = NULL; - } - // Set the new value - m_allocated = Evb.m_allocated; - m_size = Evb.m_size; - // allocate all same data - m_data = new MY_TYPE[m_allocated]; - if (NULL==m_data) { - TK_CRITICAL("Vector : Error in data allocation ... might nor work corectly anymore"); - return *this; - } - for(int32_t iii=0; iii & Evb) // += operator - { - int32_t nbElememt = Evb.Size(); - int32_t idx = m_size; - Resize(m_size+nbElememt); - if (m_size<=idx) { - TK_CRITICAL("allocation error"); - return *this; - } - for(int32_t iii=0; iii idx) { - // initialize data ... - for(int32_t iii=idx; iii m_size) { - TK_ERROR("Resize does not work corectly ... not added item"); - return; - } - for (int32_t iii=0; iii0) { - Resize(m_size-1); - } - } - - /** - * @brief Remove all alement in the current vector - */ - void Clear(void) - { - if(m_size>0) { - Resize(0); - } - } - - - /** - * @brief - * - * @param[in,out] --- - * - * @return --- - * - */ - void Insert(int32_t pos, const MY_TYPE * item, int32_t nbElement) - { - if (pos>m_size) { - TK_WARNING(" can not insert Element at this position : " << pos << " > " << m_size << " add it at the end ... "); - PushBack(item, nbElement); - return; - } - int32_t idx = m_size; - // Request resize of the current buffer - Resize(m_size+nbElement); - if (idx>=m_size) { - TK_ERROR("Resize does not work corectly ... not added item"); - return; - } - // move curent data (after the position) - int32_t sizeToMove = (idx - pos); - if ( 0 < sizeToMove) { - for (int32_t iii=1; iii<=sizeToMove; iii++) { - m_data[m_size-iii] = m_data[idx-iii]; - } - } - // affectation of all input element - for (int32_t iii=0; iiim_size) { - TK_ERROR(" can not Erase Len Element at this position : " << pos << " > " << m_size); - return; - } - if (pos+nbElement>m_size) { - nbElement = m_size - pos; - } - int32_t idx = m_size; - // move curent data - int32_t sizeToMove = (idx - (pos+nbElement)); - if ( 0 < sizeToMove) { - for (int32_t iii=0; iiim_size) { - TK_ERROR(" can not Erase Element at this position : " << pos << " > " << m_size); - return; - } - if (posEnd>m_size) { - posEnd = m_size; - } - int32_t nbElement = m_size - pos; - int32_t tmpSize = m_size; - // move curent data - int32_t sizeToMove = (tmpSize - (pos+nbElement)); - if ( 0 < sizeToMove) { - for (int32_t iii=0; iii Extract(int32_t posStart = 0, int32_t posEnd=0x7FFFFFFF) const - { - Vector out; - if (posStart < 0) { - posStart = 0; - } else if (posStart >= Size() ) { - return out; - } - if (posEnd < 0) { - return out; - } else if (posEnd >= Size() ) { - posEnd = Size(); - } - out.PushBack(&m_data[posStart], posEnd-posStart); - return out; - } - - /** - * @brief Get an iterator an an specific position - * @param[in] pos Requested position of the iterator in the vector - * @return The Iterator - */ - Iterator Position(int32_t pos) - { - return Iterator(this, pos); - } - - /** - * @brief Get an Iterator on the start position of the Vector - * @return The Iterator - */ - Iterator Begin(void) - { - return Position(0); - } - - /** - * @brief Get an Iterator on the end position of the Vector - * @return The Iterator - */ - Iterator End(void) - { - return Position( Size()-1 ); - } - - private: - /** - * @brief Change the current size of the vector - * @param[in] newSize New requested size of element in the vector - */ - void Resize(int32_t newSize) - { - // Reallocate memory - if (newSize > m_allocated) { - ChangeAllocation(newSize); - } - m_size = newSize; - } - - /** - * @brief Change the current allocation to the corect one (depend on the current size) - * @param[in] newSize Minimum number of element needed - */ - void ChangeAllocation(int32_t newSize) - { - // set the minimal size to 1 - if(newSize <= 0) { - newSize = 1; - } - if (m_allocated<0) { - m_allocated = 0; - } - int32_t requestSize = m_allocated; - // set the size with the corect chose type : - if (newSize == requestSize) { - return; - } else if (newSize < requestSize) { - // we did not remove data ??? - } else { - while(newSize > requestSize) { - if (0 == requestSize) { - requestSize = 1; - } else { - requestSize = requestSize * 2; - } - } - } - // No reallocation needed : - if (requestSize <= m_allocated) { - return; - } - //TK_INFO("Change vector allocation : " << m_allocated << "==>" << requestSize); - // check if something is allocated : - if (NULL == m_data) { - // no data allocated ==> request an allocation (might be the first) - m_data = new MY_TYPE[requestSize]; - if (NULL==m_data) { - TK_CRITICAL("Vector : Error in data allocation request allocation:" << requestSize << "*" << (int32_t)(sizeof(MY_TYPE)) << "bytes" ); - m_allocated = 0; - return; - } - // no data to copy - } else { - // allocate a new pool of data: - MY_TYPE* m_dataTmp = new MY_TYPE[requestSize]; - if (NULL==m_dataTmp) { - TK_CRITICAL("Vector : Error in data allocation request allocation:" << requestSize << "*" << (int32_t)(sizeof(MY_TYPE)) << "bytes" ); - m_allocated = 0; - return; - } - // copy data in the new pool - int32_t nbElements = etk_min(requestSize, m_allocated); - for(int32_t iii=0; iii& obj) const - { - // check if it was the same pointer - if( this == &obj ) { - return true; - } - // fiist step : check the size ... - if (m_size!=obj.m_size) { - return false; - } - if( NULL==m_data - || NULL==obj.m_data) { - return false; - } - for (int32_t iii=0; iii& obj) const - { - // check if it was the same pointer - if( this == &obj ) { - return false; - } - // fiist step : check the size ... - if (m_size!=obj.m_size) { - return true; - } - if( NULL==m_data - || NULL==obj.m_data) { - return false; - } - for (int32_t iii=0; iii| Class Data | - * |--------| |-----------------------| - * | 1 |----| - * |--------| | - * | 2 |====|==============| |-----------------------| - * |--------| | --->| Class Data | - * m_count | 3 |-| | |-----------------------| - * |--------| | | - * | x | | | |-----------------------| - * |--------| | -------->| Class Data | - * | x | | |-----------------------| - * |--------| | - * | x | | - * |--------| | |-----------------------| - * | x | --------------------->| Class Data | - * |--------| |-----------------------| - * | x | - * |--------| - * | x | - * |--------| - * m_size | x | - * ---------- - * - */ - /* - template class List - { - - }; - */ -} - -#undef __class__ -#define __class__ NULL - -#endif - diff --git a/Sources/libetk/etk/math/Matrix.h b/Sources/libetk/etk/math/Matrix.h deleted file mode 100644 index f956c820..00000000 --- a/Sources/libetk/etk/math/Matrix.h +++ /dev/null @@ -1,347 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_TYPES_MATRIX_H__ -#define __ETK_TYPES_MATRIX_H__ - -//#include -#include -#include - -namespace etk -{ - template class Matrix - { - private: - etk::Vector2D m_size; - etk::Vector m_data; - public: - /***************************************************** - * Constructor - *****************************************************/ - Matrix(Vector2D size, T* defaultVal=NULL) : - m_size(size), - etk::Vector2D(size.x* size.y) - { - if (NULL != defaultVal) { - // copy all the elements - for(int32_t iii=0; iii<=m_size.x*m_size.y; iii++) { - // cast and set value : - m_data[iii] = (T)defaultVal++; - } - } else { - Clear(); - } - }; - Matrix(int32_t width=0, int32_t heigh=0, T* defaultVal=NULL) : - m_size(width, heigh), - etk::Vector2D(width*heigh) - { - if (NULL != defaultVal) { - // copy all the elements - for(int32_t iii=0; iii<=m_size.x*m_size.y; iii++) { - // cast and set value : - m_data[iii] = (T)defaultVal++; - } - } else { - Clear(); - } - }; - Matrix(const Matrix& obj) : - m_size(obj.m_size.x, obj.m_size.y), - etk::Vector2D(obj.m_size.x* obj.m_size.y) - { - // copy all the elements - for(int32_t iii=0; iii<=m_size.x*m_size.y; iii++) { - // cast and set value : - m_data[iii] = (T)obj.m_data[iii]; - } - }; - Matrix(const Matrix& obj) : - m_size(obj.m_size.x, obj.m_size.y), - etk::Vector2D(obj.m_size.x* obj.m_size.y) - { - // copy all the elements - for(int32_t iii=0; iii<=m_size.x*m_size.y; iii++) { - // cast and set value : - m_data[iii] = (T)obj.m_data[iii]; - } - }; - Matrix(const Matrix& obj) : - m_size(obj.m_size.x, obj.m_size.y), - etk::Vector2D(obj.m_size.x* obj.m_size.y) - { - // copy all the elements - for(int32_t iii=0; iii<=m_size.x*m_size.y; iii++) { - // cast and set value : - m_data[iii] = (T)obj.m_data[iii]; - } - }; - /***************************************************** - * Destructor - *****************************************************/ - virtual ~Matrix(void) {}; - - /***************************************************** - * = assigment - *****************************************************/ - const Matrix& operator= (const Matrix& obj ) - { - // check if it was the same pointer - if( this == &obj ) { - return *this; - } - // copy data : - m_size = obj.m_size; - m_data = obj.m_data; - return *this; - }; - /***************************************************** - * == operator - *****************************************************/ - bool operator== (const Matrix& obj) const - { - return (m_data == obj.m_data); - }; - /***************************************************** - * != operator - *****************************************************/ - bool operator!= (const Matrix& obj) const - { - return (m_data != obj.m_data); - }; - /***************************************************** - * += operator - *****************************************************/ - const Matrix& operator+= (const Matrix& obj) - { - if (m_size != obj.m_size) { - //TK_CRITICAL("add 2 Matrix with différent size ... ==> generate the max size of all the 2 matrix"); - etk::Matrix tmpMatrix(etk_max(m_size.x,obj.m_size.x), etk_max(m_size.y,obj.m_size.y)); - for (int32_t jjj=0; jjj< m_size.y; jjj++) { - T* tmpPointer = tmpMatrix[jjj]; - T* tmpPointerIn = (*this)[jjj]; - for (int32_t iii=0; iii< m_size.x; iii++) { - tmpPointer[iii] = tmpPointerIn[iii]; - } - } - for (int32_t jjj=0; jjj< obj.m_size.y; jjj++) { - T* tmpPointer = tmpMatrix[jjj]; - T* tmpPointerIn = obj[jjj]; - for (int32_t iii=0; iii< obj.m_size.x; iii++) { - tmpPointer[iii] += tmpPointerIn[iii]; - } - } - // copy in local : - m_size = tmpMatrix.m_size; - m_data = tmpMatrix.m_data; - } else { - // copy data for the same size : - for (int32_t iii=0; iii< m_data.Size(); iii++) { - m_data[iii] += obj.m_data[iii]; - } - } - return *this; - }; - /***************************************************** - * + operator - *****************************************************/ - Matrix operator+ (const Matrix& obj) { - Matrix tmpp(*this); - tmpp += obj; - return tmpp; - } - /***************************************************** - * -= operator - *****************************************************/ - const Matrix& operator-= (const Matrix& obj) - { - if (m_size != obj.m_size) { - //TK_CRITICAL("less 2 Matrix with différent size ... ==> generate the max size of all the 2 matrix"); - etk::Matrix tmpMatrix(etk_max(m_size.x,obj.m_size.x), etk_max(m_size.y,obj.m_size.y)); - for (int32_t jjj=0; jjj< m_size.y; jjj++) { - T* tmpPointer = tmpMatrix[jjj]; - T* tmpPointerIn = (*this)[jjj]; - for (int32_t iii=0; iii< m_size.x; iii++) { - tmpPointer[iii] = tmpPointerIn[iii]; - } - } - for (int32_t jjj=0; jjj< obj.m_size.y; jjj++) { - T* tmpPointer = tmpMatrix[jjj]; - T* tmpPointerIn = obj[jjj]; - for (int32_t iii=0; iii< obj.m_size.x; iii++) { - tmpPointer[iii] -= tmpPointerIn[iii]; - } - } - // copy in local : - m_size = tmpMatrix.m_size; - m_data = tmpMatrix.m_data; - } else { - // copy data for the same size : - for (int32_t iii=0; iii< m_data.Size(); iii++) { - m_data[iii] -= obj.m_data[iii]; - } - } - return *this; - }; - /***************************************************** - * - operator - *****************************************************/ - Matrix operator- (const Matrix& obj) { - Matrix tmpp(*this); - tmpp += obj; - return tmpp; - } - /***************************************************** - * *= operator - *****************************************************/ - const Matrix& operator*= (const Matrix& obj) - { - if( m_size.x != obj.m_size.y - || m_size.y != obj.m_size.x) { - //TK_CRITICAL("Error while multipliying 2 matrix with different size ==> impossible case ..."); - return *this; - } - etk::Matrix tmpMatrix(m_size); - for (int32_t jjj=0; jjj< obj.m_size.y; jjj++) { - for (int32_t iii=0; iii< obj.m_size.x; iii++) { - T tmpVal = 0; - for (int32_t kkk=0; kkk< obj.m_size.x; kkk++) { - tmpVal += (*this)[jjj][iii+kkk] * obj[jjj+kkk][iii]; - } - tmpMatrix[jjj][iii] = tmpVal; - } - } - // copy in local : - m_data = tmpMatrix.m_data; - return *this; - }; - /***************************************************** - * * operator - *****************************************************/ - Matrix operator* (const Matrix& obj) { - Matrix tmpp(*this); - tmpp *= obj; - return tmpp; - } - /***************************************************** - * [] operator - *****************************************************/ - const T* operator[] (int32_t line) const { - return &m_data[line*m_size.x]; - } - T* operator[] (int32_t line) { - return &m_data[line*m_size.x]; - } - /***************************************************** - * Other mathematical function - *****************************************************/ - /** - * @ brief Transpose Matrix - * @ return the transpose matrix - */ - Matrix Transpose(void) - { - // create a matrix with the inverted size - Matrix tmpMatrix(m_size.x, m_size.y); - for (int32_t jjj=0; jjj< m_size.y; jjj++) { - for (int32_t iii=0; iii< m_size.x; iii++) { - tmpMatrix[jjj][iii] = (*this)[iii][jjj]; - } - } - return tmpMatrix; - }; - /** - * @ brief Create a convolution on the matrix : set convolution on the lines - * @ param[in] obj The convolution operator - * @ return the value of the convolution - */ - Matrix Convolution(Matrix& obj) - { - Matrix tmppp(1,1); - // TODO : ... - return tmppp; - }; - /** - * @ brief generate a devide of the curent Matrix with the specify power of 2 - * @ param[in] decalage The power of 2 of the division - * @ return the result - */ - Matrix& Fix(int32_t decalage) - { - Matrix tmppp(1,1); - // TODO : ... - return tmppp; - }; - /** - * @ brief generate a devide of the curent Matrix with the specify power of 2 - * @ param[in] decalage The power of 2 of the division - * @ return the result - */ - Matrix& Round2(int32_t decalage) - { - Matrix tmppp(1,1); - // TODO : ... - return tmppp; - }; - /***************************************************** - * other stupid action : - *****************************************************/ - Vector2D Size(void) { return m_size; }; - void Clear(void) - { - // copy data for the same size : - for (int32_t iii=0; iii< m_size.x*m_size.y; iii++) { - m_data[iii] = (T)0; - } - }; - void Identity(void) - { - // copy data for the same size : - for (int32_t iii=0; iii< etk_min(m_size.x, m_size.y); iii++) { - (*this)[iii][iii] = (T)1; - } - }; - - void Set(int32_t iii, int32_t jjj, T value) - { - m_data[iii*m_size.x+jjj] = value; - } - T Get(int32_t iii, int32_t jjj) - { - return m_data[iii*m_size.x+jjj]; - } - void Display(void) - { - /* - TK_INFO("Matrix display : "); - for (int32_t jjj=0; jjj< m_size.y; jjj++) { - if (m_size.x == 0) { - TK_INFO(" --- , "); - } else if (m_size.x == 1) { - TK_INFO(" " << (*this)[jjj][0] << " , "); - } else if (m_size.x == 2) { - TK_INFO(" " << (*this)[jjj][0] << " , " << (*this)[jjj][1] << " , "); - } else if (m_size.x == 3) { - TK_INFO(" " << (*this)[jjj][0] << " , " << (*this)[jjj][1] << " , " << (*this)[jjj][2] << " , "); - } else if (m_size.x == 4) { - TK_INFO(" " << (*this)[jjj][0] << " , " << (*this)[jjj][1] << " , " << (*this)[jjj][2] << " , " << (*this)[jjj][3] << " , "); - } else if (m_size.x == 5) { - TK_INFO(" " << (*this)[jjj][0] << " , " << (*this)[jjj][1] << " , " << (*this)[jjj][2] << " , " << (*this)[jjj][3] << " , " << (*this)[jjj][4] << " , "); - } else if (m_size.x == 6) { - TK_INFO(" " << (*this)[jjj][0] << " , " << (*this)[jjj][1] << " , " << (*this)[jjj][2] << " , " << (*this)[jjj][3] << " , " << (*this)[jjj][4] << " , " << (*this)[jjj][5] << " , "); - } else { - TK_INFO(" " << (*this)[jjj][0] << " , " << (*this)[jjj][1] << " , " << (*this)[jjj][2] << " , " << (*this)[jjj][3] << " , " << (*this)[jjj][4] << " , " << (*this)[jjj][5] << " , " << (*this)[jjj][6] << " , "); - } - } - */ - }; - }; -}; - -#endif diff --git a/Sources/libetk/etk/math/Matrix4.cpp b/Sources/libetk/etk/math/Matrix4.cpp deleted file mode 100644 index f248b6e2..00000000 --- a/Sources/libetk/etk/math/Matrix4.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include -#include -#include - -etk::Matrix4 etk::matrix::Perspective(float left, float right, float bottom, float top, float nearVal, float farVal) -{ - etk::Matrix4 tmp; - for(int32_t iii=0; iii<4*4 ; iii++) { - tmp.m_mat[iii] = 0; - } - tmp.m_mat[0] = 2.0 / (right - left); - tmp.m_mat[5] = 2.0 / (top - bottom); - tmp.m_mat[10] = -2.0 / (farVal - nearVal); - tmp.m_mat[3] = -1*(right + left) / (right - left); - tmp.m_mat[7] = -1*(top + bottom) / (top - bottom); - tmp.m_mat[11] = -1*(farVal + nearVal) / (farVal - nearVal); - tmp.m_mat[15] = 1; - //TK_INFO("Perspective :"); - //etk::matrix::Display(tmp); - return tmp; -} - -etk::Matrix4 etk::matrix::Translate(float x, float y, float z) -{ - etk::Matrix4 tmp; - // set translation : - tmp.m_mat[3] = x; - tmp.m_mat[7] = y; - tmp.m_mat[11] = z; - //TK_INFO("Translate :"); - //etk::matrix::Display(tmp); - return tmp; -} - -etk::Matrix4 etk::matrix::Scale(float x, float y, float z) -{ - etk::Matrix4 tmp; - // set scale : - tmp.m_mat[0] = x; - tmp.m_mat[5] = y; - tmp.m_mat[10] = z; - //TK_INFO("Scale :"); - //etk::matrix::Display(tmp); - return tmp; -} - -etk::Matrix4 etk::matrix::rotate(float x, float y, float z, float angleRad) -{ - etk::Matrix4 tmp; - float cosVal = cos(angleRad); - float sinVal = sin(angleRad); - float invVal = 1.0-cosVal; - // set rotation : - tmp.m_mat[0] = x*x*invVal + cosVal; - tmp.m_mat[1] = x*y*invVal - z*cosVal; - tmp.m_mat[2] = x*z*invVal + y*sinVal; - - tmp.m_mat[4] = y*x*invVal + z*sinVal; - tmp.m_mat[5] = y*y*invVal + cosVal; - tmp.m_mat[6] = y*z*invVal - x*sinVal; - - tmp.m_mat[8] = z*x*invVal - y*sinVal; - tmp.m_mat[9] = z*y*invVal + x*sinVal; - tmp.m_mat[10] = z*z*invVal + cosVal; - return tmp; -} - - -void etk::matrix::Display(etk::Matrix4& tmp) -{ - TK_INFO("matrix : (" << tmp.m_mat[0] << " , " << tmp.m_mat[1] << " , " << tmp.m_mat[2] << " , " << tmp.m_mat[3] << " , "); - TK_INFO(" " << tmp.m_mat[4] << " , " << tmp.m_mat[5] << " , " << tmp.m_mat[6] << " , " << tmp.m_mat[7] << " , "); - TK_INFO(" " << tmp.m_mat[8] << " , " << tmp.m_mat[9] << " , " << tmp.m_mat[10] << " , " << tmp.m_mat[11] << " , "); - TK_INFO(" " << tmp.m_mat[12] << " , " << tmp.m_mat[13] << " , " << tmp.m_mat[14] << " , " << tmp.m_mat[15] << " )"); -} diff --git a/Sources/libetk/etk/math/Matrix4.h b/Sources/libetk/etk/math/Matrix4.h deleted file mode 100644 index 7b1dfd75..00000000 --- a/Sources/libetk/etk/math/Matrix4.h +++ /dev/null @@ -1,213 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_TYPES_MATRIX4_H__ -#define __ETK_TYPES_MATRIX4_H__ - -namespace etk { - - class Matrix4 - { - public: - float m_mat[4*4]; - void Identity(void) { - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] = 0; - } - m_mat[0] = 1.0; - m_mat[5] = 1.0; - m_mat[10] = 1.0; - m_mat[15] = 1.0; - } - /***************************************************** - * Constructor - *****************************************************/ - Matrix4(void) { - Identity(); - } - Matrix4(const Matrix4& obj) { - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] = obj.m_mat[iii]; - } - } - Matrix4(float a1, float b1, float c1, float d1, - float a2, float b2, float c2, float d2, - float a3, float b3, float c3, float d3, - float a4, float b4, float c4, float d4) { - m_mat[0] = a1; - m_mat[1] = b1; - m_mat[2] = c1; - m_mat[3] = d1; - m_mat[4] = a2; - m_mat[5] = b2; - m_mat[6] = c2; - m_mat[7] = d2; - m_mat[8] = a3; - m_mat[9] = b3; - m_mat[10] = c3; - m_mat[11] = d3; - m_mat[12] = a4; - m_mat[13] = b4; - m_mat[14] = c4; - m_mat[15] = d4; - } - Matrix4(float * obj) { - if (NULL == obj) { - Identity(); - return; - } - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] = obj[iii]; - } - } - /***************************************************** - * Destructor - *****************************************************/ - virtual ~Matrix4(void) { - - } - /***************************************************** - * = assigment - *****************************************************/ - const Matrix4& operator= (const Matrix4& obj ) { - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] = obj.m_mat[iii]; - } - return *this; - } - /***************************************************** - * == operator - *****************************************************/ - bool operator== (const Matrix4& obj) const { - for(int32_t iii=0; iii<4*4 ; iii++) { - if(m_mat[iii] != obj.m_mat[iii]) { - return false; - } - } - return true; - } - /***************************************************** - * != operator - *****************************************************/ - bool operator!= (const Matrix4& obj) const { - for(int32_t iii=0; iii<4*4 ; iii++) { - if(m_mat[iii] != obj.m_mat[iii]) { - return true; - } - } - return false; - } - /***************************************************** - * += operator - *****************************************************/ - const Matrix4& operator+= (const Matrix4& obj) { - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] += obj.m_mat[iii]; - } - return *this; - } - /***************************************************** - * + operator - *****************************************************/ - Matrix4 operator+ (const Matrix4& obj) { - Matrix4 tmpp(*this); - tmpp += obj; - return tmpp; - } - /***************************************************** - * -= operator - *****************************************************/ - const Matrix4& operator-= (const Matrix4& obj) { - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] -= obj.m_mat[iii]; - } - return *this; - } - /***************************************************** - * - operator - *****************************************************/ - Matrix4 operator- (const Matrix4& obj) { - Matrix4 tmpp(*this); - tmpp += obj; - return tmpp; - } - /***************************************************** - * *= operator - *****************************************************/ - const Matrix4& operator*= (const Matrix4& obj) { - // output Matrix - float matrixOut[4*4]; - for(int32_t jjj=0; jjj<4 ; jjj++) { - float* tmpLeft = m_mat + jjj*4; - for(int32_t iii=0; iii<4 ; iii++) { - const float* tmpUpper = obj.m_mat+iii; - float* tmpLeft2 = tmpLeft; - float tmpElement = 0; - for(int32_t kkk=0; kkk<4 ; kkk++) { - tmpElement += *tmpUpper * *tmpLeft2; - tmpUpper += 4; - tmpLeft2++; - } - matrixOut[jjj*4+iii] = tmpElement; - } - } - // set it at the output - for(int32_t iii=0; iii<4*4 ; iii++) { - m_mat[iii] = matrixOut[iii]; - } - return *this; - } - /***************************************************** - * * operator - *****************************************************/ - Matrix4 operator* (const Matrix4& obj) { - Matrix4 tmpp(*this); - tmpp *= obj; - return tmpp; - } - /***************************************************** - * other basic function : - *****************************************************/ - void Transpose(void) - { - float tmpVal = m_mat[1]; - m_mat[1] = m_mat[4]; - m_mat[4] = tmpVal; - - tmpVal = m_mat[2]; - m_mat[2] = m_mat[8]; - m_mat[8] = tmpVal; - - tmpVal = m_mat[6]; - m_mat[6] = m_mat[9]; - m_mat[9] = tmpVal; - - tmpVal = m_mat[3]; - m_mat[3] = m_mat[12]; - m_mat[12] = tmpVal; - - tmpVal = m_mat[7]; - m_mat[7] = m_mat[13]; - m_mat[13] = tmpVal; - - tmpVal = m_mat[11]; - m_mat[11] = m_mat[14]; - m_mat[14] = tmpVal; - - } - }; - namespace matrix { - Matrix4 Perspective(float left, float right, float bottom, float top, float nearVal, float farVal); - Matrix4 Translate(float x=0.0, float y=0.0, float z=0.0); - Matrix4 Scale(float x=1.0, float y=1.0, float z=1.0); - Matrix4 rotate(float x, float y, float z, float angleRad=0.0); - void Display(Matrix4& tmp); - }; -}; - -#endif diff --git a/Sources/libetk/etk/math/Plane.h b/Sources/libetk/etk/math/Plane.h deleted file mode 100644 index 7ba8579b..00000000 --- a/Sources/libetk/etk/math/Plane.h +++ /dev/null @@ -1,231 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_TYPES_PLANE_H__ -#define __ETK_TYPES_PLANE_H__ - -#include -#include -#include - -namespace etk { - template class Plane - { - public : - //member variables - etk::Vector3D m_normal; //X.N+intercept=0 - T m_intercept; - public: - /***************************************************** - * Constructor - *****************************************************/ - Plane(void) : - m_normal(0, 0, 0), - m_intercept(0) - { - - } - Plane(etk::Vector3D _normal, T _intercept=0) : - m_normal(_normal), - m_intercept(_intercept) - { - - } - Plane(const Plane& obj) : - m_normal(obj.m_normal), - m_intercept(obj.m_intercept) - { - - } - /***************************************************** - * Destructor - *****************************************************/ - ~Plane(void) - { - - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void SetNormal(const etk::Vector3D& obj) - { - m_normal=obj; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void SetIntercept(float _intercept) - { - m_intercept=_intercept; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void SetFromPoints(const etk::Vector3D & p0, - const etk::Vector3D & p1, - const etk::Vector3D & p2) - { - m_normal=(p1-p0).CrossProduct(p2-p0); - m_normal.Normalize(); - CalculateIntercept(p0); - }; - - /** - * @brief - * @param[in,out] - * @return - */ - void CalculateIntercept(const etk::Vector3D& pointOnPlane) - { - m_intercept=-m_normal.DotProduct(pointOnPlane); - } - - /** - * @brief - * @param[in,out] - * @return - */ - void Normalize(void) - { - float normalLength=m_normal.GetLength(); - m_normal/=normalLength; - m_intercept/=normalLength; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - etk::Vector3D GetNormal(void) - { - return m_normal; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - float GetIntercept() - { - return m_intercept; - } - - //find point of intersection of 3 planes - /** - * @brief - * @param[in,out] - * @return - */ - bool Intersect3(const Plane& p2, - const Plane & p3, - etk::Vector3D & result) - { - float denominator=m_normal.DotProduct((p2.m_normal).CrossProduct(p3.m_normal)); - //scalar triple product of normals - if(denominator==0.0f) { - //no intersection - return false; - } - etk::Vector3D temp1, temp2, temp3; - temp1=(p2.m_normal.CrossProduct(p3.m_normal))*m_intercept; - temp2=(p3.m_normal.CrossProduct(m_normal))*p2.m_intercept; - temp3=(m_normal.CrossProduct(p2.m_normal))*p3.m_intercept; - - result=(temp1+temp2+temp3)/(-denominator); - - return true; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - float GetDistance(const etk::Vector3D & point) const - { - return point.x*m_normal.x - + point.y*m_normal.y - + point.z*m_normal.z - + m_intercept; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - Plane LinearInterpolate(const Plane & p2, float factor) - { - Plane result; - result.m_normal=m_normal*(1.0f-factor) + p2.m_normal*factor; - result.m_normal.Normalize(); - result.m_intercept=m_intercept*(1.0f-factor) + p2.m_intercept*factor; - return result; - }; - - //operators - /** - * @brief - * @param[in,out] - * @return - */ - bool operator==(const Plane & obj) const - { - if( m_normal==obj.m_normal - && m_intercept==obj.m_intercept) { - return true; - } - return false; - }; - - /** - * @brief - * @param[in,out] - * @return - */ - bool operator!=(const Plane & obj) const - { - return!((*this)==obj); - } - - //unary operators - /** - * @brief - * @param[in,out] - * @return - */ - Plane operator-(void) const - { - return Plane(-m_normal, -m_intercept); - } - - /** - * @brief - * @param[in,out] - * @return - */ - Plane operator+(void) const - { - return *this; - } - }; -}; - -#endif - diff --git a/Sources/libetk/etk/math/Vector2D.h b/Sources/libetk/etk/math/Vector2D.h deleted file mode 100644 index bee117d0..00000000 --- a/Sources/libetk/etk/math/Vector2D.h +++ /dev/null @@ -1,242 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_MATH_VECTOR2D_H__ -#define __ETK_MATH_VECTOR2D_H__ - -namespace etk -{ - template class Vector2D - { - public: - T x; - T y; - public: - /***************************************************** - * Constructor - *****************************************************/ - Vector2D(void) : x(0), y(0) { }; - Vector2D(double _x, double _y) : x(_x), y(_y) { }; - Vector2D(float _x, float _y) : x(_x), y(_y) { }; - Vector2D(int32_t _x, int32_t _y) : x(_x), y(_y) { }; - Vector2D(const Vector2D& obj) : x((T)obj.x), y((T)obj.y) { }; - Vector2D(const Vector2D& obj) : x((T)obj.x), y((T)obj.y) { }; - Vector2D(const Vector2D& obj) : x((T)obj.x), y((T)obj.y) { }; - ~Vector2D(void) { }; - /***************************************************** - * = assigment - *****************************************************/ - const Vector2D& operator= (const Vector2D& obj ) { - x = (T)obj.x; - y = (T)obj.y; - return *this; - } - /***************************************************** - * == operator - *****************************************************/ - bool operator== (const Vector2D& obj) const { - if ((T)obj.x == x && (T)obj.y == y) { - return true; - } - return false; - } - /***************************************************** - * != operator - *****************************************************/ - bool operator!= (const Vector2D& obj) const { - if ((T)obj.x == x && (T)obj.y == y) { - return false; - } - return true; - } - /***************************************************** - * += operator - *****************************************************/ - const Vector2D& operator+= (const Vector2D& obj) { - x += (T)obj.x; - y += (T)obj.y; - return *this; - } - /***************************************************** - * + operator - *****************************************************/ - Vector2D operator+ (const Vector2D& obj) { - Vector2D tmpp(x,y); - tmpp.x += (T)obj.x; - tmpp.y += (T)obj.y; - return tmpp; - } - /***************************************************** - * -= operator - *****************************************************/ - const Vector2D& operator-= (const Vector2D& obj) { - x -= (T)obj.x; - y -= (T)obj.y; - return *this; - } - /***************************************************** - * - operator - *****************************************************/ - Vector2D operator- (const Vector2D& obj) { - Vector2D tmpp(x,y); - tmpp.x -= (T)obj.x; - tmpp.y -= (T)obj.y; - return tmpp; - } - /***************************************************** - * /= operator - *****************************************************/ - const Vector2D& operator/= (const Vector2D& obj) { - x /= (T)obj.x; - y /= (T)obj.y; - return *this; - } - /***************************************************** - * / operator - *****************************************************/ - Vector2D operator/ (const Vector2D& obj) { - Vector2D tmpp(x,y); - tmpp.x /= (T)obj.x; - tmpp.y /= (T)obj.y; - return tmpp; - } - /***************************************************** - * *= operator - *****************************************************/ - const Vector2D& operator*= (const Vector2D& obj) { - x *= (T)obj.x; - y *= (T)obj.y; - return *this; - } - /***************************************************** - * * operator - *****************************************************/ - Vector2D operator* (const Vector2D& obj) { - Vector2D tmpp(x,y); - tmpp.x *= (T)obj.x; - tmpp.y *= (T)obj.y; - return tmpp; - } - /***************************************************** - * ++ operator - *****************************************************/ - Vector2D& operator++() // prefix - { - ++x; - ++y; - return *this; - } - Vector2D operator++(int unused) // postfix - { - Vector2D result = *this; - ++(*this); - return result; - } - /***************************************************** - * -- operator - *****************************************************/ - Vector2D& operator--() // prefix - { - --x; - --y; - return *this; - } - - Vector2D operator--(int unused) // postfix - { - Vector2D result = *this; - --(*this); - return result; - } - - /** - * @brief Set the vector at (0,0) - */ - void Zero(void) - { - x=0; - y=0; - }; - /** - * @brief Set the vector at (1,1) - */ - void One(void) - { - x=0; - y=0; - }; - - /** - * @brief normalize the curent vector - */ - void Normalize(void) - { - float length=GetLength(); - if( length==1 - || length==0) { - return; - } - float scalefactor = 1.0f/length; - x *= scalefactor; - y *= scalefactor; - }; - - /** - * @brief Get the normalized vector - * @return a new vector normalized - */ - Vector2D GetNormalized(void) const - { - Vector2D tmp(*this); - tmp.Normalize(); - return tmp; - }; - - /** - * @brief Get the size of the vector - * @return the float value - */ - float GetLength(void) const - { - return (float)sqrt((x*x)+(y*y)); - }; - - /** - * @brief Get the square size of the vector - * @return flat value - */ - float GetSquaredLength(void) const - { - return (float)(x*x)+(y*y); - }; - - /** - * @brief Linar intermolation of the curent Vector - * @param[in] input - * @param[in] factor - * @return the interpolate vector - */ - Vector2D LinearInterpolate(const Vector2D & input, float factor) const - { - return (*this)*(1.0f-factor) + input*factor; - }; - - /** - * @brief Quadratic intermolation of the curent Vector - * @param[in] v1 - * @param[in] v2 - * @param[in] factor - * @return the interpolate vector - */ - Vector2D QuadraticInterpolate(const Vector2D & v2, const Vector2D & v3, float factor) const - { - return (*this)*(1.0f-factor)*(1.0f-factor) + 2*v2*factor*(1.0f-factor) + v3*factor*factor;} - }; -}; - -#endif diff --git a/Sources/libetk/etk/math/Vector3D.h b/Sources/libetk/etk/math/Vector3D.h deleted file mode 100644 index e173ab91..00000000 --- a/Sources/libetk/etk/math/Vector3D.h +++ /dev/null @@ -1,404 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_MATH_VECTOR3D_H__ -#define __ETK_MATH_VECTOR3D_H__ - -namespace etk -{ - template class Vector3D - { - public: - T x; - T y; - T z; - public: - /***************************************************** - * Constructor - *****************************************************/ - Vector3D(void) : x(0), y(0), z(0) { }; - Vector3D(double _x, double _y, double _z) : x(_x), y(_y), z(_z) { }; - Vector3D(float _x, float _y, float _z) : x(_x), y(_y), z(_z) { }; - Vector3D(int32_t _x, int32_t _y, int32_t _z) : x(_x), y(_y), z(_z) { }; - Vector3D(const Vector3D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z) { }; - Vector3D(const Vector3D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z) { }; - Vector3D(const Vector3D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z) { }; - ~Vector3D(void) { }; - /***************************************************** - * = assigment - *****************************************************/ - const Vector3D& operator= (const Vector3D& obj ) { - x = (T)obj.x; - y = (T)obj.y; - z = (T)obj.z; - return *this; - } - /***************************************************** - * == operator - *****************************************************/ - bool operator== (const Vector3D& obj) const { - if ((T)obj.x == x && (T)obj.y == y && (T)obj.z == z) { - return true; - } - return false; - } - /***************************************************** - * != operator - *****************************************************/ - bool operator!= (const Vector3D& obj) const { - if ((T)obj.x == x && (T)obj.y == y && (T)obj.z == z) { - return false; - } - return true; - } - /***************************************************** - * += operator - *****************************************************/ - const Vector3D& operator+= (const Vector3D& obj) { - x += (T)obj.x; - y += (T)obj.y; - z += (T)obj.z; - return *this; - } - const Vector3D& operator+= (const float val) { - x += val; - y += val; - z += val; - return *this; - } - /***************************************************** - * + operator - *****************************************************/ - Vector3D operator+ (const Vector3D& obj) { - Vector3D tmpp(x,y,y); - tmpp.x += (T)obj.x; - tmpp.y += (T)obj.y; - tmpp.z += (T)obj.z; - return *this; - } - Vector3D operator+ (const float val) { - Vector3D tmpp(x,y,y); - tmpp.x += val; - tmpp.y += val; - tmpp.z += val; - return *this; - } - /***************************************************** - * -= operator - *****************************************************/ - const Vector3D& operator-= (const Vector3D& obj) { - x -= (T)obj.x; - y -= (T)obj.y; - z -= (T)obj.z; - return *this; - } - const Vector3D& operator-= (const float val) { - x -= val; - y -= val; - z -= val; - return *this; - } - /***************************************************** - * - operator - *****************************************************/ - Vector3D operator- (const Vector3D& obj) { - Vector3D tmpp(x,y,y); - tmpp.x -= (T)obj.x; - tmpp.y -= (T)obj.y; - tmpp.z -= (T)obj.z; - return *this; - } - Vector3D operator- (const float val) { - Vector3D tmpp(x,y,y); - tmpp.x -= val; - tmpp.y -= val; - tmpp.z -= val; - return *this; - } - /***************************************************** - * /= operator - *****************************************************/ - const Vector3D& operator/= (const Vector3D& obj) { - if (obj.x != 0) { - x /= (T)obj.x; - } - if (obj.y != 0) { - y /= (T)obj.y; - } - if (obj.z != 0) { - z /= (T)obj.z; - } - return *this; - } - const Vector3D& operator/= (const float val) { - if (val==0) { - return *this; - } - x /= val; - y /= val; - z /= val; - return *this; - } - /***************************************************** - * / operator - *****************************************************/ - Vector3D operator/ (const Vector3D& obj) { - Vector3D tmpp(x,y,y); - if (obj.x != 0) { - tmpp.x /= (T)obj.x; - } - if (obj.y != 0) { - tmpp.y /= (T)obj.y; - } - if (obj.z != 0) { - tmpp.z /= (T)obj.z; - } - return tmpp; - } - Vector3D operator/ (const float val) { - Vector3D tmpp(x,y,y); - if (val==0) { - return tmpp; - } - tmpp.x /= val; - tmpp.y /= val; - tmpp.z /= val; - return tmpp; - } - /***************************************************** - * *= operator - *****************************************************/ - const Vector3D& operator*= (const Vector3D& obj) { - x *= (T)obj.x; - y *= (T)obj.y; - z *= (T)obj.z; - return *this; - } - const Vector3D& operator*= (const float val) { - x *= val; - y *= val; - z *= val; - return *this; - } - /***************************************************** - * * operator - *****************************************************/ - Vector3D operator* (const Vector3D& obj) { - Vector3D tmpp(x,y,y); - tmpp.x *= (T)obj.x; - tmpp.y *= (T)obj.y; - tmpp.z *= (T)obj.z; - return tmpp; - } - Vector3D operator* (const float val) { - Vector3D tmpp(x,y,y); - tmpp.x *= val; - tmpp.y *= val; - tmpp.z *= val; - return tmpp; - } - /***************************************************** - * ++ operator - *****************************************************/ - Vector3D& operator++() // prefix - { - ++x; - ++y; - ++z; - return *this; - } - Vector3D operator++(int unused) // postfix - { - Vector3D result = *this; - ++(*this); - return result; - } - /***************************************************** - * -- operator - *****************************************************/ - Vector3D& operator--() // prefix - { - --x; - --y; - --z; - return *this; - } - Vector3D operator--(int unused) // postfix - { - Vector3D result = *this; - --(*this); - return result; - } - - void Zero(void) - { - x=0; - y=0; - z=0; - }; - void One(void) - { - x=1; - y=1; - z=1; - }; - - //vector algebra - Vector3D CrossProduct(const Vector3D& obj) const - { - return Vector3D( y*obj.z - z*obj.y, - z*obj.x - x*obj.z, - x*obj.y - y*obj.x); - }; - - float DotProduct(const Vector3D& obj) const - { - return x*obj.x - + y*obj.y - + z*obj.z; - }; - - void Normalize() - { - float length=GetLength(); - if(length==1 || length==0) { - return; - } - float scalefactor = 1.0f/length; - x *= scalefactor; - y *= scalefactor; - z *= scalefactor; - }; - - Vector3D GetNormalized() const - { - Vector3D tmpp(*this); - tmpp.Normalize(); - return tmpp; - }; - - float GetLength() const - { - return (float)sqrt((x*x)+(y*y)+(z*z)); - }; - - float GetSquaredLength() const - { - return (x*x)+(y*y)+(z*z); - }; - - //rotations - void RotateX(double angle) - { - (*this)=GetRotatedX(angle); - }; - - Vector3D GetRotatedX(double angle) const - { - if(angle==0.0) { - return (*this); - } - float sinAngle=(float)sin(M_PI*angle/180); - float cosAngle=(float)cos(M_PI*angle/180); - - return Vector3D( x, - y*cosAngle - z*sinAngle, - y*sinAngle + z*cosAngle); - }; - - void RotateY(double angle) - { - (*this)=GetRotatedY(angle); - }; - - Vector3D GetRotatedY(double angle) const - { - if(angle==0.0) { - return (*this); - } - float sinAngle=(float)sin(M_PI*angle/180); - float cosAngle=(float)cos(M_PI*angle/180); - return Vector3D( x*cosAngle + z*sinAngle, - y, - -x*sinAngle + z*cosAngle); - }; - - void RotateZ(double angle) - { - (*this)=GetRotatedZ(angle); - }; - - Vector3D GetRotatedZ(double angle) const - { - if(angle==0.0) { - return (*this); - } - float sinAngle=(float)sin(M_PI*angle/180); - float cosAngle=(float)cos(M_PI*angle/180); - return Vector3D( x*cosAngle - y*sinAngle, - x*sinAngle + y*cosAngle, - z); - }; - - void RotateAxis(double angle, const Vector3D & axis) - { - (*this)=GetRotatedAxis(angle, axis); - }; - - Vector3D GetRotatedAxis(double angle, const Vector3D & axis) const - { - if(angle==0.0) { - return (*this); - } - Vector3D u=axis.GetNormalized(); - Vector3D rotMatrixRow0, rotMatrixRow1, rotMatrixRow2; - float sinAngle=(float)sin(M_PI*angle/180); - float cosAngle=(float)cos(M_PI*angle/180); - float MinusCosAngle=1.0f-cosAngle; - rotMatrixRow0.x=(u.x)*(u.x) + cosAngle*(1-(u.x)*(u.x)); - rotMatrixRow0.y=(u.x)*(u.y)*(MinusCosAngle) - sinAngle*u.z; - rotMatrixRow0.z=(u.x)*(u.z)*(MinusCosAngle) + sinAngle*u.y; - rotMatrixRow1.x=(u.x)*(u.y)*(MinusCosAngle) + sinAngle*u.z; - rotMatrixRow1.y=(u.y)*(u.y) + cosAngle*(1-(u.y)*(u.y)); - rotMatrixRow1.z=(u.y)*(u.z)*(MinusCosAngle) - sinAngle*u.x; - rotMatrixRow2.x=(u.x)*(u.z)*(MinusCosAngle) - sinAngle*u.y; - rotMatrixRow2.y=(u.y)*(u.z)*(MinusCosAngle) + sinAngle*u.x; - rotMatrixRow2.z=(u.z)*(u.z) + cosAngle*(1-(u.z)*(u.z)); - return Vector3D( this->DotProduct(rotMatrixRow0), - this->DotProduct(rotMatrixRow1), - this->DotProduct(rotMatrixRow2)); - }; - - /** - * @brief Linar intermolation of the curent Vector - * @param[in] input - * @param[in] factor - * @return the interpolate vector - */ - Vector3D LinearInterpolate(const Vector3D& input, float factor) const - { - return (*this)*(1.0f-factor) + input*factor; - }; - - /** - * @brief Quadratic intermolation of the curent Vector - * @param[in] v1 - * @param[in] v2 - * @param[in] factor - * @return the interpolate vector - */ - Vector3D QuadraticInterpolate(const Vector3D& v2, const Vector3D& v3, float factor) const - { - return (*this)*(1.0f-factor)*(1.0f-factor) + 2*v2*factor*(1.0f-factor) + v3*factor*factor; - }; - }; -}; - - - -#endif diff --git a/Sources/libetk/etk/math/Vector4D.h b/Sources/libetk/etk/math/Vector4D.h deleted file mode 100644 index ab39c5bc..00000000 --- a/Sources/libetk/etk/math/Vector4D.h +++ /dev/null @@ -1,189 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_MATH_VECTOR4D_H__ -#define __ETK_MATH_VECTOR4D_H__ - -namespace etk -{ - template class Vector4D - { - public: - T x; - T y; - union { - T z; - T width; - }; - union { - T w; - T height; - }; - public: - /***************************************************** - * Constructor - *****************************************************/ - Vector4D(void) : x(0), y(0), z(0), w(0) { }; - Vector4D(double _x, double _y, double _z, double _w) : x(_x), y(_y), z(_z), w(_w) { }; - Vector4D(float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) { }; - Vector4D(int32_t _x, int32_t _y, int32_t _z, int32_t _w) : x(_x), y(_y), z(_z), w(_w) { }; - Vector4D(const Vector4D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z), w((T)obj.w) { }; - Vector4D(const Vector4D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z), w((T)obj.w) { }; - Vector4D(const Vector4D& obj) : x((T)obj.x), y((T)obj.y), z((T)obj.z), w((T)obj.w) { }; - ~Vector4D(void) { }; - /***************************************************** - * = assigment - *****************************************************/ - const Vector4D& operator= (const Vector4D& obj ) { - x = (T)obj.x; - y = (T)obj.y; - z = (T)obj.z; - w = (T)obj.w; - return *this; - } - /***************************************************** - * == operator - *****************************************************/ - bool operator== (const Vector4D& obj) const { - if ((T)obj.x == x && (T)obj.y == y && (T)obj.z == z) { - return true; - } - return false; - } - /***************************************************** - * != operator - *****************************************************/ - bool operator!= (const Vector4D& obj) const { - if ((T)obj.x == x && (T)obj.y == y && (T)obj.z == z && (T)obj.w == w) { - return false; - } - return true; - } - /***************************************************** - * += operator - *****************************************************/ - const Vector4D& operator+= (const Vector4D& obj) { - x += (T)obj.x; - y += (T)obj.y; - z += (T)obj.z; - w += (T)obj.w; - return *this; - } - /***************************************************** - * + operator - *****************************************************/ - Vector4D operator+ (const Vector4D& obj) { - Vector4D tmpp(x,y,y); - tmpp.x += (T)obj.x; - tmpp.y += (T)obj.y; - tmpp.z += (T)obj.z; - tmpp.w += (T)obj.w; - return *this; - } - /***************************************************** - * -= operator - *****************************************************/ - const Vector4D& operator-= (const Vector4D& obj) { - x -= (T)obj.x; - y -= (T)obj.y; - z -= (T)obj.z; - w -= (T)obj.w; - return *this; - } - /***************************************************** - * - operator - *****************************************************/ - Vector4D operator- (const Vector4D& obj) { - Vector4D tmpp(x,y,y); - tmpp.x -= (T)obj.x; - tmpp.y -= (T)obj.y; - tmpp.z -= (T)obj.z; - tmpp.w -= (T)obj.w; - return *this; - } - /***************************************************** - * /= operator - *****************************************************/ - const Vector4D& operator/= (const Vector4D& obj) { - x /= (T)obj.x; - y /= (T)obj.y; - z /= (T)obj.z; - w /= (T)obj.w; - return *this; - } - /***************************************************** - * / operator - *****************************************************/ - Vector4D operator/ (const Vector4D& obj) { - Vector4D tmpp(x,y,y); - tmpp.x /= (T)obj.x; - tmpp.y /= (T)obj.y; - tmpp.z /= (T)obj.z; - tmpp.w /= (T)obj.w; - return *this; - } - /***************************************************** - * *= operator - *****************************************************/ - const Vector4D& operator*= (const Vector4D& obj) { - x *= (T)obj.x; - y *= (T)obj.y; - z *= (T)obj.z; - w *= (T)obj.w; - return *this; - } - /***************************************************** - * * operator - *****************************************************/ - Vector4D operator* (const Vector4D& obj) { - Vector4D tmpp(x,y,y); - tmpp.x *= (T)obj.x; - tmpp.y *= (T)obj.y; - tmpp.z *= (T)obj.z; - tmpp.w *= (T)obj.w; - return *this; - } - /***************************************************** - * ++ operator - *****************************************************/ - Vector4D& operator++() // prefix - { - ++x; - ++y; - ++z; - ++w; - return *this; - } - Vector4D operator++(int unused) // postfix - { - Vector4D result = *this; - ++(*this); - return result; - } - /***************************************************** - * -- operator - *****************************************************/ - Vector4D& operator--() // prefix - { - --x; - --y; - --z; - --w; - return *this; - } - Vector4D operator--(int unused) // postfix - { - Vector4D result = *this; - --(*this); - return result; - } - }; -}; - -#endif - diff --git a/Sources/libetk/etk/math/math.h b/Sources/libetk/etk/math/math.h deleted file mode 100644 index 1d0bbdde..00000000 --- a/Sources/libetk/etk/math/math.h +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef EPSILON -#define EPSILON 0.01f -#endif - -#include -#include -#include -#include -#include -#include -#include - diff --git a/Sources/libetk/etk/os/FSNode.cpp b/Sources/libetk/etk/os/FSNode.cpp deleted file mode 100644 index 289ffeff..00000000 --- a/Sources/libetk/etk/os/FSNode.cpp +++ /dev/null @@ -1,1291 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - - -#include -#include -#include -#include -#include -#include -#include - -extern "C" { - // file browsing ... - #include - #include -} - -#ifdef __TARGET_OS__Android -# include -# include -#endif - - -#ifdef __TARGET_OS__Windows - // For ctime - #include -#endif - - -// zip file of the apk file for Android ==> set to zip file apk access -static etk::UString s_fileAPK = ""; -static etk::UString baseApplName = "ewolNoName"; -#if defined(__TARGET_OS__Android) - static etk::UString baseFolderHome = "/sdcard/"; // home folder - static etk::UString baseFolderData = "assets/"; // program Data - static etk::UString baseFolderDataUser = "/sdcard/.tmp/userData/"; // Data specific user (local modification) - static etk::UString baseFolderCache = "/sdcard/.tmp/cache/"; // Temporary data (can be removed the next time) -#elif defined(__TARGET_OS__Windows) - static etk::UString baseFolderHome = "c:/test"; // home folder - static etk::UString baseFolderData = "c:/test/share/"; // program Data - static etk::UString baseFolderDataUser = "c:/test/userData/"; // Data specific user (local modification) - static etk::UString baseFolderCache = "c:/Windows/Temp/ewol/"; // Temporary data (can be removed the next time) -#else - static etk::UString baseFolderHome = "~"; // home folder - static etk::UString baseFolderData = "share/"; // program Data - static etk::UString baseFolderDataUser = "~/.tmp/userData/"; // Data specific user (local modification) - static etk::UString baseFolderCache = "~/.tmp/cache/"; // Temporary data (can be removed the next time) -#endif - - -#ifdef __TARGET_OS__Android - static struct zip * s_APKArchive = NULL; - static int32_t s_APKnbFiles = 0; - static void loadAPK(etk::UString& apkPath) - { - TK_DEBUG("Loading APK \"" << apkPath << "\""); - s_APKArchive = zip_open(apkPath.c_str(), 0, NULL); - TK_ASSERT(s_APKArchive != NULL, "Error loading APK ... \"" << apkPath << "\""); - //Just for debug, print APK contents - s_APKnbFiles = zip_get_num_files(s_APKArchive); - TK_INFO("List all files in the APK : " << s_APKnbFiles << " files"); - for (int iii=0; iii5000) { - TK_CRITICAL("ERROR when getting the small path ... this is loop prevention..."); - break; - } - } - /* - #ifndef __TARGET_OS__Windows - // for the target that supported the Realpath system : - char buf[MAX_FILE_NAME]; - memset(buf, 0, MAX_FILE_NAME); - char * ok = realpath(input.c_str(), buf); - if (!ok) { - TK_ERROR("Error to get the real path"); - input = "/"; - } else { - input = buf; - } - #endif - */ - //TK_DEBUG(" ==> \"" << input << "\""); - return input; -} - - -void etk::FSNode::SortElementList(etk::Vector &list) -{ - etk::Vector tmpList = list; - list.Clear(); - for(int32_t iii=0; iiiGetNameFile() > list[jjj]->GetNameFile()) { - findPos = jjj+1; - } - } - } - //EWOL_DEBUG("position="< go to the root Folder - destFilename = "ROOT:"; - } else { - destFilename = newName; - } - - bool isRoofFolder = false; - #ifdef __TARGET_OS__Windows - for (char iii='a' ; iii<='z' ; iii++) { - char tmpVal[10]; - char tmpValMaj[10]; - sprintf(tmpVal, "%c:/", iii); - sprintf(tmpValMaj, "%c:/", iii+'A'-'a'); - if( true == destFilename.StartWith(tmpVal) - || true == destFilename.StartWith(tmpValMaj)) { - isRoofFolder = true; - break; - } - } - #else - isRoofFolder = destFilename.StartWith('/'); - #endif - if (true == destFilename.StartWith(baseFolderHome) ) { - destFilename.Remove(0, baseFolderHome.Size()); - m_type = etk::FSN_TYPE_HOME; - } else if(true == isRoofFolder) { - #ifdef __TARGET_OS__Windows - destFilename.Remove(0, 3); - #else - destFilename.Remove(0, 1); - #endif - m_type = etk::FSN_TYPE_DIRECT; - } else if( true == destFilename.StartWith("ROOT:") - || true == destFilename.StartWith("root:") ) { - destFilename.Remove(0, 5); - m_type = etk::FSN_TYPE_DIRECT; - } else if( true == destFilename.StartWith("DIRECT:") - || true == destFilename.StartWith("direct:") ) { - destFilename.Remove(0, 7); - m_type = etk::FSN_TYPE_DIRECT; - } else if( true == destFilename.StartWith("DATA:") - || true == destFilename.StartWith("data:") ) { - destFilename.Remove(0, 5); - m_type = etk::FSN_TYPE_DATA; - } else if( true == destFilename.StartWith("USERDATA:") - || true == destFilename.StartWith("userdata:") ) { - destFilename.Remove(0, 9); - m_type = etk::FSN_TYPE_USER_DATA; - } else if( true == destFilename.StartWith("CACHE:") - || true == destFilename.StartWith("cache:") ) { - destFilename.Remove(0, 6); - m_type = etk::FSN_TYPE_CACHE; - } else if( true == destFilename.StartWith("THEME:") - || true == destFilename.StartWith("theme:") ) { - destFilename.Remove(0, 6); - m_type = etk::FSN_TYPE_THEME; - } else if(true == destFilename.StartWith("~")) { - destFilename.Remove(0, 1); - m_type = etk::FSN_TYPE_HOME; - } else if( true == destFilename.StartWith("HOME:") - || true == destFilename.StartWith("home:") ) { - destFilename.Remove(0, 5); - m_type = etk::FSN_TYPE_HOME; - } else { - // nothing to remove - //Other type is Relative : - m_type = etk::FSN_TYPE_RELATIF; - } - m_userFileName = destFilename; - TK_DBG_MODE("3 : parse done : [" << m_type << "]->\"" << m_userFileName << "\""); - - // Now we reduce the path with all un-needed ../ and other thinks ... - // TODO : Do it whith link and the other sub thinks ... - m_userFileName = SimplifyPathAbstractPath(m_userFileName); - TK_DBG_MODE("4 : Path simplification : [" << m_type << "]->\"" << m_userFileName << "\""); - - // Now we generate the real FS path: - GenerateFileSystemPath(); - TK_DBG_MODE("5 : file System Real name : \"" << m_systemFileName << "\""); - - // now we get all the right if the file existed: - UpdateFileSystemProperty(); - TK_DBG_MODE("6 : type : [" << m_typeNode << "] right :" << m_rights); -} - - -bool DirectCheckFile(etk::UString tmpFileNameDirect, bool checkInAPKIfNeeded=false) -{ - #ifdef __TARGET_OS__Android - if (true == checkInAPKIfNeeded) { - for (int iii=0; iii \"" << basicName << "\""); - themeName = etk::theme::GetName(themeName); - TK_DBG_MODE(" ==> theme Folder \"" << themeName << "\""); - // search the corect folder : - if (themeName == "") { - TK_WARNING("no theme name detected : set it to \"default\""); - } else if (themeName != "default") { - // Selected theme : - // check in the user data : - m_systemFileName = baseFolderDataUser + "theme/" + themeName + "/" + basicName; - if (true==DirectCheckFile(m_systemFileName)) { - return; - } - // check in the Appl data : - m_systemFileName = baseFolderData + "theme/" + themeName + "/" + basicName; - if (true==DirectCheckFile(m_systemFileName, true)) { - m_type = etk::FSN_TYPE_THEME_DATA; - return; - } - } - themeName = "default"; - // default theme : - // check in the user data : - m_systemFileName = baseFolderDataUser + "theme/" + themeName + "/" + basicName; - if (true==DirectCheckFile(m_systemFileName)) { - return; - } - // check in the Appl data : In every case we return this one ... - m_systemFileName = baseFolderData + "theme/" + themeName + "/" + basicName; - m_type = etk::FSN_TYPE_THEME_DATA; - return; - } - break; - } - m_systemFileName += m_userFileName; - -} -// now we get all the right if the file existed: -void etk::FSNode::UpdateFileSystemProperty(void) -{ - // clean general properties : - m_rights.Clear(); - m_timeCreate = 0; - m_timeModify = 0; - m_timeAccess = 0; - m_idOwner = 0; - m_idGroup = 0; - // File type is not knowns ... - m_typeNode=FSN_UNKNOW; - - #ifdef __TARGET_OS__Android - if( m_type == etk::FSN_TYPE_DATA - || m_type == etk::FSN_TYPE_THEME_DATA) { - for (int iii=0; iii= s_APKnbFiles) { - TK_ERROR("File Does not existed ... in APK : \"" << m_systemFileName << "\""); - return; - } - // note : Zip does not support other think than file ... - // TODO : Suport folder parsing ... - m_typeNode=FSN_FILE; - m_rights.SetUserReadable(true); - // TODO : Set the time of the file (time program compilation) - // TODO : Set the USER ID in the group and the user Id ... - TK_DBG_MODE("File existed ... in APK : \"" << m_systemFileName << "\" ==> id=" << m_idZipFile); - return; - } - #endif - // tmpStat Buffer : - struct stat statProperty; - if (-1 == stat(m_systemFileName.c_str(), &statProperty)) { - //Normal case when the file does not exist ... ==> the it was in unknow mode ... - return; - } - - switch (statProperty.st_mode & S_IFMT) { - case S_IFBLK: m_typeNode=etk::FSN_BLOCK; break; - case S_IFCHR: m_typeNode=etk::FSN_CHARACTER; break; - case S_IFDIR: m_typeNode=etk::FSN_FOLDER; break; - case S_IFIFO: m_typeNode=etk::FSN_FIFO; break; - #ifndef __TARGET_OS__Windows - case S_IFLNK: m_typeNode=etk::FSN_LINK; break; - #endif - case S_IFREG: m_typeNode=etk::FSN_FILE; break; - #ifndef __TARGET_OS__Windows - case S_IFSOCK: m_typeNode=etk::FSN_SOCKET; break; - #endif - default: m_typeNode=etk::FSN_UNKNOW; break; - } - // Right - m_rights = statProperty.st_mode; - m_idOwner = (int32_t) statProperty.st_uid; - m_idGroup = (int32_t) statProperty.st_gid; - m_timeCreate = statProperty.st_ctime; - m_timeModify = statProperty.st_mtime; - m_timeAccess = statProperty.st_atime; - return; -} - - -/* - All Right of the file -*/ -bool etk::FSNode::SetRight(etk::FSNodeRight newRight) -{ - // TODO : ... - TK_ERROR("Can not set the new rights ..."); - return false; -} - - -/* - Common API : -*/ -void etk::FSNode::SetName(etk::UString newName) -{ - PrivateSetName(newName); -} - - -etk::UString etk::FSNode::GetNameFolder(void) const -{ - int32_t lastPos = m_systemFileName.FindBack('/'); - if (-1 != lastPos) { - return m_systemFileName.Extract(0, lastPos); - } - return ""; -} - - -etk::UString etk::FSNode::GetName(void) const -{ - etk::UString output; - switch (m_type) - { - default: - case etk::FSN_TYPE_UNKNOW: - output = "HOME:"; - break; - case etk::FSN_TYPE_DIRECT: - output = "/"; - break; - case etk::FSN_TYPE_RELATIF: - output = ""; - break; - case etk::FSN_TYPE_HOME: - output = "~"; - break; - case etk::FSN_TYPE_DATA: - output = "DATA:"; - break; - case etk::FSN_TYPE_USER_DATA: - output = "USERDATA"; - break; - case etk::FSN_TYPE_CACHE: - output = "CACHE"; - break; - case etk::FSN_TYPE_THEME: - case etk::FSN_TYPE_THEME_DATA: - output = "THEME:"; - break; - } - output += m_userFileName; - return output; -} - - -etk::UString etk::FSNode::GetNameFile(void) const -{ - int32_t lastPos = m_systemFileName.FindBack('/'); - if (-1 != lastPos) { - return m_systemFileName.Extract(lastPos+1); - } - return ""; -} - -etk::UString etk::FSNode::GetRelativeFolder(void) const -{ - etk::UString tmppp = GetName(); - int32_t lastPos = tmppp.FindBack('/'); - if (-1 != lastPos) { - return tmppp.Extract(0, lastPos+1); - } - lastPos = tmppp.FindBack(':'); - if (-1 != lastPos) { - return tmppp.Extract(0, lastPos+1); - } - return ""; -} - - -bool etk::FSNode::Touch(void) -{ - return false; -} -bool etk::FSNode::Remove(void) -{ - return false; -} -uint64_t etk::FSNode::TimeCreated(void) const -{ - return m_timeCreate; -} - -etk::UString etk::FSNode::TimeCreatedString(void) const -{ - time_t tmpVal = (int32_t)m_timeCreate; - return ctime(&tmpVal); -} - -uint64_t etk::FSNode::TimeModified(void) const -{ - return m_timeModify; -} - -etk::UString etk::FSNode::TimeModifiedString(void) const -{ - time_t tmpVal = (int32_t)m_timeModify; - return ctime(&tmpVal); -} - -uint64_t etk::FSNode::TimeAccessed(void) const -{ - return m_timeAccess; -} - -etk::UString etk::FSNode::TimeAccessedString(void) const -{ - time_t tmpVal = (int32_t)m_timeAccess; - return ctime(&tmpVal); -} - -/* - Operator : -*/ -const etk::FSNode& etk::FSNode::operator= (const etk::FSNode &obj ) -{ - if( this != &obj ) // avoid copy to itself - { - if( NULL != m_PointerFile - #ifdef __TARGET_OS__Android - || NULL != m_zipData - #endif - ) { - TK_ERROR("Missing close the file : " << *this); - FileClose(); - m_PointerFile = NULL; - } - #ifdef __TARGET_OS__Android - m_idZipFile = obj.m_idZipFile; - m_zipData = NULL; - m_zipDataSize = 0; - m_zipReadingOffset = 0; - #endif - etk::UString tmppp = obj.GetName(); - PrivateSetName(tmppp); - } - return *this; -} -bool etk::FSNode::operator== (const etk::FSNode &obj ) const -{ - if( this != &obj ) { - if( obj.m_userFileName == m_userFileName - && obj.m_systemFileName == m_systemFileName - && obj.m_type == m_type ) { - return true; - } else { - return false; - } - return true; - } - return true; -} - -bool etk::FSNode::operator!= (const etk::FSNode &obj ) const -{ - return !(*this == obj); -} - -etk::CCout& etk::operator <<(etk::CCout &os, const etk::FSNode &obj) -{ - os << "[" << obj.m_type << "]->\"" << obj.m_userFileName << "\""; - return os; -} - -etk::CCout& etk::operator <<(etk::CCout &os, const etk::FSNType_te &obj) -{ - switch (obj) - { - case etk::FSN_TYPE_UNKNOW: - os << "FSN_TYPE_UNKNOW"; - break; - case etk::FSN_TYPE_DIRECT: - os << "FSN_TYPE_DIRECT"; - break; - case etk::FSN_TYPE_RELATIF: - os << "FSN_TYPE_RELATIF"; - break; - case etk::FSN_TYPE_HOME: - os << "FSN_TYPE_HOME"; - break; - case etk::FSN_TYPE_DATA: - os << "FSN_TYPE_DATA"; - break; - case etk::FSN_TYPE_USER_DATA: - os << "FSN_TYPE_USER_DATA"; - break; - case etk::FSN_TYPE_CACHE: - os << "FSN_TYPE_CACHE"; - break; - case etk::FSN_TYPE_THEME: - os << "FSN_TYPE_THEME"; - break; - case etk::FSN_TYPE_THEME_DATA: - os << "FSN_TYPE_THEME(DATA)"; - break; - default: - os << "FSN_TYPE_????"; - break; - } - return os; -} - -etk::CCout& etk::operator <<(etk::CCout &os, const etk::typeNode_te &obj) -{ - switch (obj) - { - case etk::FSN_UNKNOW: - os << "FSN_UNKNOW"; - break; - case etk::FSN_BLOCK: - os << "FSN_BLOCK"; - break; - case etk::FSN_CHARACTER: - os << "FSN_CHARACTER"; - break; - case etk::FSN_FOLDER: - os << "FSN_FOLDER"; - break; - case etk::FSN_FIFO: - os << "FSN_FIFO"; - break; - case etk::FSN_LINK: - os << "FSN_LINK"; - break; - case etk::FSN_FILE: - os << "FSN_FILE"; - break; - case etk::FSN_SOCKET: - os << "FSN_SOCKET"; - break; - default: - os << "FSN_????"; - break; - } - return os; -} - -/* - Folder specific : -*/ -int32_t etk::FSNode::FolderCount(void) -{ - return 0; -} -etk::Vector etk::FSNode::FolderGetSubList(bool showHidenFile, bool getFolderAndOther, bool getFile, bool temporaryFile) -{ - etk::Vector tmpp; - if (m_typeNode != etk::FSN_FOLDER ) { - return tmpp; - } - - // regenerate the next list : - etk::FSNode * tmpEmement; - DIR *dir = NULL; - struct dirent *ent = NULL; - dir = opendir(m_systemFileName.c_str()); - if (dir != NULL) { - // for each element in the drectory... - while ((ent = readdir(dir)) != NULL) { - etk::UString tmpName(ent->d_name); - TK_VERBOSE(" search in folder\"" << tmpName << "\""); - if( tmpName=="." - || tmpName==".." ) { - // do nothing ... - continue; - } - if( false == tmpName.StartWith(".") - || true == showHidenFile) { - tmpEmement = new etk::FSNode(GetRelativeFolder()+tmpName); - if (NULL == tmpEmement) { - TK_ERROR("allocation error ... of ewol::FSNode"); - continue; - } - if(tmpEmement->GetNodeType() == etk::FSN_FILE) { - if (true == getFile) { - tmpp.PushBack(tmpEmement); - } else { - delete(tmpEmement); - tmpEmement = NULL; - } - } else if (getFolderAndOther) { - tmpp.PushBack(tmpEmement); - } else { - delete(tmpEmement); - tmpEmement = NULL; - } - } - } - closedir(dir); - } else { - TK_ERROR("could not open directory : \"" << *this << "\""); - } - - // reorder the files - SortElementList(tmpp); - - return tmpp; -} -etk::FSNode etk::FSNode::FolderGetParent(void) -{ - etk::FSNode tmpp; - return tmpp; -} - -/* - File Specific : -*/ -bool etk::FSNode::FileHasExtention(void) -{ - int32_t lastPos = m_userFileName.FindBack('.'); - if( -1 != lastPos // not find the . - && 0 != lastPos // Find a . at the fist position .jdlskjdfklj ==> hiden file - && m_userFileName.Size() != lastPos ) // Remove file ended with . - { - return true; - } else { - return false; - } -} - -etk::UString etk::FSNode::FileGetExtention(void) -{ - etk::UString tmpExt = ""; - int32_t lastPos = m_userFileName.FindBack('.'); - if( -1 != lastPos // not find the . - && 0 != lastPos // Find a . at the fist position .jdlskjdfklj ==> hiden file - && m_userFileName.Size() != lastPos ) // Remove file ended with . - { - // Get the FileName - tmpExt = m_userFileName.Extract(lastPos+1); - } - return tmpExt; -} - -uint64_t etk::FSNode::FileSize(void) -{ - if (etk::FSN_FILE != m_typeNode) { - TK_ERROR("pppppppppppppppppppppp" << m_typeNode); - return 0; - } - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - if (true == LoadDataZip()) { - return m_zipDataSize; - } - return 0; - } - #endif - // Note : this is a proper methode to get the file size for Big files ... otherwithe the size is limited at 2^31 bytes - // tmpStat Buffer : - struct stat statProperty; - if (-1 == stat(m_systemFileName.c_str(), &statProperty)) { - //Normal case when the file does not exist ... ==> the it was in unknow mode ... - TK_ERROR("mlkmlkmlkmlkmlkmlk"); - return 0; - } - TK_INFO(" file size : " << (int64_t)statProperty.st_size << " bytes"); - if ((uint64_t)statProperty.st_size<=0) { - return 0; - } - return (uint64_t)statProperty.st_size; -} - - -bool etk::FSNode::FileOpenRead(void) -{ - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - return LoadDataZip(); - } - #endif - if (NULL != m_PointerFile) { - TK_CRITICAL("File Already open : " << *this); - return true; - } - m_PointerFile=fopen(m_systemFileName.c_str(),"rb"); - if(NULL == m_PointerFile) { - TK_ERROR("Can not find the file " << *this ); - return false; - } - return true; -} -bool etk::FSNode::FileOpenWrite(void) -{ - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - return false; - } - #endif - if (NULL != m_PointerFile) { - TK_CRITICAL("File Already open : " << *this); - return true; - } - m_PointerFile=fopen(m_systemFileName.c_str(),"wb"); - if(NULL == m_PointerFile) { - TK_ERROR("Can not find the file " << *this); - return false; - } - return true; -} -bool etk::FSNode::FileClose(void) -{ - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - if (NULL == m_zipData) { - TK_CRITICAL("File Already closed : " << *this); - return false; - } - delete[] m_zipData; - m_zipData = NULL; - m_zipDataSize = 0; - m_zipReadingOffset = 0; - return true; - } - #endif - if (NULL == m_PointerFile) { - TK_CRITICAL("File Already closed : " << *this); - return false; - } - fclose(m_PointerFile); - m_PointerFile = NULL; - return true; -} -char* etk::FSNode::FileGets(char * elementLine, int32_t maxData) -{ - memset(elementLine, 0, maxData); - #ifdef __TARGET_OS__Android - char * element = elementLine; - int32_t outSize = 0; - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) {//char * tmpData = internalDataFiles[iii].data + m_readingOffset; - if (NULL == m_zipData) { - element[0] = '\0'; - return NULL; - } - if (m_zipReadingOffset>m_zipDataSize) { - element[0] = '\0'; - return NULL; - } - while (m_zipData[m_zipReadingOffset] != '\0') { - if( m_zipData[m_zipReadingOffset] == '\n' - || m_zipData[m_zipReadingOffset] == '\r') - { - *element = m_zipData[m_zipReadingOffset]; - element++; - m_zipReadingOffset++; - *element = '\0'; - return elementLine; - } - *element = m_zipData[m_zipReadingOffset]; - element++; - m_zipReadingOffset++; - if (m_zipReadingOffset>m_zipDataSize) { - *element = '\0'; - return elementLine; - } - // check maxData Size ... - if (outSize>=maxData-1) { - *element = '\0'; - return elementLine; - } - outSize++; - } - if (outSize==0) { - return NULL; - } else { - // send last line - return elementLine; - } - } - #endif - return fgets(elementLine, maxData, m_PointerFile); -} -int32_t etk::FSNode::FileRead(void * data, int32_t blockSize, int32_t nbBlock) -{ - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - if (NULL == m_zipData) { - ((char*)data)[0] = '\0'; - return 0; - } - int32_t dataToRead = blockSize * nbBlock; - if (dataToRead + m_zipReadingOffset > m_zipDataSize) { - nbBlock = ((m_zipDataSize - m_zipReadingOffset) / blockSize); - dataToRead = blockSize * nbBlock; - } - memcpy(data, &m_zipData[m_zipReadingOffset], dataToRead); - m_zipReadingOffset += dataToRead; - return nbBlock; - } - #endif - return fread(data, blockSize, nbBlock, m_PointerFile); -} -int32_t etk::FSNode::FileWrite(void * data, int32_t blockSize, int32_t nbBlock) -{ - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - TK_CRITICAL("Can not write on data inside APK : " << *this); - return 0; - } - #endif - return fwrite(data, blockSize, nbBlock, m_PointerFile); -} -bool etk::FSNode::FileSeek(long int offset, int origin) -{ - #ifdef __TARGET_OS__Android - if( etk::FSN_TYPE_DATA == m_type - || etk::FSN_TYPE_THEME_DATA == m_type) { - if (NULL == m_zipData) { - return false; - } - int32_t positionEnd = 0; - switch(origin) { - case SEEK_END: - positionEnd = m_zipDataSize; - break; - case SEEK_CUR: - positionEnd = m_zipReadingOffset; - break; - default: - positionEnd = 0; - break; - } - positionEnd += offset; - if (positionEnd < 0) { - positionEnd = 0; - } else if (positionEnd > m_zipDataSize) { - positionEnd = m_zipDataSize; - } - m_zipReadingOffset = positionEnd; - return true; - } - #endif - fseek(m_PointerFile, offset, origin); - if(ferror(m_PointerFile)) { - return false; - } else { - return true; - } -} - - - -// TODO : Add an INIT to reset all allocated parameter : - -class tmpThemeElement -{ - public: - etk::UString refName; - etk::UString folderName; -}; - -static etk::Vector g_listTheme; - -// set the Folder of a subset of a theme ... -void etk::theme::SetName(etk::UString refName, etk::UString folderName) -{ - for(int32_t iii=0; iiirefName==refName) { - g_listTheme[iii]->folderName = folderName; - // action done - return; - } - } - } - // we did not find it ... - tmpThemeElement* tmpp = new tmpThemeElement(); - if (NULL==tmpp) { - TK_ERROR("pb to add a reference theme"); - return; - } - tmpp->refName = refName; - tmpp->folderName = folderName; - g_listTheme.PushBack(tmpp); -} - -// get the folder from a Reference theme -etk::UString etk::theme::GetName(etk::UString refName) -{ - for(int32_t iii=0; iiirefName==refName) { - return g_listTheme[iii]->folderName; - } - } - } - // We did not find the theme - return refName; -} - -// get the list of all the theme folder availlable in the user Home/appl -etk::Vector etk::theme::List(void) -{ - etk::Vector tmpp; - return tmpp; - // TODO : -} - - - diff --git a/Sources/libetk/etk/os/FSNode.h b/Sources/libetk/etk/os/FSNode.h deleted file mode 100644 index accc3b72..00000000 --- a/Sources/libetk/etk/os/FSNode.h +++ /dev/null @@ -1,230 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_FILE_SYSTEM_NODE_H__ -#define __ETK_FILE_SYSTEM_NODE_H__ - -#include -#include - -#define MAX_FILE_NAME (10240) - -//http://developer.android.com/guide/topics/data/data-storage.html - -namespace etk -{ - - typedef enum { - FSN_UNKNOW, - FSN_BLOCK, - FSN_CHARACTER, - FSN_FOLDER, - FSN_FIFO, - FSN_LINK, - FSN_FILE, - FSN_SOCKET, - } typeNode_te; - - etk::CCout& operator <<(etk::CCout &os, const etk::typeNode_te &obj); - - typedef enum { - FSN_TYPE_UNKNOW, - // user might done abstraction ==> acces of the sdcard when possible ... - FSN_TYPE_DIRECT, - FSN_TYPE_RELATIF, - - // depend on case - // - PC : ~/ - // - Android : /sdcard/ - // - Apple : ???? - FSN_TYPE_HOME, - - // depend of the case - // - PC : /usr/shared/programName/ - // - Android : Internal at the executable file (pointer on static area) - // - Apple : Internal at the executable file - FSN_TYPE_DATA, - - // depend on case - // - PC : ~/.local/programName/ - // - Android : /data/data/programName/files/ - // - Apple : ???? - FSN_TYPE_USER_DATA, - - // depend on case - // - PC : ~/.programName/cache/ - // - Android : /data/data/programName/cache/ - // - Apple : ???? - FSN_TYPE_CACHE, - - // depend on case - // - try on FSN_TYPE_USER_DATA/theme/themeName/xxx - // - try on FSN_TYPE_DATA/theme/themeName/xxx - // - try on FSN_TYPE_EWOL_DATA/theme/themeName/xxx ==> later when the lib will be accessible in packages - // and jump to the default theme file - // - try on FSN_TYPE_USER_DATA/theme/default/xxx - // - try on FSN_TYPE_DATA/theme/default/xxx - // - try on FSN_TYPE_EWOL_DATA/theme/default/xxx ==> later when the lib will be accessible in packages - FSN_TYPE_THEME, - FSN_TYPE_THEME_DATA - } FSNType_te; - - etk::CCout& operator <<(etk::CCout &os, const etk::FSNType_te &obj); - - /* - note : The filename can be - Direct mode : - DIRECT:/sdfsdfsdf/ - /XX ==> for Linux / Mac / Android - [a-zA-Z]:/xxx ==> for Windows - - Data mode : - DATA:folder/File.ccc - - User data mode : - USERDATA:folder/File.ccc - - Cache Data : - CACHE:folder/File.ccc - - Theme data : - THEME:folder/file.xxx - - Get the root folder : - ROOT: - / - [a-zA-Z]: ==> create more risk ... - - Get the Home folder : - HOME: - ~ - */ - class FSNode - { - private: - etk::UString m_userFileName; //!< the name requested by the User - etk::UString m_systemFileName; //!< the compleate filename for the system - FSNType_te m_type; //!< the Type of data requested by the User - typeNode_te m_typeNode; //!< type of the current file/Folder/Link - etk::FSNodeRight m_rights; //!< IO right of the current file - // specific when file Access : - FILE * m_PointerFile; - uint64_t m_timeCreate; - uint64_t m_timeModify; - uint64_t m_timeAccess; - uint32_t m_idOwner; - uint32_t m_idGroup; - private: - etk::UString GetFileSystemName(void) const; - etk::UString GetFileSystemNameTheme(void); - void PrivateSetName(etk::UString& newName); - bool DirectExistFile(etk::UString tmpFileNameDirect, bool checkInAPKIfNeeded = false); - - // Now we generate the real FS path: - void GenerateFileSystemPath(void); - // now we get all the right if the file existed: - void UpdateFileSystemProperty(void); - - private: - #ifdef __TARGET_OS__Android - bool LoadDataZip(void); - int32_t m_idZipFile; - char * m_zipData; - int32_t m_zipDataSize; - int32_t m_zipReadingOffset; - #endif - - public: - FSNode(void); - FSNode(etk::UString nodeName); - ~FSNode(void); - /* - All Right of the file - */ - bool Exist(void) { return (m_typeNode!=etk::FSN_UNKNOW); }; - typeNode_te GetNodeType(void) { return m_typeNode; }; - etk::FSNodeRight GetRight(void) { return m_rights; }; - bool SetRight(etk::FSNodeRight newRight); - - /* - Common API : - */ - void SetName(etk::UString newName); - etk::UString GetNameFolder(void) const; - etk::UString GetName(void) const; - etk::UString GetNameFile(void) const; - etk::UString GetRelativeFolder(void) const; - bool Touch(void); - FSNType_te GetTypeAccess(void) { return m_type; }; - bool Remove(void); - // File time properties - uint64_t TimeCreated(void) const; - etk::UString TimeCreatedString(void) const; - uint64_t TimeModified(void) const; - etk::UString TimeModifiedString(void) const; - uint64_t TimeAccessed(void) const; - etk::UString TimeAccessedString(void) const; - - /* - Operator : - */ - const etk::FSNode& operator= (const etk::FSNode &obj ); - bool operator== (const etk::FSNode &obj ) const; - bool operator!= (const etk::FSNode &obj ) const; - friend etk::CCout& operator <<( etk::CCout &os,const etk::FSNode &obj); - - /* - Folder specific : - */ - int32_t FolderCount(void); - etk::Vector FolderGetSubList(bool showHidenFile=true, - bool getFolderAndOther=true, - bool getFile=true, - bool temporaryFile=true); - etk::FSNode FolderGetParent(void); // ordered by name ... - - /* - File Specific : - */ - bool FileHasExtention(void); - etk::UString FileGetExtention(void); - uint64_t FileSize(void); - bool FileOpenRead(void); - bool FileOpenWrite(void); - bool FileClose(void); - char* FileGets(char * elementLine, int32_t maxData); - // TODO : Set the return and the size of block in 64 bits - int32_t FileRead(void * data, int32_t blockSize, int32_t nbBlock); - int32_t FileWrite(void * data, int32_t blockSize, int32_t nbBlock); - bool FileSeek(long int offset, int origin); - private: - void SortElementList(etk::Vector &list); - }; - - etk::CCout& operator <<(etk::CCout &os, const etk::FSNode &obj); - - void SetBaseFolderData(const char * folder); - void SetBaseFolderDataUser(const char * folder); - void SetBaseFolderCache(const char * folder); - void InitDefaultFolder(const char * applName); - etk::UString GetUserHomeFolder(void); - - namespace theme - { - // TODO : Add an INIT ... - // set the Folder of a subset of a theme ... - void SetName(etk::UString refName, etk::UString folderName); - // get the folder from a Reference theme - etk::UString GetName(etk::UString refName); - // get the list of all the theme folder availlable in the user Home/appl - etk::Vector List(void); - }; -}; - -#endif - diff --git a/Sources/libetk/etk/os/FSNodeRight.cpp b/Sources/libetk/etk/os/FSNodeRight.cpp deleted file mode 100644 index 69403df5..00000000 --- a/Sources/libetk/etk/os/FSNodeRight.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - - -#include -#include -#include - -// Right Flags : -enum { - RIGHT_OTHER_EXECUTE = 1 << 0, - RIGHT_OTHER_WRITE = 1 << 1, - RIGHT_OTHER_READ = 1 << 2, - RIGHT_GROUP_EXECUTE = 1 << 3, - RIGHT_GROUP_WRITE = 1 << 4, - RIGHT_GROUP_READ = 1 << 5, - RIGHT_USER_EXECUTE = 1 << 6, - RIGHT_USER_WRITE = 1 << 7, - RIGHT_USER_READ = 1 << 8, -}; - -etk::FSNodeRight::FSNodeRight(void) : - m_rights(0) -{ - -} -etk::FSNodeRight::FSNodeRight(int16_t newRight) : - m_rights(newRight&0x01FF) -{ - -} -// copy operator : -const etk::FSNodeRight& etk::FSNodeRight::operator= (const etk::FSNodeRight &obj ) -{ - m_rights = obj.m_rights; - return *this; -} - -// set right : -const etk::FSNodeRight& etk::FSNodeRight::operator= (const int32_t newVal ) -{ - m_rights = newVal&0x01FF; - return *this; -} - -// User -bool etk::FSNodeRight::IsUserReadable(void) const -{ - return ((m_rights&RIGHT_USER_READ)!=0)?true:false; -} - -bool etk::FSNodeRight::IsUserWritable(void) const -{ - return ((m_rights&RIGHT_USER_WRITE)!=0)?true:false; -} - -bool etk::FSNodeRight::IsUserRunable(void) const -{ - return ((m_rights&RIGHT_USER_EXECUTE)!=0)?true:false; -} - -void etk::FSNodeRight::SetUserReadable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_USER_READ); - if (true == newStatus) { - m_rights |= RIGHT_USER_READ; - } -} - -void etk::FSNodeRight::SetUserWritable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_USER_WRITE); - if (true == newStatus) { - m_rights |= RIGHT_USER_WRITE; - } -} - -void etk::FSNodeRight::SetUserRunable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_USER_EXECUTE); - if (true == newStatus) { - m_rights |= RIGHT_USER_EXECUTE; - } -} - -// group -bool etk::FSNodeRight::IsGroupReadable(void) const -{ - return ((m_rights&RIGHT_GROUP_READ)!=0)?true:false; -} - -bool etk::FSNodeRight::IsGroupWritable(void) const -{ - return ((m_rights&RIGHT_GROUP_WRITE)!=0)?true:false; -} - -bool etk::FSNodeRight::IsGroupRunable(void) const -{ - return ((m_rights&RIGHT_GROUP_EXECUTE)!=0)?true:false; -} - -void etk::FSNodeRight::SetGroupReadable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_GROUP_READ); - if (true == newStatus) { - m_rights |= RIGHT_GROUP_READ; - } -} - -void etk::FSNodeRight::SetGroupWritable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_GROUP_WRITE); - if (true == newStatus) { - m_rights |= RIGHT_GROUP_WRITE; - } -} - -void etk::FSNodeRight::SetGroupRunable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_GROUP_EXECUTE); - if (true == newStatus) { - m_rights |= RIGHT_GROUP_EXECUTE; - } -} - -// other -bool etk::FSNodeRight::IsOtherReadable(void) const -{ - return ((m_rights&RIGHT_OTHER_READ)!=0)?true:false; -} - -bool etk::FSNodeRight::IsOtherWritable(void) const -{ - return ((m_rights&RIGHT_OTHER_WRITE)!=0)?true:false; -} - -bool etk::FSNodeRight::IsOtherRunable(void) const -{ - return ((m_rights&RIGHT_OTHER_EXECUTE)!=0)?true:false; -} - -void etk::FSNodeRight::SetOtherReadable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_OTHER_READ); - if (true == newStatus) { - m_rights |= RIGHT_OTHER_READ; - } -} - -void etk::FSNodeRight::SetOtherWritable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_OTHER_WRITE); - if (true == newStatus) { - m_rights |= RIGHT_OTHER_WRITE; - } -} - -void etk::FSNodeRight::SetOtherRunable(bool newStatus) -{ - // reset the flag : - m_rights &= (0xFFFFFFFF - RIGHT_OTHER_EXECUTE); - if (true == newStatus) { - m_rights |= RIGHT_OTHER_EXECUTE; - } -} -etk::UString etk::FSNodeRight::GetRight(void) const -{ - etk::UString tmp; - if (true==IsUserReadable()) { - tmp += "r"; - } else { - tmp += "-"; - } - if (true==IsUserWritable()) { - tmp += "w"; - } else { - tmp += "-"; - } - if (true==IsUserRunable()) { - tmp += "x"; - } else { - tmp += "-"; - } - if (true==IsGroupReadable()) { - tmp += "r"; - } else { - tmp += "-"; - } - if (true==IsGroupWritable()) { - tmp += "w"; - } else { - tmp += "-"; - } - if (true==IsGroupRunable()) { - tmp += "x"; - } else { - tmp += "-"; - } - if (true==IsOtherReadable()) { - tmp += "r"; - } else { - tmp += "-"; - } - if (true==IsOtherWritable()) { - tmp += "w"; - } else { - tmp += "-"; - } - if (true==IsOtherRunable()) { - tmp += "x"; - } else { - tmp += "-"; - } - return tmp; -} - - -etk::CCout& etk::operator <<(etk::CCout &os, const etk::FSNodeRight &obj) -{ - os << obj.GetRight(); - return os; -}; - diff --git a/Sources/libetk/etk/os/FSNodeRight.h b/Sources/libetk/etk/os/FSNodeRight.h deleted file mode 100644 index 8f66cc8f..00000000 --- a/Sources/libetk/etk/os/FSNodeRight.h +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_FILE_SYSTEM_NODE_RIGHT_H__ -#define __ETK_FILE_SYSTEM_NODE_RIGHT_H__ - -#include - -namespace etk -{ - class FSNodeRight - { - private: - uint16_t m_rights; - public: - FSNodeRight(void); - FSNodeRight(int16_t newRight); - ~FSNodeRight(void) { }; - // copy operator : - const etk::FSNodeRight& operator= (const etk::FSNodeRight &obj ); - // set right : - const etk::FSNodeRight& operator= (const int32_t newVal ); - - void Clear(void) { m_rights = 0; }; - // User - bool IsUserReadable(void) const; - bool IsUserWritable(void) const; - bool IsUserRunable(void) const; - void SetUserReadable(bool newStatus); - void SetUserWritable(bool newStatus); - void SetUserRunable(bool newStatus); - // group - bool IsGroupReadable(void) const; - bool IsGroupWritable(void) const; - bool IsGroupRunable(void) const; - void SetGroupReadable(bool newStatus); - void SetGroupWritable(bool newStatus); - void SetGroupRunable(bool newStatus); - // other - bool IsOtherReadable(void) const; - bool IsOtherWritable(void) const; - bool IsOtherRunable(void) const; - void SetOtherReadable(bool newStatus); - void SetOtherWritable(bool newStatus); - void SetOtherRunable(bool newStatus); - - etk::UString GetRight(void) const; - }; - etk::CCout& operator <<(etk::CCout &os, const etk::FSNodeRight &obj); -}; - -#endif - diff --git a/Sources/libetk/etk/os/Memory.cpp b/Sources/libetk/etk/os/Memory.cpp deleted file mode 100644 index 4c4f4a9a..00000000 --- a/Sources/libetk/etk/os/Memory.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - -// General -#if ETK_MEMORY_CHECKER > 0 - -void etk::MemFree( void * pointerData, const char * variableName, const char * functionName, int32_t line, const char * fileName ) -{ - TK_CRITICAL(" MEM FREE is not written ==> TODO..."); - if (NULL != pointerData) { - free(pointerData); - } -} - -void * etk::MemMalloc( size_t num, size_t size, uint8_t init, const char * variableName, const char * functionName, int32_t line, const char * fileName ) -{ - TK_CRITICAL(" MEM ALLOCATOR is not written ==> TODO..."); - return calloc(num, size); -} - -void etk::MemShowLogs( void ) -{ - TK_CRITICAL(" MEM DISPLAY is not written ==> TODO..."); -} - -#endif - diff --git a/Sources/libetk/etk/os/Memory.h b/Sources/libetk/etk/os/Memory.h deleted file mode 100644 index 6206aaa1..00000000 --- a/Sources/libetk/etk/os/Memory.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_TOOLS_MEMORY_H__ -#define __ETK_TOOLS_MEMORY_H__ - -#ifndef ETK_MEMORY_CHECKER -#define ETK_MEMORY_CHECKER 0 -#endif - -// General -#if ETK_MEMORY_CHECKER > 0 -namespace etk { - void MemFree( void * pointerData, const char * variableName, const char * functionName, int32_t line, const char * fileName ); - void * MemMalloc( size_t num, size_t size, uint8_t init, const char * variableName, const char * functionName, int32_t line, const char * fileName ); - void MemShowLogs( void ); -}; -# define ETK_MALLOC(pointerData, nbElements, dataType) do { \ - pointerData = (dataType *)etk::MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \ - }while(0) -# define ETK_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ - pointerData = (cast)etk::MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \ - }while(0) -# define ETK_CALLOC(pointerData, nbElements, dataType) do { \ - pointerData = (dataType *)etk::MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \ - }while(0) -# define ETK_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ - pointerData = (cast)etk::MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \ - }while(0) -# define ETK_FREE(pointerData) do { \ - etk::MemFree( (pointerData) , #pointerData, __func__, __LINE__, __FILE__); \ - (pointerData) = NULL; \ - }while(0) -# define ETK_MEM_SHOW_LOG() do { \ - etk::MemShowLogs(); \ - }while(0) -#else - -# define ETK_MALLOC(pointerData, nbElements, dataType) do { \ - (pointerData) = (dataType *)malloc( (nbElements) * sizeof(dataType) ); \ - }while(0) - -# define ETK_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ - (pointerData) = (cast)malloc( (nbElements) * sizeof(dataType) ); \ - }while(0) - -# define ETK_CALLOC(pointerData, nbElements, dataType) do { \ - (pointerData) = (dataType *)calloc( (nbElements), sizeof(dataType) ); \ - }while(0) - -# define ETK_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ - (pointerData) = (cast)calloc( (nbElements), sizeof(dataType) ); \ - }while(0) - -# define ETK_REALLOC(pointerData, nbElements, dataType) do { \ - (pointerData) = (dataType *)realloc( (pointerData), (nbElements)* sizeof(dataType) ); \ - }while(0) - -# define ETK_REALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ - (pointerData) = (cast)realloc( (pointerData), (nbElements) * sizeof(dataType) ); \ - }while(0) - -# define ETK_FREE(pointerData) do { \ - free( pointerData ); \ - (pointerData) = NULL; \ - }while(0) - -# define ETK_MEM_SHOW_LOG() do { \ - TK_DEBUG("No Memory check availlable"); \ - }while(0) -#endif - - -#endif - diff --git a/Sources/libetk/etk/os/Mutex.Generic.cpp b/Sources/libetk/etk/os/Mutex.Generic.cpp deleted file mode 100644 index 771accf1..00000000 --- a/Sources/libetk/etk/os/Mutex.Generic.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - -etk::Mutex::Mutex(void) -{ - // create interface mutex : - int ret = pthread_mutex_init(&m_mutex, NULL); - TK_ASSERT(ret == 0, "Error creating Mutex ..."); -} - - -etk::Mutex::~Mutex(void) -{ - // Remove mutex - int ret = pthread_mutex_destroy(&m_mutex); - TK_ASSERT(ret == 0, "Error destroying Mutex ..."); -} - - -void etk::Mutex::Lock(void) -{ - pthread_mutex_lock(&m_mutex); -} - - -bool etk::Mutex::TryLock(void) -{ - return pthread_mutex_trylock(&m_mutex) != 0; -} - - -void etk::Mutex::UnLock(void) -{ - pthread_mutex_unlock(&m_mutex); -} - diff --git a/Sources/libetk/etk/os/Mutex.Windows.cpp b/Sources/libetk/etk/os/Mutex.Windows.cpp deleted file mode 100644 index 56300f35..00000000 --- a/Sources/libetk/etk/os/Mutex.Windows.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - - -#include - -etk::Mutex::Mutex(void) -{ - InitializeCriticalSection(&m_mutex); -} - - -etk::Mutex::~Mutex(void) -{ - DeleteCriticalSection(&m_mutex); -} - - -void etk::Mutex::Lock(void) -{ - EnterCriticalSection(&m_mutex); -} - - -bool etk::Mutex::TryLock(void) -{ - return TryEnterCriticalSection(&m_mutex) != 0; -} - - -void etk::Mutex::UnLock(void) -{ - LeaveCriticalSection(&m_mutex); -} - diff --git a/Sources/libetk/etk/os/Mutex.h b/Sources/libetk/etk/os/Mutex.h deleted file mode 100644 index e436153a..00000000 --- a/Sources/libetk/etk/os/Mutex.h +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include - -#ifndef __ETK_MUTEX_H__ -#define __ETK_MUTEX_H__ - -#ifdef __TARGET_OS__Windows - #include -#else - #include -#endif - -namespace etk -{ - class Mutex - { - private: - #ifdef __TARGET_OS__Windows - CRITICAL_SECTION m_mutex; - #else - pthread_mutex_t m_mutex; - #endif - public: - Mutex(void); - ~Mutex(void); - void Lock(void); - bool TryLock(void); - void UnLock(void); - }; - -}; - -#endif diff --git a/Sources/libetk/etk/os/Semaphore.Generic.cpp b/Sources/libetk/etk/os/Semaphore.Generic.cpp deleted file mode 100644 index 0b4357fd..00000000 --- a/Sources/libetk/etk/os/Semaphore.Generic.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - - -#include -#include -#include - -etk::Semaphore::Semaphore(uint32_t nbBasicElement, uint32_t nbMessageMax) -{ - // create interface mutex : - int ret = pthread_mutex_init(&m_mutex, NULL); - TK_ASSERT(ret == 0, "Error creating Mutex ..."); - // create contition : - ret = pthread_cond_init(&m_condition, NULL); - TK_ASSERT(ret == 0, "Error creating Condition ..."); - if (ret != 0) { - ret = pthread_mutex_destroy(&m_mutex); - TK_ASSERT(ret == 0, "Error destroying Mutex ..."); - } - m_maximum = nbMessageMax; - m_data = nbBasicElement; -} - - -etk::Semaphore::~Semaphore(void) -{ - // Remove condition - int ret = pthread_cond_destroy(&m_condition); - TK_ASSERT(ret == 0, "Error destroying Condition ..."); - // Remove Mutex - ret = pthread_mutex_destroy(&m_mutex); - TK_ASSERT(ret == 0, "Error destroying Mutex ..."); -} - -uint32_t etk::Semaphore::GetCount(void) -{ - int32_t tmpData = 0; - pthread_mutex_lock(&m_mutex); - tmpData = m_data; - pthread_mutex_unlock(&m_mutex); - return tmpData; -} - -void etk::Semaphore::Post(void) -{ - pthread_mutex_lock(&m_mutex); - if (m_data>=m_maximum) { - m_data = m_maximum; - } else { - m_data++; - } - // send message - pthread_cond_broadcast(&m_condition); - pthread_mutex_unlock(&m_mutex); -} - - -void etk::Semaphore::Wait(void) -{ - pthread_mutex_lock(&m_mutex); - while(m_data == 0) { - pthread_cond_wait(&m_condition, &m_mutex); - } - m_data--; - pthread_mutex_unlock(&m_mutex); -} - - -bool etk::Semaphore::Wait(uint32_t timeOutInUs) -{ - pthread_mutex_lock(&m_mutex); - if(m_data == 0) { - struct timeval tp; - struct timespec ts; - gettimeofday(&tp,NULL); - uint64_t totalTimeUS = tp.tv_sec * 1000000 + tp.tv_usec; - totalTimeUS += timeOutInUs; - ts.tv_sec = totalTimeUS / 1000000; - ts.tv_nsec = (totalTimeUS%1000000) * 1000; - int ret = pthread_cond_timedwait(&m_condition, &m_mutex, &ts); - if (ret !=0) { //== ETIMEOUT) { - pthread_mutex_unlock(&m_mutex); - return false; - } - } - m_data--; - pthread_mutex_unlock(&m_mutex); - return true; -} - diff --git a/Sources/libetk/etk/os/Semaphore.Windows.cpp b/Sources/libetk/etk/os/Semaphore.Windows.cpp deleted file mode 100644 index 0c135299..00000000 --- a/Sources/libetk/etk/os/Semaphore.Windows.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include - -etk::Semaphore::Semaphore(uint32_t nbBasicElement, uint32_t nbMessageMax) -{ - // create interface mutex : - m_semaphore = CreateSemaphore(NULL, nbBasicElement, nbMessageMax, NULL); - TK_ASSERT(m_semaphore != 0, "Error creating SEMAPHORE ..."); -} - - -etk::Semaphore::~Semaphore(void) -{ - CloseHandle(m_semaphore); -} - -uint32_t etk::Semaphore::GetCount(void) -{ - LONG tmpData = 0; - ReleaseSemaphore(m_semaphore, 0, &tmpData); - return tmpData; -} - -void etk::Semaphore::Post(void) -{ - ReleaseSemaphore(m_semaphore, 1, NULL); -} - - -void etk::Semaphore::Wait(void) -{ - WaitForSingleObject(m_semaphore, INFINITE); -} - - -bool etk::Semaphore::Wait(uint32_t timeOutInUs) -{ - DWORD result = WaitForSingleObject(m_semaphore, timeOutInUs); - if (result == WAIT_FAILED) { - TK_ERROR("Failed to wait for semaphore "); - return false; - } else { - return result == WAIT_OBJECT_0; - } -} - diff --git a/Sources/libetk/etk/os/Semaphore.cpp b/Sources/libetk/etk/os/Semaphore.cpp deleted file mode 100644 index e69de29b..00000000 diff --git a/Sources/libetk/etk/os/Semaphore.h b/Sources/libetk/etk/os/Semaphore.h deleted file mode 100644 index a147119e..00000000 --- a/Sources/libetk/etk/os/Semaphore.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_SEMAPHORE_H__ -#define __ETK_SEMAPHORE_H__ - -#include - -#ifdef __TARGET_OS__Windows - #include -#else - #include -#endif - -namespace etk -{ - class Semaphore - { - private: - #ifdef __TARGET_OS__Windows - HANDLE m_semaphore; - #else - pthread_mutex_t m_mutex; - pthread_cond_t m_condition; - uint32_t m_data; - uint32_t m_maximum; - #endif - public: - Semaphore(uint32_t nbBasicElement=0, uint32_t nbMessageMax=1); - ~Semaphore(void); - uint32_t GetCount(void); - void Post(void); - void Wait(void); - // wait with a timeout in us; return true if get the semaphore - bool Wait(uint32_t timeOutInUs); - }; - -}; - -#endif diff --git a/Sources/libetk/etk/tool.cpp b/Sources/libetk/etk/tool.cpp deleted file mode 100644 index 7bd7bda1..00000000 --- a/Sources/libetk/etk/tool.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include -// for the rand ... -#include -#include -#include -#include - -float etk::tool::frand(float a, float b) -{ - return ( rand()/(float)RAND_MAX ) * (b-a) + a; -} - - -int32_t etk::tool::irand(int32_t a, int32_t b) -{ - return (int32_t)(( rand()/(float)RAND_MAX ) * ((float)b-(float)a) + (float)a); -} - - -void etk::tool::SortList(etk::Vector &m_listDirectory) -{ - etk::Vector tmpList = m_listDirectory; - m_listDirectory.Clear(); - for(int32_t iii=0; iii *m_listDirectory[jjj]) { - findPos = jjj+1; - } - } - //EWOL_DEBUG("position="<= 'A') { - in1 = in1 - 'A' + 'a'; - } - if (in2 <= 'Z' && in2 >= 'A') { - in2 = in2 - 'A' + 'a'; - } - if (in1 != in2) { - return false; - } - } - iii++; - input1++; - input2++; - } - return true; -} - - -etk::UString etk::tool::SimplifyPath(etk::UString input) -{ - int32_t findStartPos = input.FindForward('/') + 1; - int32_t findPos = input.FindForward('/', findStartPos); - //TK_DEBUG("Siplify : \"" << input << "\""); - int32_t preventBadCode = 0; - while (findPos!=-1) - { - //TK_DEBUG(" string=\"" << input << "\""); - //TK_DEBUG(" '/' @" << findPos); - if (input.Size()5000) { - TK_CRITICAL("ERROR when getting the small path ... this is loop prevention..."); - break; - } - } - #ifndef __TARGET_OS__Windows - // for the target that supported the Realpath system : - char buf[MAX_FILE_NAME]; - memset(buf, 0, MAX_FILE_NAME); - char * ok = realpath(input.c_str(), buf); - if (!ok) { - TK_ERROR("Error to get the real path"); - input = "/"; - } else { - input = buf; - } - #endif - - //TK_DEBUG(" ==> \"" << input << "\""); - return input; -} - diff --git a/Sources/libetk/etk/tool.h b/Sources/libetk/etk/tool.h deleted file mode 100644 index 0d7e13e4..00000000 --- a/Sources/libetk/etk/tool.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __ETK_TOOL_H__ -#define __ETK_TOOL_H__ - -#include -#include - -namespace etk { - namespace tool { - float frand(float a, float b); - int32_t irand(int32_t a, int32_t b); - void SortList(etk::Vector &m_listDirectory); - bool strnCmpNoCase(const char * input1, const char * input2, int32_t maxLen); - etk::UString SimplifyPath(etk::UString input); - }; -}; - -#endif diff --git a/Sources/libetk/etk/unicode.cpp b/Sources/libetk/etk/unicode.cpp deleted file mode 100644 index 6e0b82d5..00000000 --- a/Sources/libetk/etk/unicode.cpp +++ /dev/null @@ -1,763 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -// see : http://unicode.org/fr/charts/symbols.html#CombiningDiacriticalMarks - -#include -#include -#include -#include - - - -void unicode::convertIsoToUnicode(charset_te inputCharset, char input_ISO, uniChar_t & output_Unicode) -{ - switch(inputCharset) - { - case EDN_CHARSET_ISO_8859_1: output_Unicode = TableIso8859_1[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_2: output_Unicode = TableIso8859_2[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_3: output_Unicode = TableIso8859_3[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_4: output_Unicode = TableIso8859_4[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_5: output_Unicode = TableIso8859_5[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_6: output_Unicode = TableIso8859_6[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_7: output_Unicode = TableIso8859_7[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_8: output_Unicode = TableIso8859_8[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_9: output_Unicode = TableIso8859_9[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_10: output_Unicode = TableIso8859_10[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_11: output_Unicode = TableIso8859_11[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_13: output_Unicode = TableIso8859_13[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_14: output_Unicode = TableIso8859_14[(uint32_t)input_ISO&0xFF]; break; - case EDN_CHARSET_ISO_8859_15: - output_Unicode = TableIso8859_15[(uint32_t)input_ISO&0xFF]; - break; - default : - TK_WARNING("Unknow charset ... " << inputCharset); - output_Unicode = '?'; - break; - } -} - - -void unicode::convertUnicodeToIso(charset_te inputCharset, uniChar_t input_Unicode, char & output_ISO) -{ - const uniChar_t *tmpTable = NULL; - switch(inputCharset) - { - case EDN_CHARSET_ISO_8859_1: tmpTable = TableIso8859_1; break; - case EDN_CHARSET_ISO_8859_2: tmpTable = TableIso8859_2; break; - case EDN_CHARSET_ISO_8859_3: tmpTable = TableIso8859_3; break; - case EDN_CHARSET_ISO_8859_4: tmpTable = TableIso8859_4; break; - case EDN_CHARSET_ISO_8859_5: tmpTable = TableIso8859_5; break; - case EDN_CHARSET_ISO_8859_6: tmpTable = TableIso8859_6; break; - case EDN_CHARSET_ISO_8859_7: tmpTable = TableIso8859_7; break; - case EDN_CHARSET_ISO_8859_8: tmpTable = TableIso8859_8; break; - case EDN_CHARSET_ISO_8859_9: tmpTable = TableIso8859_9; break; - case EDN_CHARSET_ISO_8859_10: tmpTable = TableIso8859_10; break; - case EDN_CHARSET_ISO_8859_11: tmpTable = TableIso8859_11; break; - case EDN_CHARSET_ISO_8859_13: tmpTable = TableIso8859_13; break; - case EDN_CHARSET_ISO_8859_14: tmpTable = TableIso8859_14; break; - case EDN_CHARSET_ISO_8859_15: tmpTable = TableIso8859_15; break; - default : - TK_WARNING("Unknow charset ... " << inputCharset); - output_ISO = '?'; - return; - } - int32_t i; - for (i=0; i<256; i++) { - if (tmpTable[i] == input_Unicode) { - output_ISO = (char)i; - return; - } - } -} - - -int32_t unicode::convertIsoToUnicode(charset_te inputCharset, etk::Vector& input_ISO, etk::Vector& output_Unicode) -{ - output_Unicode.Clear(); - uniChar_t output; - for(int32_t iii=0; iii& input_ISO, etk::Vector& output_Unicode) -{ - output_Unicode.Clear(); - uniChar_t output; - for(int32_t iii=0; iii& input_Unicode, etk::Vector& output_ISO) -{ - output_ISO.Clear(); - char output[10]; - for(int32_t iii=0; iii& input_Unicode, etk::Vector& output_ISO) -{ - output_ISO.Clear(); - char output[10]; - for(int32_t iii=0; iii= value) { - output = value; - } else if (2047 >= value) { - // output ==> 00000000 00000000 110xxxxx 10xxxxxx - // input ==> -------- -------- -----222 22111111 - output = 0x0000C080; - output+= (value & 0x000007C0)<<2; - output+= value & 0x0000003F; - } else if (65535 >= value) { - // output ==> 00000000 1110xxxx 10xxxxxx 10xxxxxx - // input ==> -------- -------- 33332222 22111111 - output = 0x00E08080; - output+= (value & 0x0000F000)<<4; - output+= (value & 0x00000FC0)<<2; - output+= value & 0x0000003F; - } else if (1114111 >= value) { - // output ==> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // input ==> -------- ---44433 33332222 22111111 - output = 0xF0808080; - output+= (value & 0x001C0000)<<6; - output+= (value & 0x0003F000)<<4; - output+= (value & 0x00000FC0)<<2; - output+= value & 0x0000003F; - } else { - TK_ERROR("NON UTF8 caracter input..."); - return 0; - } - //printf("utf8convertion : %d=%08x ==> %08x\n",value, value, output); - return output; -} - - -void unicode::convertUnicodeToUtf8(uniChar_t input_Unicode, char * output_UTF8) -{ - uint32_t value = unicodeToUtf8(input_Unicode); - if (0xFF >= value) { - output_UTF8[0] = (char)value; - output_UTF8[1] = '\0'; - } else if (0xFFFF >= value) { - output_UTF8[0] = (char)((value>>8) & 0x000000FF); - output_UTF8[1] = (char)value; - output_UTF8[2] = '\0'; - } else if (0xFFFFFF >= value) { - output_UTF8[0] = (char)((value>>16) & 0x000000FF); - output_UTF8[1] = (char)((value>>8) & 0x000000FF); - output_UTF8[2] = (char)value; - output_UTF8[3] = '\0'; - } else { - output_UTF8[0] = (char)((value>>24) & 0x000000FF); - output_UTF8[1] = (char)((value>>16) & 0x000000FF); - output_UTF8[2] = (char)((value>>8) & 0x000000FF); - output_UTF8[3] = (char)value; - output_UTF8[4] = '\0'; - } -} - - - -void unicode::convertUtf8ToUnicode(char * input_UTF8, uniChar_t &output_Unicode) -{ - int32_t len = strlen(input_UTF8); - output_Unicode = 0; - switch (len) { - case 1: - output_Unicode = (uint8_t)(input_UTF8[0]) & 0x7F; - break; - case 2: - output_Unicode = (((uint8_t)input_UTF8[0]) & 0x1F)<< 6; - output_Unicode += ((uint8_t)input_UTF8[1]) & 0x3F; - break; - case 3: - output_Unicode = (((uint8_t)input_UTF8[0]) & 0x0F)<< 12; - output_Unicode += (((uint8_t)input_UTF8[1]) & 0x3F)<< 6; - output_Unicode += ((uint8_t)input_UTF8[2]) & 0x3F; - break; - default: - output_Unicode = (((uint8_t)input_UTF8[0]) & 0x07)<< 18; - output_Unicode += (((uint8_t)input_UTF8[1]) & 0x3F)<< 12; - output_Unicode += (((uint8_t)input_UTF8[2]) & 0x3F)<< 6; - output_Unicode += ((uint8_t)input_UTF8[3]) & 0x3F; - break; - } -} - - -int32_t unicode::convertUnicodeToUtf8(const etk::Vector& input_Unicode, etk::Vector& output_UTF8) -{ - char output[10]; - - for (int32_t iii=0; iii& input_Unicode, etk::Vector& output_UTF8) -{ - char output[10]; - - for (int32_t iii=0; iii& input_UTF8, etk::Vector& output_Unicode) -{ - char tmpData[20]; - int32_t pos = 0; - while (pos < input_UTF8.Size()) { - int32_t lenMax = input_UTF8.Size() - pos; - //4 case - if( 1<=lenMax - && 0x00 == (input_UTF8[pos+0] & 0x80) ) - { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = '\0'; - pos += 1; - } else if( 2<=lenMax - && 0xC0 == (input_UTF8[pos+0] & 0xE0) - && 0x80 == (input_UTF8[pos+1] & 0xC0) ) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = '\0'; - pos += 2; - } else if( 3<=lenMax - && 0xE0 == (input_UTF8[pos+0] & 0xF0) - && 0x80 == (input_UTF8[pos+1] & 0xC0) - && 0x80 == (input_UTF8[pos+2] & 0xC0)) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = input_UTF8[pos+2]; - tmpData[3] = '\0'; - pos += 3; - } else if( 4<=lenMax - && 0xF0 == (input_UTF8[pos+0] & 0xF8) - && 0x80 == (input_UTF8[pos+1] & 0xC0) - && 0x80 == (input_UTF8[pos+2] & 0xC0) - && 0x80 == (input_UTF8[pos+3] & 0xC0)) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = input_UTF8[pos+2]; - tmpData[3] = input_UTF8[pos+3]; - tmpData[4] = '\0'; - pos += 4; - } else { - tmpData[0] = '\0'; - pos += 1; - } - uniChar_t tmpUnicode; - convertUtf8ToUnicode(tmpData, tmpUnicode); - output_Unicode.PushBack(tmpUnicode); - } - return 0; -} - -int32_t unicode::convertUtf8ToUnicode(etk::Vector& input_UTF8, etk::Vector& output_Unicode) -{ - char tmpData[20]; - int32_t pos = 0; - while (pos < input_UTF8.Size()) { - int32_t lenMax = input_UTF8.Size() - pos; - //4 case - if( 1<=lenMax - && 0x00 == (input_UTF8[pos+0] & 0x80) ) - { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = '\0'; - pos += 1; - } else if( 2<=lenMax - && 0xC0 == (input_UTF8[pos+0] & 0xE0) - && 0x80 == (input_UTF8[pos+1] & 0xC0) ) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = '\0'; - pos += 2; - } else if( 3<=lenMax - && 0xE0 == (input_UTF8[pos+0] & 0xF0) - && 0x80 == (input_UTF8[pos+1] & 0xC0) - && 0x80 == (input_UTF8[pos+2] & 0xC0)) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = input_UTF8[pos+2]; - tmpData[3] = '\0'; - pos += 3; - } else if( 4<=lenMax - && 0xF0 == (input_UTF8[pos+0] & 0xF8) - && 0x80 == (input_UTF8[pos+1] & 0xC0) - && 0x80 == (input_UTF8[pos+2] & 0xC0) - && 0x80 == (input_UTF8[pos+3] & 0xC0)) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = input_UTF8[pos+2]; - tmpData[3] = input_UTF8[pos+3]; - tmpData[4] = '\0'; - pos += 4; - } else { - tmpData[0] = '\0'; - pos += 1; - } - uniChar_t tmpUnicode; - convertUtf8ToUnicode(tmpData, tmpUnicode); - output_Unicode.PushBack(tmpUnicode); - } - return 0; -} - -int32_t unicode::convertUtf8ToUnicode(char * input_UTF8, etk::Vector& output_Unicode) -{ - char tmpData[20]; - int32_t pos = 0; - if (NULL == input_UTF8) { - return 0; - } - int32_t len = strlen(input_UTF8); - while (pos < len) { - int32_t lenMax = len - pos; - //4 case - if( 1<=lenMax - && 0x00 == (input_UTF8[pos+0] & 0x80) ) - { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = '\0'; - pos += 1; - } else if( 2<=lenMax - && 0xC0 == (input_UTF8[pos+0] & 0xE0) - && 0x80 == (input_UTF8[pos+1] & 0xC0) ) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = '\0'; - pos += 2; - } else if( 3<=lenMax - && 0xE0 == (input_UTF8[pos+0] & 0xF0) - && 0x80 == (input_UTF8[pos+1] & 0xC0) - && 0x80 == (input_UTF8[pos+2] & 0xC0)) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = input_UTF8[pos+2]; - tmpData[3] = '\0'; - pos += 3; - } else if( 4<=lenMax - && 0xF0 == (input_UTF8[pos+0] & 0xF8) - && 0x80 == (input_UTF8[pos+1] & 0xC0) - && 0x80 == (input_UTF8[pos+2] & 0xC0) - && 0x80 == (input_UTF8[pos+3] & 0xC0)) { - tmpData[0] = input_UTF8[pos+0]; - tmpData[1] = input_UTF8[pos+1]; - tmpData[2] = input_UTF8[pos+2]; - tmpData[3] = input_UTF8[pos+3]; - tmpData[4] = '\0'; - pos += 4; - } else { - tmpData[0] = '\0'; - pos += 1; - } - uniChar_t tmpUnicode; - convertUtf8ToUnicode(tmpData, tmpUnicode); - output_Unicode.PushBack(tmpUnicode); - } - return 0; -} - - -// Transform ISO <==> UTF-8 -void unicode::convertIsoToUtf8(charset_te inputCharset, char input_ISO, char * output_UTF8) -{ - uniChar_t tmpUnicode; - // concert Iso in UniCode - convertIsoToUnicode(inputCharset, input_ISO, tmpUnicode ); - // convert UniCode in Utf-8 - convertUnicodeToUtf8(tmpUnicode, output_UTF8); -} - - -void unicode::convertUtf8ToIso(charset_te inputCharset, char * input_UTF8, char & output_ISO) -{ - uniChar_t tmpUnicode; - // convert Utf-8 in UniCode - convertUtf8ToUnicode(input_UTF8, tmpUnicode); - // concert UniCode in Iso - convertUnicodeToIso(inputCharset, tmpUnicode, output_ISO); -} - - -int32_t unicode::convertIsoToUtf8(charset_te inputCharset, etk::Vector& input_ISO, etk::Vector& output_UTF8) -{ - TK_WARNING("TODO : not coded..."); - return 0; -} - - -int32_t unicode::convertUtf8ToIso(charset_te inputCharset, etk::Vector& input_UTF8, etk::Vector& output_ISO) -{ - TK_WARNING("TODO : not coded..."); - return 0; -} - -void unicode::Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid) -{ - TK_ASSERT(0 <= lenMax, "size can not be < 0 ..."); - if (0 > lenMax) { - size = 0; - baseValid = false; - return; - } - //4 case - if ( 1<=lenMax - && 0x00 == (data[0] & 0x80) ) { - // One Char Element - size = 1; - baseValid = true; - } else if( 2<=lenMax - && 0xC0 == (data[0] & 0xE0) - && 0x80 == (data[1] & 0xC0) ) { - size = 2; - baseValid = true; - } else if( 3<=lenMax - && 0xE0 == (data[0] & 0xF0) - && 0x80 == (data[1] & 0xC0) - && 0x80 == (data[2] & 0xC0)) { - size = 3; - baseValid = true; - } else if( 4<=lenMax - && 0xF0 == (data[0] & 0xF8) - && 0x80 == (data[1] & 0xC0) - && 0x80 == (data[2] & 0xC0) - && 0x80 == (data[3] & 0xC0)) { - size = 4; - baseValid = true; - } else { - // return only one error Caracter ... - baseValid = false; - size = 1; - } -} - -#if 0 // Remove for the moment ... -/** - * @brief Get the number of element of the previous UTF8 char (in the curent Buffer) - * - * @param[in] data pointer on the curent CHAR string (pointer on the allocated buffer) (the curent char is not check) - * @param[out] size Nb of char use in this UTF8 [0..4] - * @param[out] baseValid true : the ase format of the UTF8 is CORRECT - * - * @return --- - * - */ -static void Utf8_SizePreviousElement(const char * data, int32_t lenMax, uint8_t &size, bool &baseValid) -{ - EDN_ASSERT(0 <= lenMax, "size can not be < 0 ..."); - if (0 > lenMax) { - size = 0; - baseValid = false; - return; - } - //4 case - if ( 1<=lenMax - && 0x00 == (data[-1] & 0x80) ) { - // One Char Element - size = 1; - baseValid = true; - } else if( 2<=lenMax - && 0xC0 == (data[-2] & 0xE0) - && 0x80 == (data[-1] & 0xC0) ) { - size = 2; - baseValid = true; - } else if( 3<=lenMax - && 0xE0 == (data[-3] & 0xF0) - && 0x80 == (data[-2] & 0xC0) - && 0x80 == (data[-1] & 0xC0)) { - size = 3; - baseValid = true; - } else if( 4<=lenMax - && 0xF0 == (data[-4] & 0xF8) - && 0x80 == (data[-3] & 0xC0) - && 0x80 == (data[-2] & 0xC0) - && 0x80 == (data[-1] & 0xC0)) { - size = 4; - baseValid = true; - } else { - // return only one error Caracter ... - baseValid = false; - size = 1; - } -} -#endif - -/** - * @brief - * - * @param[in,out] - * - * @return - * - */ - /* -static uint32_t Utf8_GetValue(UTF8Element_ts &Element) -{ - uint32_t value = 0; - const char * data = m_data + Element.CharPosition; - //4 case - switch(Element.CharSize) - { - case 1: - value = data[0] & 0x7F; - break; - case 2: - value = (data[0] & 0x1F)<< 6; - value += data[1] & 0x3F; - break; - case 3: - value = (data[0] & 0x0F)<< 12; - value += (data[1] & 0x3F)<< 6; - value += data[2] & 0x3F; - break; - case 4: - value = (data[0] & 0x07)<< 18; - value += (data[1] & 0x3F)<< 12; - value += (data[2] & 0x3F)<< 6; - value += data[3] & 0x3F; - break; - default: - // return only one error Caracter ... - EDN_ASSERT(false, "impossible case...."); - break; - } - // check the validity of the UTF8 ... - if( ( 0xD800 <= value - && 0xDFFF >= value ) - || ( 0xFDD0 <= value - && 0xFDEF >= value ) - || ( 0xFFFE <= value - && 0xFFFF >= value ) - || ( 0x1FFFE <= value - && 0x1FFFF >= value ) - || ( 0x2FFFE <= value - && 0xDFFFF >= value ) - || ( 0xEFFFE <= value - && 0xEFFFF >= value ) - || ( 0xFFFFE <= value - && 0xFFFFF >= value ) - || ( 0x10FFFE <= value - && 0x10FFFF >= value ) ) - { - // overwrite the UTF8 validity ==> this is not a diaplayable element - Element.ValidUTF8 = false; - return value; - } - - return value; -} -*/ - - -int32_t unicode::strUtf8Len(const char *input_UTF8) -{ - int32_t count = 0; - int32_t size = strlen(input_UTF8); - uint8_t tmpSize; - bool baseValid; - while (size > 0) { - Utf8_SizeElement(input_UTF8, size , tmpSize, baseValid); - input_UTF8 += tmpSize; - size -= tmpSize; - count++; - } - return count; -} - - - -// ************************************************************************************************************** -// simple convertion optention -// ************************************************************************************************************** - -#if 0 - -Procedure de recuperation des charset sans ce casser les ... - -// generate the basic file - FILE * mfile = NULL; - mfile = fopen("fichierIsoBase", "wb"); - if (NULL == mfile) { - EDN_ERROR("Error to create file"); - return false; - } - char newline = '\n'; - for(int32_t i=0x20; i<0x100; i++) { - char plop = i; - fwrite(&plop, sizeof(char), 1, mfile); - fwrite(&newline, sizeof(char), 1, mfile); - } - fclose(mfile); -// console script to convert files : -iconv -c --from-code=ISO-8859-1 --to-code=UTF-8 -o fichierUTF8_iso-1 fichierIsoBase -iconv -c --from-code=ISO-8859-2 --to-code=UTF-8 -o fichierUTF8_iso-2 fichierIsoBase -iconv -c --from-code=ISO-8859-3 --to-code=UTF-8 -o fichierUTF8_iso-3 fichierIsoBase -iconv -c --from-code=ISO-8859-4 --to-code=UTF-8 -o fichierUTF8_iso-4 fichierIsoBase -iconv -c --from-code=ISO-8859-5 --to-code=UTF-8 -o fichierUTF8_iso-5 fichierIsoBase -iconv -c --from-code=ISO-8859-6 --to-code=UTF-8 -o fichierUTF8_iso-6 fichierIsoBase -iconv -c --from-code=ISO-8859-7 --to-code=UTF-8 -o fichierUTF8_iso-7 fichierIsoBase -iconv -c --from-code=ISO-8859-8 --to-code=UTF-8 -o fichierUTF8_iso-8 fichierIsoBase -iconv -c --from-code=ISO-8859-9 --to-code=UTF-8 -o fichierUTF8_iso-9 fichierIsoBase -iconv -c --from-code=ISO-8859-10 --to-code=UTF-8 -o fichierUTF8_iso-10 fichierIsoBase -iconv -c --from-code=ISO-8859-11 --to-code=UTF-8 -o fichierUTF8_iso-11 fichierIsoBase -iconv -c --from-code=ISO-8859-12 --to-code=UTF-8 -o fichierUTF8_iso-12 fichierIsoBase -iconv -c --from-code=ISO-8859-13 --to-code=UTF-8 -o fichierUTF8_iso-13 fichierIsoBase -iconv -c --from-code=ISO-8859-14 --to-code=UTF-8 -o fichierUTF8_iso-14 fichierIsoBase -iconv -c --from-code=ISO-8859-15 --to-code=UTF-8 -o fichierUTF8_iso-15 fichierIsoBase - -// NOTE : Le format 12 n'existe pas ... - FILE * mfileout = NULL; - mfileout = fopen("outputGeneration.c", "wb"); - if (NULL == mfileout) { - EDN_ERROR("Error to create file"); - return false; - } - - char * inputFileData[] = { - "fichierUTF8_iso-1", - "fichierUTF8_iso-2", -// "fichierUTF8_iso-3", - "fichierUTF8_iso-4", - "fichierUTF8_iso-5", -/* "fichierUTF8_iso-6", - "fichierUTF8_iso-7", - "fichierUTF8_iso-8", - "fichierUTF8_iso-9", - "fichierUTF8_iso-10", - "fichierUTF8_iso-11", - "fichierUTF8_iso-13", - "fichierUTF8_iso-14", -*/ - "fichierUTF8_iso-15" - }; - - for (int32_t k=0; k<5; k++) { - FILE * mfile = NULL; - mfile = fopen(inputFileData[k], "rb"); - if (NULL == mfile) { - EDN_ERROR("Error to open file"); - return false; - } - char data[255] ; - fprintf(mfileout, "\tTYPESTRUCT_TS %s[] = {\n\t\t", inputFileData[k]); - for(int32_t i=0x0; i<0x10; i++) { - fprintf(mfileout, "0x%08X, ", i); - } - fprintf(mfileout, "\n\t\t"); - for(int32_t i=0x10; i<0x20; i++) { - fprintf(mfileout, "0x%08X, ", i); - } - for(int32_t i=0x20; i<0x100; i++) { - if (0==i%16) { - fprintf(mfileout, "\n\t\t"); - } - fgets(data, 25, mfile ); - data[strlen(data)-1] = '\0'; - EDN_INFO("sizeofLine=" << strlen(data) << " data=\"" << data << "\""); - // convert in int : - int32_t valUTF8 = 0; - int32_t valUnicode = 0; - switch (strlen(data)) { - case 1: - valUTF8 = (uint8_t) (data[0]); - valUnicode = (uint8_t)(data[0]) & 0x7F; - break; - case 2: - valUTF8 = (uint8_t) (data[0]) << 8; - valUTF8 += (uint8_t) (data[1]); - valUnicode = (((uint8_t)data[0]) & 0x1F)<< 6; - valUnicode += ((uint8_t)data[1]) & 0x3F; - break; - case 3: - valUTF8 = (uint8_t) (data[0]) << 16; - valUTF8 += (uint8_t) (data[1]) << 8; - valUTF8 += (uint8_t) (data[2]); - valUnicode = (((uint8_t)data[0]) & 0x0F)<< 12; - valUnicode += (((uint8_t)data[1]) & 0x3F)<< 6; - valUnicode += ((uint8_t)data[2]) & 0x3F; - break; - default: - valUTF8 = (uint8_t) (data[0]) <<24; - valUTF8 += (uint8_t) (data[1]) << 16; - valUTF8 += (uint8_t) (data[2]) << 8; - valUTF8 += (uint8_t) (data[3]); - valUnicode = (((uint8_t)data[0]) & 0x07)<< 18; - valUnicode += (((uint8_t)data[1]) & 0x3F)<< 12; - valUnicode += (((uint8_t)data[2]) & 0x3F)<< 6; - valUnicode += ((uint8_t)data[3]) & 0x3F; - break; - } - fprintf(mfileout, "0x%08X, ", valUnicode); - } - fprintf(mfileout, "\n\t};\n\n"); - fclose(mfile); - } - fclose(mfileout); - -#endif - - diff --git a/Sources/libetk/etk/unicode.h b/Sources/libetk/etk/unicode.h deleted file mode 100644 index 079eb9e1..00000000 --- a/Sources/libetk/etk/unicode.h +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __UNICODE_H__ -#define __UNICODE_H__ - -#include -#include -namespace unicode { - typedef enum { - EDN_CHARSET_UTF8, - EDN_CHARSET_ISO_8859_1, - EDN_CHARSET_ISO_8859_2, - EDN_CHARSET_ISO_8859_3, - EDN_CHARSET_ISO_8859_4, - EDN_CHARSET_ISO_8859_5, - EDN_CHARSET_ISO_8859_6, - EDN_CHARSET_ISO_8859_7, - EDN_CHARSET_ISO_8859_8, - EDN_CHARSET_ISO_8859_9, - EDN_CHARSET_ISO_8859_10, - EDN_CHARSET_ISO_8859_11, - EDN_CHARSET_ISO_8859_13, - EDN_CHARSET_ISO_8859_14, - EDN_CHARSET_ISO_8859_15, - } charset_te; - - // transform ISO <==> Unicode - void convertIsoToUnicode(charset_te inputCharset, char input_ISO, uniChar_t & output_Unicode); - void convertUnicodeToIso(charset_te inputCharset, uniChar_t input_Unicode, char & output_ISO); - int32_t convertIsoToUnicode(charset_te inputCharset, etk::Vector& input_ISO, etk::Vector& output_Unicode); - int32_t convertIsoToUnicode(charset_te inputCharset, etk::Vector& input_ISO, etk::Vector& output_Unicode); - int32_t convertUnicodeToIso(charset_te inputCharset, etk::Vector& input_Unicode, etk::Vector& output_ISO); - int32_t convertUnicodeToIso(charset_te inputCharset, etk::Vector& input_Unicode, etk::Vector& output_ISO); - // Transform UTF-8 <==> Unicode - void convertUnicodeToUtf8( uniChar_t input_Unicode, char * output_UTF8); - void convertUtf8ToUnicode( char * input_UTF8, uniChar_t& output_Unicode); - int32_t convertUnicodeToUtf8( const etk::Vector& input_Unicode, etk::Vector& output_UTF8); - int32_t convertUnicodeToUtf8( const etk::Vector& input_Unicode, etk::Vector& output_UTF8); - int32_t convertUtf8ToUnicode( etk::Vector& input_UTF8, etk::Vector& output_Unicode); - int32_t convertUtf8ToUnicode( etk::Vector& input_UTF8, etk::Vector& output_Unicode); - int32_t convertUtf8ToUnicode( char * input_UTF8, etk::Vector& 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, etk::Vector& input_ISO, etk::Vector& output_UTF8); - int32_t convertUtf8ToIso( charset_te inputCharset, etk::Vector& input_UTF8, etk::Vector& output_ISO); - - void Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid); - int32_t strUtf8Len(const char *input_UTF8); -} - -#endif - diff --git a/Sources/libetk/etk/unicodeTable.cpp b/Sources/libetk/etk/unicodeTable.cpp deleted file mode 100644 index be2d5a7e..00000000 --- a/Sources/libetk/etk/unicodeTable.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#include -#include -#include - -extern "C" { - - const uniChar_t TableIso8859_1[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, - 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x000000BF, - 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, - 0x000000D0, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x000000DE, 0x000000DF, - 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, - 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x000000FE, 0x000000FF - }; - - const uniChar_t TableIso8859_2[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000104, 0x000002D8, 0x00000141, 0x000000A4, 0x0000013D, 0x0000015A, 0x000000A7, 0x000000A8, 0x00000160, 0x0000015E, 0x00000164, 0x00000179, 0x000000AD, 0x0000017D, 0x0000017B, - 0x000000B0, 0x00000105, 0x000002DB, 0x00000142, 0x000000B4, 0x0000013E, 0x0000015B, 0x000002C7, 0x000000B8, 0x00000161, 0x0000015F, 0x00000165, 0x0000017A, 0x000002DD, 0x0000017E, 0x0000017C, - 0x00000154, 0x000000C1, 0x000000C2, 0x00000102, 0x000000C4, 0x00000139, 0x00000106, 0x000000C7, 0x0000010C, 0x000000C9, 0x00000118, 0x000000CB, 0x0000011A, 0x000000CD, 0x000000CE, 0x0000010E, - 0x00000110, 0x00000143, 0x00000147, 0x000000D3, 0x000000D4, 0x00000150, 0x000000D6, 0x000000D7, 0x00000158, 0x0000016E, 0x000000DA, 0x00000170, 0x000000DC, 0x000000DD, 0x00000162, 0x000000DF, - 0x00000155, 0x000000E1, 0x000000E2, 0x00000103, 0x000000E4, 0x0000013A, 0x00000107, 0x000000E7, 0x0000010D, 0x000000E9, 0x00000119, 0x000000EB, 0x0000011B, 0x000000ED, 0x000000EE, 0x0000010F, - 0x00000111, 0x00000144, 0x00000148, 0x000000F3, 0x000000F4, 0x00000151, 0x000000F6, 0x000000F7, 0x00000159, 0x0000016F, 0x000000FA, 0x00000171, 0x000000FC, 0x000000FD, 0x00000163, 0x000002D9 - }; - - const uniChar_t TableIso8859_3[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000126, 0x000002D8, 0x000000A3, 0x000000A4, 0x00000000, 0x00000124, 0x000000A7, 0x000000A8, 0x00000130, 0x0000015E, 0x0000011E, 0x00000134, 0x000000AD, 0x00000000, 0x0000017B, - 0x000000B0, 0x00000127, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x00000125, 0x000000B7, 0x000000B8, 0x00000131, 0x0000015F, 0x0000011F, 0x00000135, 0x000000BD, 0x00000000, 0x0000017C, - 0x000000C0, 0x000000C1, 0x000000C2, 0x00000000, 0x000000C4, 0x0000010A, 0x00000108, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, - 0x00000000, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x00000120, 0x000000D6, 0x000000D7, 0x0000011C, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x0000016C, 0x0000015C, 0x000000DF, - 0x000000E0, 0x000000E1, 0x000000E2, 0x00000000, 0x000000E4, 0x0000010B, 0x00000109, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, - 0x00000000, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x00000121, 0x000000F6, 0x000000F7, 0x0000011D, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x0000016D, 0x0000015D, 0x000002D9 - }; - - const uniChar_t TableIso8859_4[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000104, 0x00000138, 0x00000156, 0x000000A4, 0x00000128, 0x0000013B, 0x000000A7, 0x000000A8, 0x00000160, 0x00000112, 0x00000122, 0x00000166, 0x000000AD, 0x0000017D, 0x000000AF, - 0x000000B0, 0x00000105, 0x000002DB, 0x00000157, 0x000000B4, 0x00000129, 0x0000013C, 0x000002C7, 0x000000B8, 0x00000161, 0x00000113, 0x00000123, 0x00000167, 0x0000014A, 0x0000017E, 0x0000014B, - 0x00000100, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x0000012E, 0x0000010C, 0x000000C9, 0x00000118, 0x000000CB, 0x00000116, 0x000000CD, 0x000000CE, 0x0000012A, - 0x00000110, 0x00000145, 0x0000014C, 0x00000136, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x00000172, 0x000000DA, 0x000000DB, 0x000000DC, 0x00000168, 0x0000016A, 0x000000DF, - 0x00000101, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x0000012F, 0x0000010D, 0x000000E9, 0x00000119, 0x000000EB, 0x00000117, 0x000000ED, 0x000000EE, 0x0000012B, - 0x00000111, 0x00000146, 0x0000014D, 0x00000137, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x00000173, 0x000000FA, 0x000000FB, 0x000000FC, 0x00000169, 0x0000016B, 0x000002D9 - }; - - const uniChar_t TableIso8859_5[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000401, 0x00000402, 0x00000403, 0x00000404, 0x00000405, 0x00000406, 0x00000407, 0x00000408, 0x00000409, 0x0000040A, 0x0000040B, 0x0000040C, 0x000000AD, 0x0000040E, 0x0000040F, - 0x00000410, 0x00000411, 0x00000412, 0x00000413, 0x00000414, 0x00000415, 0x00000416, 0x00000417, 0x00000418, 0x00000419, 0x0000041A, 0x0000041B, 0x0000041C, 0x0000041D, 0x0000041E, 0x0000041F, - 0x00000420, 0x00000421, 0x00000422, 0x00000423, 0x00000424, 0x00000425, 0x00000426, 0x00000427, 0x00000428, 0x00000429, 0x0000042A, 0x0000042B, 0x0000042C, 0x0000042D, 0x0000042E, 0x0000042F, - 0x00000430, 0x00000431, 0x00000432, 0x00000433, 0x00000434, 0x00000435, 0x00000436, 0x00000437, 0x00000438, 0x00000439, 0x0000043A, 0x0000043B, 0x0000043C, 0x0000043D, 0x0000043E, 0x0000043F, - 0x00000440, 0x00000441, 0x00000442, 0x00000443, 0x00000444, 0x00000445, 0x00000446, 0x00000447, 0x00000448, 0x00000449, 0x0000044A, 0x0000044B, 0x0000044C, 0x0000044D, 0x0000044E, 0x0000044F, - 0x00002116, 0x00000451, 0x00000452, 0x00000453, 0x00000454, 0x00000455, 0x00000456, 0x00000457, 0x00000458, 0x00000459, 0x0000045A, 0x0000045B, 0x0000045C, 0x000000A7, 0x0000045E, 0x0000045F - }; - - const uniChar_t TableIso8859_6[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000000, 0x00000000, 0x00000000, 0x000000A4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000060C, 0x000000AD, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000061B, 0x00000000, 0x00000000, 0x00000000, 0x0000061F, - 0x00000000, 0x00000621, 0x00000622, 0x00000623, 0x00000624, 0x00000625, 0x00000626, 0x00000627, 0x00000628, 0x00000629, 0x0000062A, 0x0000062B, 0x0000062C, 0x0000062D, 0x0000062E, 0x0000062F, - 0x00000630, 0x00000631, 0x00000632, 0x00000633, 0x00000634, 0x00000635, 0x00000636, 0x00000637, 0x00000638, 0x00000639, 0x0000063A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000640, 0x00000641, 0x00000642, 0x00000643, 0x00000644, 0x00000645, 0x00000646, 0x00000647, 0x00000648, 0x00000649, 0x0000064A, 0x0000064B, 0x0000064C, 0x0000064D, 0x0000064E, 0x0000064F, - 0x00000650, 0x00000651, 0x00000652, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 - }; - - const uniChar_t TableIso8859_7[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00002018, 0x00002019, 0x000000A3, 0x000020AC, 0x000020AF, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x0000037A, 0x000000AB, 0x000000AC, 0x000000AD, 0x00000000, 0x00002015, - 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x00000384, 0x00000385, 0x00000386, 0x000000B7, 0x00000388, 0x00000389, 0x0000038A, 0x000000BB, 0x0000038C, 0x000000BD, 0x0000038E, 0x0000038F, - 0x00000390, 0x00000391, 0x00000392, 0x00000393, 0x00000394, 0x00000395, 0x00000396, 0x00000397, 0x00000398, 0x00000399, 0x0000039A, 0x0000039B, 0x0000039C, 0x0000039D, 0x0000039E, 0x0000039F, - 0x000003A0, 0x000003A1, 0x00000000, 0x000003A3, 0x000003A4, 0x000003A5, 0x000003A6, 0x000003A7, 0x000003A8, 0x000003A9, 0x000003AA, 0x000003AB, 0x000003AC, 0x000003AD, 0x000003AE, 0x000003AF, - 0x000003B0, 0x000003B1, 0x000003B2, 0x000003B3, 0x000003B4, 0x000003B5, 0x000003B6, 0x000003B7, 0x000003B8, 0x000003B9, 0x000003BA, 0x000003BB, 0x000003BC, 0x000003BD, 0x000003BE, 0x000003BF, - 0x000003C0, 0x000003C1, 0x000003C2, 0x000003C3, 0x000003C4, 0x000003C5, 0x000003C6, 0x000003C7, 0x000003C8, 0x000003C9, 0x000003CA, 0x000003CB, 0x000003CC, 0x000003CD, 0x000003CE, 0x00000000 - }; - - const uniChar_t TableIso8859_8[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000000, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000D7, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, - 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000F7, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00002017, - 0x000005D0, 0x000005D1, 0x000005D2, 0x000005D3, 0x000005D4, 0x000005D5, 0x000005D6, 0x000005D7, 0x000005D8, 0x000005D9, 0x000005DA, 0x000005DB, 0x000005DC, 0x000005DD, 0x000005DE, 0x000005DF, - 0x000005E0, 0x000005E1, 0x000005E2, 0x000005E3, 0x000005E4, 0x000005E5, 0x000005E6, 0x000005E7, 0x000005E8, 0x000005E9, 0x000005EA, 0x00000000, 0x00000000, 0x0000200E, 0x0000200F, 0x000003C0 - }; - - const uniChar_t TableIso8859_9[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, - 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x000000BF, - 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, - 0x0000011E, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x00000130, 0x0000015E, 0x000000DF, - 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, - 0x0000011F, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x00000131, 0x0000015F, 0x000000FF - }; - - const uniChar_t TableIso8859_10[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000104, 0x00000112, 0x00000122, 0x0000012A, 0x00000128, 0x00000136, 0x000000A7, 0x0000013B, 0x00000110, 0x00000160, 0x00000166, 0x0000017D, 0x000000AD, 0x0000016A, 0x0000014A, - 0x000000B0, 0x00000105, 0x00000113, 0x00000123, 0x0000012B, 0x00000129, 0x00000137, 0x000000B7, 0x0000013C, 0x00000111, 0x00000161, 0x00000167, 0x0000017E, 0x00002015, 0x0000016B, 0x0000014B, - 0x00000100, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x0000012E, 0x0000010C, 0x000000C9, 0x00000118, 0x000000CB, 0x00000116, 0x000000CD, 0x000000CE, 0x000000CF, - 0x000000D0, 0x00000145, 0x0000014C, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x00000168, 0x000000D8, 0x00000172, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x000000DE, 0x000000DF, - 0x00000101, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x0000012F, 0x0000010D, 0x000000E9, 0x00000119, 0x000000EB, 0x00000117, 0x000000ED, 0x000000EE, 0x000000EF, - 0x000000F0, 0x00000146, 0x0000014D, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x00000169, 0x000000F8, 0x00000173, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x000000FE, 0x00000138 - }; - - const uniChar_t TableIso8859_11[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00000E01, 0x00000E02, 0x00000E03, 0x00000E04, 0x00000E05, 0x00000E06, 0x00000E07, 0x00000E08, 0x00000E09, 0x00000E0A, 0x00000E0B, 0x00000E0C, 0x00000E0D, 0x00000E0E, 0x00000E0F, - 0x00000E10, 0x00000E11, 0x00000E12, 0x00000E13, 0x00000E14, 0x00000E15, 0x00000E16, 0x00000E17, 0x00000E18, 0x00000E19, 0x00000E1A, 0x00000E1B, 0x00000E1C, 0x00000E1D, 0x00000E1E, 0x00000E1F, - 0x00000E20, 0x00000E21, 0x00000E22, 0x00000E23, 0x00000E24, 0x00000E25, 0x00000E26, 0x00000E27, 0x00000E28, 0x00000E29, 0x00000E2A, 0x00000E2B, 0x00000E2C, 0x00000E2D, 0x00000E2E, 0x00000E2F, - 0x00000E30, 0x00000E31, 0x00000E32, 0x00000E33, 0x00000E34, 0x00000E35, 0x00000E36, 0x00000E37, 0x00000E38, 0x00000E39, 0x00000E3A, 0x00000E80, 0x00000E80, 0x00000E80, 0x00000E80, 0x00000E3F, - 0x00000E40, 0x00000E41, 0x00000E42, 0x00000E43, 0x00000E44, 0x00000E45, 0x00000E46, 0x00000E47, 0x00000E48, 0x00000E49, 0x00000E4A, 0x00000E4B, 0x00000E4C, 0x00000E4D, 0x00000E4E, 0x00000E4F, - 0x00000E50, 0x00000E51, 0x00000E52, 0x00000E53, 0x00000E54, 0x00000E55, 0x00000E56, 0x00000E57, 0x00000E58, 0x00000E59, 0x00000E5A, 0x00000E5B, 0x000006C0, 0x000006C0, 0x000006C0, 0x000006C0 - }; - - const uniChar_t TableIso8859_13[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x0000201D, 0x000000A2, 0x000000A3, 0x000000A4, 0x0000201E, 0x000000A6, 0x000000A7, 0x000000D8, 0x000000A9, 0x00000156, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000C6, - 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x0000201C, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000F8, 0x000000B9, 0x00000157, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x000000E6, - 0x00000104, 0x0000012E, 0x00000100, 0x00000106, 0x000000C4, 0x000000C5, 0x00000118, 0x00000112, 0x0000010C, 0x000000C9, 0x00000179, 0x00000116, 0x00000122, 0x00000136, 0x0000012A, 0x0000013B, - 0x00000160, 0x00000143, 0x00000145, 0x000000D3, 0x0000014C, 0x000000D5, 0x000000D6, 0x000000D7, 0x00000172, 0x00000141, 0x0000015A, 0x0000016A, 0x000000DC, 0x0000017B, 0x0000017D, 0x000000DF, - 0x00000105, 0x0000012F, 0x00000101, 0x00000107, 0x000000E4, 0x000000E5, 0x00000119, 0x00000113, 0x0000010D, 0x000000E9, 0x0000017A, 0x00000117, 0x00000123, 0x00000137, 0x0000012B, 0x0000013C, - 0x00000161, 0x00000144, 0x00000146, 0x000000F3, 0x0000014D, 0x000000F5, 0x000000F6, 0x000000F7, 0x00000173, 0x00000142, 0x0000015B, 0x0000016B, 0x000000FC, 0x0000017C, 0x0000017E, 0x00002019 - }; - - const uniChar_t TableIso8859_14[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x00001E02, 0x00001E03, 0x000000A3, 0x0000010A, 0x0000010B, 0x00001E0A, 0x000000A7, 0x00001E80, 0x000000A9, 0x00001E82, 0x00001E0B, 0x00001EF2, 0x000000AD, 0x000000AE, 0x00000178, - 0x00001E1E, 0x00001E1F, 0x00000120, 0x00000121, 0x00001E40, 0x00001E41, 0x000000B6, 0x00001E56, 0x00001E81, 0x00001E57, 0x00001E83, 0x00001E60, 0x00001EF3, 0x00001E84, 0x00001E85, 0x00001E61, - 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, - 0x00000174, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x00001E6A, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x00000176, 0x000000DF, - 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, - 0x00000175, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x00001E6B, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x00000177, 0x000000FF - }; - - const uniChar_t TableIso8859_15[] = { - 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, - 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, - 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, - 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, - 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, - 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, - 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, - 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, - 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, - 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, - 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000020AC, 0x000000A5, 0x00000160, 0x000000A7, 0x00000161, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, - 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x0000017D, 0x000000B5, 0x000000B6, 0x000000B7, 0x0000017E, 0x000000B9, 0x000000BA, 0x000000BB, 0x00000152, 0x00000153, 0x00000178, 0x000000BF, - 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, - 0x000000D0, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x000000DE, 0x000000DF, - 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, - 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x000000FE, 0x000000FF - }; - -} - diff --git a/Sources/libetk/etk/unicodeTable.h b/Sources/libetk/etk/unicodeTable.h deleted file mode 100644 index b18485ca..00000000 --- a/Sources/libetk/etk/unicodeTable.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license BSD v3 (see license file) - */ - -#ifndef __UNICODE_TABLE_H__ -#define __UNICODE_TABLE_H__ - - - -extern "C" { - - extern const uniChar_t TableIso8859_1[]; - extern const uniChar_t TableIso8859_2[]; - extern const uniChar_t TableIso8859_3[]; - extern const uniChar_t TableIso8859_4[]; - extern const uniChar_t TableIso8859_5[]; - extern const uniChar_t TableIso8859_6[]; - extern const uniChar_t TableIso8859_7[]; - extern const uniChar_t TableIso8859_8[]; - extern const uniChar_t TableIso8859_9[]; - extern const uniChar_t TableIso8859_10[]; - extern const uniChar_t TableIso8859_11[]; - extern const uniChar_t TableIso8859_13[]; - extern const uniChar_t TableIso8859_14[]; - extern const uniChar_t TableIso8859_15[]; - - ; -} - -#endif diff --git a/Sources/libetk/file.mk b/Sources/libetk/file.mk deleted file mode 100644 index 580e0fb9..00000000 --- a/Sources/libetk/file.mk +++ /dev/null @@ -1,32 +0,0 @@ - - -FILE_LIST = \ - etk/Debug.cpp \ - etk/DebugInternal.cpp \ - etk/unicode.cpp \ - etk/unicodeTable.cpp \ - etk/UString.cpp \ - etk/Stream.cpp \ - etk/RegExp.cpp \ - etk/tool.cpp - - - -FILE_LIST+= \ - etk/math/Matrix4.cpp - - -FILE_LIST+= \ - etk/os/FSNode.cpp \ - etk/os/FSNodeRight.cpp \ - etk/os/Memory.cpp \ - - - -ifeq ("$(TARGET_OS)","Windows") - FILE_LIST += etk/os/Mutex.Windows.cpp - FILE_LIST += etk/os/Semaphore.Windows.cpp -else - FILE_LIST += etk/os/Mutex.Generic.cpp - FILE_LIST += etk/os/Semaphore.Generic.cpp -endif diff --git a/Sources/libewol/Android.mk b/Sources/libewol/Android.mk deleted file mode 100644 index 3ba6ba26..00000000 --- a/Sources/libewol/Android.mk +++ /dev/null @@ -1,58 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -# name of the librairy -LOCAL_MODULE := ewol - -LOCAL_CONFIG_FILES := Config.in ConfigAndroid.in - -# get the tag of the current project : -LOCAL_VERSION=$(shell cat $(LOCAL_PATH)/tag) -$(info [TAG:$(LOCAL_MODULE)] $(LOCAL_VERSION)) - -# name of the dependency -LOCAL_LIBRARIES := etk freetype tinyxml libpng parsersvg lua libzip - -LOCAL_C_INCLUDES := - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) - -LOCAL_CFLAGS := -Wno-write-strings \ - -DEWOL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG)-$(BUILD_DIRECTORY_MODE)\"" \ - -DDATA_IN_APK - -LOCAL_EXPORT_LDLIBS := -lGLESv2 - -LOCAL_EXPORT_LDLIBS += -ldl -llog - - -FILE_ABSTRACTION:=$(LOCAL_PATH)/ewol/os/gui.Android.base.cpp -FILE_ABSTRACTION_DEST:=ewol/os/gui.Android.tmp.cpp - -EWOL_TMP_PATH:=$(LOCAL_PATH) - -$(shell rm -f $(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST)) - -$(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST): $(FILE_ABSTRACTION) - $(Q)mkdir -p $(dir $@) - $(Q)cp -f $(FILE_ABSTRACTION) $@ - $(Q)sed -i "s|__PROJECT_ORG_TYPE__|$(PROJECT_COMPAGNY_TYPE)|" $@ - $(Q)sed -i "s|__PROJECT_VENDOR__|$(PROJECT_COMPAGNY_NAME2)|" $@ - $(Q)sed -i "s|__PROJECT_NAME__|$(PROJECT_NAME2)|" $@ - $(Q)sed -i "s|__PROJECT_PACKAGE__|$(PROJECT_NAME2)|" $@ -$(FILE_ABSTRACTION_DEST): $(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST) - - - -# this is the abstraction file for Android -LOCAL_PREREQUISITES := $(FILE_ABSTRACTION_DEST) - -# load the common sources file of the platform -include $(LOCAL_PATH)/file.mk - -LOCAL_SRC_FILES := ewol/os/gui.Android.cpp $(FILE_LIST) - -include $(BUILD_STATIC_LIBRARY) - - diff --git a/Sources/libewol/licence_BSD.txt b/Sources/libewol/licence_BSD.txt deleted file mode 100644 index d593521d..00000000 --- a/Sources/libewol/licence_BSD.txt +++ /dev/null @@ -1,35 +0,0 @@ -Copyright (c) -============= - -2011, Edouard DUPIN - -License (DSB) -============= - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Sources/libfreetype b/Sources/libfreetype deleted file mode 160000 index 7e7434f1..00000000 --- a/Sources/libfreetype +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7e7434f1ed0816e0a7811ea5cebb808d3ad35264 diff --git a/Sources/libglew/glew b/Sources/libglew/glew deleted file mode 160000 index 471ea3cb..00000000 --- a/Sources/libglew/glew +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 471ea3cba3bf82e9b9351ea18b6744b06558082d diff --git a/Sources/liblua b/Sources/liblua deleted file mode 160000 index 871233ac..00000000 --- a/Sources/liblua +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 871233acc6e0d578b5aaedca8f5dc82c7d2132e2 diff --git a/Sources/libogg b/Sources/libogg deleted file mode 160000 index ceb0a9a5..00000000 --- a/Sources/libogg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ceb0a9a5b73231278bb59923b5477cb128c1d432 diff --git a/Sources/libparsersvg b/Sources/libparsersvg deleted file mode 160000 index fcd7a054..00000000 --- a/Sources/libparsersvg +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fcd7a0542ea39a8164ca97b832965adc6fda08ee diff --git a/Sources/libpng b/Sources/libpng deleted file mode 160000 index 29ed7179..00000000 --- a/Sources/libpng +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 29ed717922c583f058908cfabf9afa142c542b92 diff --git a/Sources/libportaudio b/Sources/libportaudio deleted file mode 160000 index f00eaf59..00000000 --- a/Sources/libportaudio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f00eaf59fd2b77170831ac0cfa66ec6aabd8abfc diff --git a/Sources/libtinyxml b/Sources/libtinyxml deleted file mode 160000 index 296634cf..00000000 --- a/Sources/libtinyxml +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 296634cfe883f1dd3ecc0d1905add999c44e872d diff --git a/Sources/libz/zlib b/Sources/libz/zlib deleted file mode 160000 index 30a1c706..00000000 --- a/Sources/libz/zlib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 30a1c7065dc1dc2c2ed68ed403792b660bfdd805 diff --git a/Sources/libzip b/Sources/libzip deleted file mode 160000 index bc39bbab..00000000 --- a/Sources/libzip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc39bbab0164b41379e7c1104bcda5a894b45db1 diff --git a/Sources/libewol/tag b/Sources/tag similarity index 100% rename from Sources/libewol/tag rename to Sources/tag diff --git a/avancement.boo b/avancement.boo deleted file mode 100644 index 00cbc4ec..00000000 --- a/avancement.boo +++ /dev/null @@ -1,39 +0,0 @@ -Welcome in the developement file TODO list ... - -Retirer les singleton ==> incompatible avec le sytem courant de multithreading ... - -Basic feature : - - Clipboard management - - Shortcut - - Exit confirmation (or event of exit request) - - Charset normaliqation - - -mise en place d'une chaine audio : - - background music layer (wav) - - effect play (wav) - - mix all in one signal - - Limiteur when adding signals... - - volume stage ==> effects / music backgroud - - -List of feature needed for v1.0 - # widget list : - - Button Toogle - - Image Button - - Image Area - - ListView - - TreeView - - scrolling area - - text entry - - checkbox - - ComboBox - - Menu System - - Menu contextuel - - radio List - - - # internal system: - - generate the display of one element with the correct polygone methode - - theme loading for all widget - - - diff --git a/Sources/libglew/Windows.mk b/external/glew/Windows.mk similarity index 100% rename from Sources/libglew/Windows.mk rename to external/glew/Windows.mk diff --git a/Sources/libz/Generic.mk b/external/z/Generic.mk similarity index 100% rename from Sources/libz/Generic.mk rename to external/z/Generic.mk diff --git a/Sources/libz/Windows.mk b/external/z/Windows.mk similarity index 100% rename from Sources/libz/Windows.mk rename to external/z/Windows.mk diff --git a/Sources/libz/file.mk b/external/z/file.mk similarity index 100% rename from Sources/libz/file.mk rename to external/z/file.mk diff --git a/Sources/libetk/licence_BSD.txt b/license.txt similarity index 100% rename from Sources/libetk/licence_BSD.txt rename to license.txt diff --git a/tutorial.boo b/tutorial.boo deleted file mode 100644 index c8c28c1d..00000000 --- a/tutorial.boo +++ /dev/null @@ -1,59 +0,0 @@ -## Build the NDK part ... -cd /home/edupin/progperso/android/ndk-r7/ -export NDK_PROJECT_PATH=/home/edupin/progperso/android/ndk-r7/samples/hello-jni/ -./ndk-build -## ==> now all is OK - - -# basic SDK folder : -export PATH=$PATH:/home/edupin/dev/perso/android/sdk/tools/:/home/edupin/dev/perso/android/sdk/platform-tools/ - -# configure angroide SDK : -# run : -cd ~/dev/perso/android/sdk/tools -sh -x android -# ==> add the SDK needed for android you will use like android 2.3.3 for xperia X10 -# ... wait download ... - -#Display list of target ... -android list targets - -# need to generate the application APK ... -cd /home/edupin/progperso/android/ndk-r7/samples/hello-jni/ -sh -x ~/dev/perso/android/sdk/tools/android update project -p . -s --target 1 - -#install ant with aptitude ... - -ant -Dsdk.dir=/home/edupin/progperso/android/sdk-r15/ release - -# pb : warning: 'includeantruntime' is not set -# solve with set : - -# missing javac -# solve : install openjdk - -# kill adb -adb kill-server -# install application -sudo /home/edupin/progperso/android/sdk-r15/platform-tools/adb install ./bin/HelloJni-release-unsigned.apk -# result : Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES] - - -export PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/edupin/.bin:/prog/prog/hexViewer:/home/edupin/progperso/android/sdk-r15/tools/:/home/edupin/progperso/android/sdk-r15/platform-tools/ - - -pb avec la table Sony S: - -Faire la manip : -The following procedure has confirmed that ubuntu 11.04. -1. Enable debug mode for sony tablet S -2. Add line /etc/udev/rules.d/51-android.rules -SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev" -3. Change file mode -sudo chmod a+r /etc/udev/rules.d/51-android.rules -4. Add line idVendor to ~/.android/adb_usb.ini -0x054C -5. adb kill-server ; sudo adb start-server - - -