From 754c1e28204f8fd23d6cc38fd21204339980aa79 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 31 Aug 2015 15:52:15 +0200 Subject: [PATCH] [DEV] rework tools archirtecture simplify access to have separates libs ... --- {etk => color/etk-color}/Color.cpp | 0 {etk => color/etk-color}/Color.h | 0 {etk => color/etk-color}/Color_16_bits.cxx | 0 {etk => color/etk-color}/Color_32_bits.cxx | 0 {etk => color/etk-color}/Color_8_bits.cxx | 0 {etk => color/etk-color}/Color_double.cxx | 0 {etk => color/etk-color}/Color_float.cxx | 0 etk/os/Fifo.h | 6 +++++ {etk/os => file/etk-file}/FSNode.cpp | 0 {etk/os => file/etk-file}/FSNode.h | 0 {etk/os => file/etk-file}/FSNodeRight.cpp | 0 {etk/os => file/etk-file}/FSNodeRight.h | 0 file/lutin_etk-file.py | 0 {etk => log/etk-log}/log.cpp | 0 {etk => log/etk-log}/log.h | 0 {etk => log/etk-log}/logIOs.h | 0 {etk => log/etk-log}/logIOs.m | 0 log/lutin_etk-log.py | 0 {etk/math => math/etk-math}/Matrix.h | 0 {etk/math => math/etk-math}/Matrix4.cpp | 0 {etk/math => math/etk-math}/Matrix4.h | 0 {etk/math => math/etk-math}/Plane.h | 0 {etk/math => math/etk-math}/Vector2D.cpp | 0 {etk/math => math/etk-math}/Vector2D.h | 0 {etk/math => math/etk-math}/Vector3D.cpp | 0 {etk/math => math/etk-math}/Vector3D.h | 0 {etk/math => math/etk-math}/Vector4D.cpp | 0 {etk/math => math/etk-math}/Vector4D.h | 0 math/lutin_etk-math.py | 26 ++++++++++++++++++++++ time/lutin_etk-time.py | 0 30 files changed, 32 insertions(+) rename {etk => color/etk-color}/Color.cpp (100%) rename {etk => color/etk-color}/Color.h (100%) rename {etk => color/etk-color}/Color_16_bits.cxx (100%) rename {etk => color/etk-color}/Color_32_bits.cxx (100%) rename {etk => color/etk-color}/Color_8_bits.cxx (100%) rename {etk => color/etk-color}/Color_double.cxx (100%) rename {etk => color/etk-color}/Color_float.cxx (100%) rename {etk/os => file/etk-file}/FSNode.cpp (100%) rename {etk/os => file/etk-file}/FSNode.h (100%) rename {etk/os => file/etk-file}/FSNodeRight.cpp (100%) rename {etk/os => file/etk-file}/FSNodeRight.h (100%) create mode 100644 file/lutin_etk-file.py rename {etk => log/etk-log}/log.cpp (100%) rename {etk => log/etk-log}/log.h (100%) rename {etk => log/etk-log}/logIOs.h (100%) rename {etk => log/etk-log}/logIOs.m (100%) create mode 100644 log/lutin_etk-log.py rename {etk/math => math/etk-math}/Matrix.h (100%) rename {etk/math => math/etk-math}/Matrix4.cpp (100%) rename {etk/math => math/etk-math}/Matrix4.h (100%) rename {etk/math => math/etk-math}/Plane.h (100%) rename {etk/math => math/etk-math}/Vector2D.cpp (100%) rename {etk/math => math/etk-math}/Vector2D.h (100%) rename {etk/math => math/etk-math}/Vector3D.cpp (100%) rename {etk/math => math/etk-math}/Vector3D.h (100%) rename {etk/math => math/etk-math}/Vector4D.cpp (100%) rename {etk/math => math/etk-math}/Vector4D.h (100%) create mode 100644 math/lutin_etk-math.py create mode 100644 time/lutin_etk-time.py diff --git a/etk/Color.cpp b/color/etk-color/Color.cpp similarity index 100% rename from etk/Color.cpp rename to color/etk-color/Color.cpp diff --git a/etk/Color.h b/color/etk-color/Color.h similarity index 100% rename from etk/Color.h rename to color/etk-color/Color.h diff --git a/etk/Color_16_bits.cxx b/color/etk-color/Color_16_bits.cxx similarity index 100% rename from etk/Color_16_bits.cxx rename to color/etk-color/Color_16_bits.cxx diff --git a/etk/Color_32_bits.cxx b/color/etk-color/Color_32_bits.cxx similarity index 100% rename from etk/Color_32_bits.cxx rename to color/etk-color/Color_32_bits.cxx diff --git a/etk/Color_8_bits.cxx b/color/etk-color/Color_8_bits.cxx similarity index 100% rename from etk/Color_8_bits.cxx rename to color/etk-color/Color_8_bits.cxx diff --git a/etk/Color_double.cxx b/color/etk-color/Color_double.cxx similarity index 100% rename from etk/Color_double.cxx rename to color/etk-color/Color_double.cxx diff --git a/etk/Color_float.cxx b/color/etk-color/Color_float.cxx similarity index 100% rename from etk/Color_float.cxx rename to color/etk-color/Color_float.cxx diff --git a/etk/os/Fifo.h b/etk/os/Fifo.h index ccc4ac6..f82a65f 100644 --- a/etk/os/Fifo.h +++ b/etk/os/Fifo.h @@ -104,6 +104,12 @@ namespace etk { m_data.push_back(_data); m_condition.notify_all(); }; + //! @previous + void post(const MY_TYPE &_data) { + std::unique_lock lock(m_mutex); + m_data.push_back(_data); + m_condition.notify_all(); + }; /** * @brief Remove all the message in the fifo. */ diff --git a/etk/os/FSNode.cpp b/file/etk-file/FSNode.cpp similarity index 100% rename from etk/os/FSNode.cpp rename to file/etk-file/FSNode.cpp diff --git a/etk/os/FSNode.h b/file/etk-file/FSNode.h similarity index 100% rename from etk/os/FSNode.h rename to file/etk-file/FSNode.h diff --git a/etk/os/FSNodeRight.cpp b/file/etk-file/FSNodeRight.cpp similarity index 100% rename from etk/os/FSNodeRight.cpp rename to file/etk-file/FSNodeRight.cpp diff --git a/etk/os/FSNodeRight.h b/file/etk-file/FSNodeRight.h similarity index 100% rename from etk/os/FSNodeRight.h rename to file/etk-file/FSNodeRight.h diff --git a/file/lutin_etk-file.py b/file/lutin_etk-file.py new file mode 100644 index 0000000..e69de29 diff --git a/etk/log.cpp b/log/etk-log/log.cpp similarity index 100% rename from etk/log.cpp rename to log/etk-log/log.cpp diff --git a/etk/log.h b/log/etk-log/log.h similarity index 100% rename from etk/log.h rename to log/etk-log/log.h diff --git a/etk/logIOs.h b/log/etk-log/logIOs.h similarity index 100% rename from etk/logIOs.h rename to log/etk-log/logIOs.h diff --git a/etk/logIOs.m b/log/etk-log/logIOs.m similarity index 100% rename from etk/logIOs.m rename to log/etk-log/logIOs.m diff --git a/log/lutin_etk-log.py b/log/lutin_etk-log.py new file mode 100644 index 0000000..e69de29 diff --git a/etk/math/Matrix.h b/math/etk-math/Matrix.h similarity index 100% rename from etk/math/Matrix.h rename to math/etk-math/Matrix.h diff --git a/etk/math/Matrix4.cpp b/math/etk-math/Matrix4.cpp similarity index 100% rename from etk/math/Matrix4.cpp rename to math/etk-math/Matrix4.cpp diff --git a/etk/math/Matrix4.h b/math/etk-math/Matrix4.h similarity index 100% rename from etk/math/Matrix4.h rename to math/etk-math/Matrix4.h diff --git a/etk/math/Plane.h b/math/etk-math/Plane.h similarity index 100% rename from etk/math/Plane.h rename to math/etk-math/Plane.h diff --git a/etk/math/Vector2D.cpp b/math/etk-math/Vector2D.cpp similarity index 100% rename from etk/math/Vector2D.cpp rename to math/etk-math/Vector2D.cpp diff --git a/etk/math/Vector2D.h b/math/etk-math/Vector2D.h similarity index 100% rename from etk/math/Vector2D.h rename to math/etk-math/Vector2D.h diff --git a/etk/math/Vector3D.cpp b/math/etk-math/Vector3D.cpp similarity index 100% rename from etk/math/Vector3D.cpp rename to math/etk-math/Vector3D.cpp diff --git a/etk/math/Vector3D.h b/math/etk-math/Vector3D.h similarity index 100% rename from etk/math/Vector3D.h rename to math/etk-math/Vector3D.h diff --git a/etk/math/Vector4D.cpp b/math/etk-math/Vector4D.cpp similarity index 100% rename from etk/math/Vector4D.cpp rename to math/etk-math/Vector4D.cpp diff --git a/etk/math/Vector4D.h b/math/etk-math/Vector4D.h similarity index 100% rename from etk/math/Vector4D.h rename to math/etk-math/Vector4D.h diff --git a/math/lutin_etk-math.py b/math/lutin_etk-math.py new file mode 100644 index 0000000..b4345c3 --- /dev/null +++ b/math/lutin_etk-math.py @@ -0,0 +1,26 @@ +#!/usr/bin/python +import lutin.module as module +import lutin.tools as tools + +def get_desc(): + return "e-tk : Ewol tool kit" + + +def create(target): + # module name is 'edn' and type binary. + myModule = module.Module(__file__, 'etk-math', 'LIBRARY') + # add extra compilation flags : + myModule.add_extra_compile_flags() + # add the file to compile: + myModule.add_src_file([ + 'etk-math/Matrix4.cpp', + 'etk-math/Vector2D.cpp', + 'etk-math/Vector3D.cpp', + 'etk-math/Vector4D.cpp' + ]) + myModule.add_export_path(tools.get_current_path(__file__)) + + # add the currrent module at the + return myModule + + diff --git a/time/lutin_etk-time.py b/time/lutin_etk-time.py new file mode 100644 index 0000000..e69de29