From 281f3dfc843a4ce9fe46ac43833cc20def6f8cd1 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 30 Apr 2014 22:18:00 +0200 Subject: [PATCH] [DEV] change log system Conflicts: external/ewolsa --- external/agg | 2 +- external/airtaudio | 2 +- external/eaudiofx | 2 +- external/egami | 2 +- external/ege | 2 +- external/ejson | 2 +- external/esvg | 2 +- external/etk | 2 +- external/ewolsa | 2 +- external/exml | 2 +- monk | 2 +- sources/ewol/Dimension.cpp | 4 +-- sources/ewol/Dimension.h | 4 +-- sources/ewol/Padding.cpp | 2 +- sources/ewol/Padding.h | 2 +- sources/ewol/context/ConfigFont.h | 3 +- sources/ewol/context/Context.cpp | 17 ++++----- sources/ewol/context/Context.h | 2 +- sources/ewol/context/X11/Context.cpp | 4 +-- sources/ewol/context/clipBoard.cpp | 2 +- sources/ewol/context/clipBoard.h | 3 +- sources/ewol/context/commandLine.h | 3 +- sources/ewol/context/cursor.cpp | 2 +- sources/ewol/context/cursor.h | 6 ++-- sources/ewol/debug.cpp | 5 ++- sources/ewol/debug.h | 48 +++++++++++++++++++------- sources/ewol/event/Entry.cpp | 4 +-- sources/ewol/event/Entry.h | 4 +-- sources/ewol/event/Input.cpp | 4 +-- sources/ewol/event/Input.h | 4 +-- sources/ewol/event/Time.cpp | 2 +- sources/ewol/event/Time.h | 2 +- sources/ewol/key/Special.cpp | 2 +- sources/ewol/key/Special.h | 5 ++- sources/ewol/key/keyboard.cpp | 4 +-- sources/ewol/key/keyboard.h | 7 ++-- sources/ewol/key/status.cpp | 2 +- sources/ewol/key/status.h | 5 ++- sources/ewol/key/type.cpp | 2 +- sources/ewol/key/type.h | 5 ++- sources/ewol/object/Config.cpp | 2 +- sources/ewol/object/Config.h | 5 ++- sources/ewol/object/ConfigElement.cpp | 2 +- sources/ewol/object/ConfigElement.h | 5 ++- sources/ewol/object/Message.cpp | 2 +- sources/ewol/object/Message.h | 5 ++- sources/ewol/openGL/openGL.cpp | 1 + sources/ewol/resource/TexturedFont.cpp | 6 ++-- sources/ewol/resource/TexturedFont.h | 2 +- sources/ewol/widget/WSlider.cpp | 2 +- sources/ewol/widget/WSlider.h | 2 +- sources/ewol/widget/Widget.cpp | 4 +-- sources/ewol/widget/Widget.h | 4 +-- 53 files changed, 121 insertions(+), 102 deletions(-) diff --git a/external/agg b/external/agg index db262613..8bf2d17b 160000 --- a/external/agg +++ b/external/agg @@ -1 +1 @@ -Subproject commit db2626136bd35e974a24c64b1b50c4187de30bdf +Subproject commit 8bf2d17b61989d8fbe01cbd1228147ab52e19d23 diff --git a/external/airtaudio b/external/airtaudio index 9b55657e..55e1d5db 160000 --- a/external/airtaudio +++ b/external/airtaudio @@ -1 +1 @@ -Subproject commit 9b55657ef1ce265f95321fc9468cd28b12a7bdfb +Subproject commit 55e1d5db4b2c0ac979c4334bd1882f1a1f7c909a diff --git a/external/eaudiofx b/external/eaudiofx index 5f94203f..28982a1b 160000 --- a/external/eaudiofx +++ b/external/eaudiofx @@ -1 +1 @@ -Subproject commit 5f94203fff63da9a37122f550e749d3d41e88ea4 +Subproject commit 28982a1bbddc3d7362b6caac9df01ccb2c9f8c71 diff --git a/external/egami b/external/egami index 4c336334..889807e0 160000 --- a/external/egami +++ b/external/egami @@ -1 +1 @@ -Subproject commit 4c336334a8643fdfda6ab5b2627369cacf1fb487 +Subproject commit 889807e0b9b88890a9c6734e054da5edf23e59d9 diff --git a/external/ege b/external/ege index 2b31c01f..000bde32 160000 --- a/external/ege +++ b/external/ege @@ -1 +1 @@ -Subproject commit 2b31c01fabad98b6cdfc842e9ff646f37534b9f0 +Subproject commit 000bde321dedc1ab709589a5f4cf057fe7825a63 diff --git a/external/ejson b/external/ejson index 989ced9c..86116be4 160000 --- a/external/ejson +++ b/external/ejson @@ -1 +1 @@ -Subproject commit 989ced9c90865dda4b0d6d65a4cf7eef99d9a8c1 +Subproject commit 86116be4dbcd8809b82a3bf607845c9bb4d5424b diff --git a/external/esvg b/external/esvg index 92298865..95215e43 160000 --- a/external/esvg +++ b/external/esvg @@ -1 +1 @@ -Subproject commit 9229886513957a175637e84eadc0a4ffda7d8a14 +Subproject commit 95215e438d27f4ee715a1bf33fa491d89cb98f15 diff --git a/external/etk b/external/etk index e730ba43..7f2fe798 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit e730ba434e856046ca4c8c1c5c98b960ba482350 +Subproject commit 7f2fe7980f48cab07077bce7e192f08fc7e7cf34 diff --git a/external/ewolsa b/external/ewolsa index 34ac6fe9..7bad0ec9 160000 --- a/external/ewolsa +++ b/external/ewolsa @@ -1 +1 @@ -Subproject commit 34ac6fe9d201e995401b0fc8bdbb70fe3bd40970 +Subproject commit 7bad0ec956e8bfd8eb06d8a55572bfe6012c2e44 diff --git a/external/exml b/external/exml index a231aa23..92ea8abb 160000 --- a/external/exml +++ b/external/exml @@ -1 +1 @@ -Subproject commit a231aa2305055f739ce2f81f3e4b9b631b5a0551 +Subproject commit 92ea8abb9e66eee0be8fa1b70dc23ed4374615d6 diff --git a/monk b/monk index 7654eea3..aff1fdf8 160000 --- a/monk +++ b/monk @@ -1 +1 @@ -Subproject commit 7654eea321b123e9af6b76f0d9e708e92d9448e4 +Subproject commit aff1fdf89a04b8a4594c2742f875614e56cf8a31 diff --git a/sources/ewol/Dimension.cpp b/sources/ewol/Dimension.cpp index c6f2145e..dd7545a5 100644 --- a/sources/ewol/Dimension.cpp +++ b/sources/ewol/Dimension.cpp @@ -264,7 +264,7 @@ vec2 ewol::Dimension::getFoot(void) const { return ewol::Dimension::getMillimeter()*millimeterToFoot; } -etk::CCout& ewol::operator <<(etk::CCout& _os, enum ewol::Dimension::distance _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, enum ewol::Dimension::distance _obj) { switch(_obj) { case ewol::Dimension::Pourcent: _os << "%"; @@ -294,7 +294,7 @@ etk::CCout& ewol::operator <<(etk::CCout& _os, enum ewol::Dimension::distance _o return _os; } -etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::Dimension& _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const ewol::Dimension& _obj) { _os << _obj.get(_obj.getType()) << _obj.getType(); return _os; } diff --git a/sources/ewol/Dimension.h b/sources/ewol/Dimension.h index a7eaaa9c..8cff4e08 100644 --- a/sources/ewol/Dimension.h +++ b/sources/ewol/Dimension.h @@ -204,8 +204,8 @@ namespace ewol { static float getWindowsDiag(enum ewol::Dimension::distance _type); }; - etk::CCout& operator <<(etk::CCout& _os, enum ewol::Dimension::distance _obj); - etk::CCout& operator <<(etk::CCout& _os, const ewol::Dimension& _obj); + std::ostream& operator <<(std::ostream& _os, enum ewol::Dimension::distance _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::Dimension& _obj); }; #endif diff --git a/sources/ewol/Padding.cpp b/sources/ewol/Padding.cpp index 8f3f8bd1..2fad0008 100644 --- a/sources/ewol/Padding.cpp +++ b/sources/ewol/Padding.cpp @@ -8,7 +8,7 @@ #include -etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::Padding& _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const ewol::Padding& _obj) { _os << "{"; _os << _obj.xLeft(); _os << ","; diff --git a/sources/ewol/Padding.h b/sources/ewol/Padding.h index d556c8ff..d9a23ced 100644 --- a/sources/ewol/Padding.h +++ b/sources/ewol/Padding.h @@ -80,7 +80,7 @@ namespace ewol { } }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::Padding& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::Padding& _obj); }; #endif diff --git a/sources/ewol/context/ConfigFont.h b/sources/ewol/context/ConfigFont.h index 5ce5db54..667e4509 100644 --- a/sources/ewol/context/ConfigFont.h +++ b/sources/ewol/context/ConfigFont.h @@ -9,8 +9,7 @@ #ifndef __EWOL_CONFIG_FONT_H__ #define __EWOL_CONFIG_FONT_H__ -#include -#include +#include namespace ewol { namespace context { diff --git a/sources/ewol/context/Context.cpp b/sources/ewol/context/Context.cpp index 89f516d4..8c56d493 100644 --- a/sources/ewol/context/Context.cpp +++ b/sources/ewol/context/Context.cpp @@ -312,26 +312,27 @@ ewol::Context::Context(int32_t _argc, const char* _argv[]) : // parse the debug level: for(int32_t iii = 0; iii < m_commandLine.size() ; ++iii) { if (m_commandLine.get(iii) == "-l0") { - debug::setGeneralLevel(etk::logLevelNone); + etk::log::setLevel(etk::log::logLevelNone); } else if (m_commandLine.get(iii) == "-l1") { - debug::setGeneralLevel(etk::logLevelCritical); + etk::log::setLevel(etk::log::logLevelCritical); } else if (m_commandLine.get(iii) == "-l2") { - debug::setGeneralLevel(etk::logLevelError); + etk::log::setLevel(etk::log::logLevelError); } else if (m_commandLine.get(iii) == "-l3") { - debug::setGeneralLevel(etk::logLevelWarning); + etk::log::setLevel(etk::log::logLevelWarning); } else if (m_commandLine.get(iii) == "-l4") { - debug::setGeneralLevel(etk::logLevelInfo); + etk::log::setLevel(etk::log::logLevelInfo); } else if (m_commandLine.get(iii) == "-l5") { - debug::setGeneralLevel(etk::logLevelDebug); + etk::log::setLevel(etk::log::logLevelDebug); } else if( m_commandLine.get(iii) == "-l6" || m_commandLine.get(iii) == "-l7" || m_commandLine.get(iii) == "-l8" || m_commandLine.get(iii) == "-l9") { - debug::setGeneralLevel(etk::logLevelVerbose); + etk::log::setLevel(etk::log::logLevelVerbose); } else if (m_commandLine.get(iii) == "-fps") { m_displayFps=true; } else if (m_commandLine.get(iii) == "--dbg-file") { - etk::cout.setOutputFile(true); + // TODO : Set it back ... + //etk::cout.setOutputFile(true); } else { continue; } diff --git a/sources/ewol/context/Context.h b/sources/ewol/context/Context.h index 6023f12a..1b22f110 100644 --- a/sources/ewol/context/Context.h +++ b/sources/ewol/context/Context.h @@ -9,8 +9,8 @@ #ifndef __EWOL_CONTEXT_H__ #define __EWOL_CONTEXT_H__ -#include #include +#include #include #include #include diff --git a/sources/ewol/context/X11/Context.cpp b/sources/ewol/context/X11/Context.cpp index 5d0287a5..e4c259fc 100644 --- a/sources/ewol/context/X11/Context.cpp +++ b/sources/ewol/context/X11/Context.cpp @@ -451,7 +451,7 @@ class X11Interface : public ewol::Context { //EWOL_DEBUG("X11 event : " << event.type << " = \"EnterNotify\" (" << (float)event.xcrossing.x << "," << (float)event.xcrossing.y << ")"); //gui_uniqueWindows->GenEventInput(0, ewol::EVENT_INPUT_TYPE_ENTER, (float)event.xcrossing.x, (float)event.xcrossing.y); m_curentGrabDelta -= vec2(m_originX, -m_originY); - EWOL_DEBUG("change grab delta of : " << vec2(m_originX, m_originY) ); + EWOL_VERBOSE("change grab delta of : " << vec2(m_originX, m_originY) ); break; case LeaveNotify: X11_INFO("X11 event LeaveNotify"); @@ -459,7 +459,7 @@ class X11Interface : public ewol::Context { m_cursorEventY = (m_currentHeight-event.xcrossing.y); //EWOL_DEBUG("X11 event : " << event.type << " = \"LeaveNotify\" (" << (float)event.xcrossing.x << "," << (float)event.xcrossing.y << ")"); m_curentGrabDelta += vec2(m_originX, -m_originY); - EWOL_DEBUG("change grab delta of : " << vec2(m_originX, m_originY) ); + EWOL_VERBOSE("change grab delta of : " << vec2(m_originX, m_originY) ); break; case MotionNotify: X11_INFO("X11 event MotionNotify"); diff --git a/sources/ewol/context/clipBoard.cpp b/sources/ewol/context/clipBoard.cpp index 15b6582d..7808433c 100644 --- a/sources/ewol/context/clipBoard.cpp +++ b/sources/ewol/context/clipBoard.cpp @@ -41,7 +41,7 @@ static const char* clipboardDescriptionString[ewol::context::clipBoard::clipboar "clipboardCount" }; -etk::CCout& ewol::operator <<(etk::CCout& _os, const enum ewol::context::clipBoard::clipboardListe _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const enum ewol::context::clipBoard::clipboardListe _obj) { if (_obj >= 0 && _obj -#include // TODO : Remove this ... ==> set it in the context .... namespace ewol { @@ -77,7 +76,7 @@ namespace ewol { /** * @brief Debug operator To display the curent element in a Human redeable information */ - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::context::clipBoard::clipboardListe _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::context::clipBoard::clipboardListe _obj); }; #endif diff --git a/sources/ewol/context/commandLine.h b/sources/ewol/context/commandLine.h index 2ddc3c8d..2f6e8659 100644 --- a/sources/ewol/context/commandLine.h +++ b/sources/ewol/context/commandLine.h @@ -9,8 +9,7 @@ #ifndef __EWOL_COMMAND_LINE_H__ #define __EWOL_COMMAND_LINE_H__ -#include -#include +#include namespace ewol { namespace context { diff --git a/sources/ewol/context/cursor.cpp b/sources/ewol/context/cursor.cpp index 721b9269..1aac67e7 100644 --- a/sources/ewol/context/cursor.cpp +++ b/sources/ewol/context/cursor.cpp @@ -33,7 +33,7 @@ static const char* cursorDescriptionString[ewol::context::cursorCount+1] = { "cursorCount" }; -etk::CCout& ewol::operator <<(etk::CCout& _os, const enum ewol::context::cursorDisplay _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const enum ewol::context::cursorDisplay _obj) { if (_obj >= 0 && _obj -#include +#include + namespace ewol { namespace context { enum cursorDisplay { @@ -42,7 +42,7 @@ namespace ewol { /** * @brief Debug operator To display the curent element in a Human readable information */ - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::context::cursorDisplay _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::context::cursorDisplay _obj); }; #endif diff --git a/sources/ewol/debug.cpp b/sources/ewol/debug.cpp index bb4bcf6f..8651d7eb 100644 --- a/sources/ewol/debug.cpp +++ b/sources/ewol/debug.cpp @@ -8,4 +8,7 @@ #include -const char * g_ewolLibName = "ewol "; +int32_t ewol::getLogId(void) { + static int32_t g_val = etk::log::registerInstance("ewol"); + return g_val; +} diff --git a/sources/ewol/debug.h b/sources/ewol/debug.h index e1c8eeac..242bdc91 100644 --- a/sources/ewol/debug.h +++ b/sources/ewol/debug.h @@ -9,20 +9,44 @@ #ifndef __EWOL_DEBUG_H__ #define __EWOL_DEBUG_H__ -#include -#include +#include -extern const char * g_ewolLibName; +namespace ewol { + int32_t getLogId(void); +}; +// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" +#define EWOL_BASE(info,data) \ + do { \ + if (info <= etk::log::getLevel(ewol::getLogId())) { \ + std::stringbuf sb; \ + std::ostream tmpStream(&sb); \ + tmpStream << data; \ + etk::log::logStream(ewol::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ + } \ + } while(0) -#define EWOL_CRITICAL(data) ETK_CRITICAL(g_ewolLibName, data) -#define EWOL_WARNING(data) ETK_WARNING(g_ewolLibName, data) -#define EWOL_ERROR(data) ETK_ERROR(g_ewolLibName, data) -#define EWOL_INFO(data) ETK_INFO(g_ewolLibName, data) -#define EWOL_DEBUG(data) ETK_DEBUG(g_ewolLibName, data) -#define EWOL_VERBOSE(data) ETK_VERBOSE(g_ewolLibName, data) -#define EWOL_ASSERT(cond, data) ETK_ASSERT(g_ewolLibName, cond, data) -#define EWOL_CHECK_INOUT(cond) ETK_CHECK_INOUT(g_ewolLibName, cond) -#define EWOL_TODO(cond) ETK_TODO(g_ewolLibName, cond) +#define EWOL_CRITICAL(data) EWOL_BASE(1, data) +#define EWOL_ERROR(data) EWOL_BASE(2, data) +#define EWOL_WARNING(data) EWOL_BASE(3, data) +#ifdef DEBUG + #define EWOL_INFO(data) EWOL_BASE(4, data) + #define EWOL_DEBUG(data) EWOL_BASE(5, data) + #define EWOL_VERBOSE(data) EWOL_BASE(6, data) + #define EWOL_TODO(data) EWOL_BASE(4, "TODO : " << data) +#else + #define EWOL_INFO(data) do { } while(false) + #define EWOL_DEBUG(data) do { } while(false) + #define EWOL_VERBOSE(data) do { } while(false) + #define EWOL_TODO(data) do { } while(false) +#endif + +#define EWOL_ASSERT(cond,data) \ + do { \ + if (!(cond)) { \ + EWOL_CRITICAL(data); \ + assert(!#cond); \ + } \ + } while (0) #endif diff --git a/sources/ewol/event/Entry.cpp b/sources/ewol/event/Entry.cpp index 4a163163..e8236b88 100644 --- a/sources/ewol/event/Entry.cpp +++ b/sources/ewol/event/Entry.cpp @@ -11,7 +11,7 @@ #undef __class__ #define __class__ "event::Entry" -etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::Entry& _obj) { +std::ostream& ewol::event::operator <<(std::ostream& _os, const ewol::event::Entry& _obj) { _os << "{type=" << _obj.getType(); _os << " status=" << _obj.getStatus(); if (_obj.getType() == ewol::key::keyboardChar) { @@ -21,7 +21,7 @@ etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::Entry& return _os; } -etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::EntrySystem& _obj) { +std::ostream& ewol::event::operator <<(std::ostream& _os, const ewol::event::EntrySystem& _obj) { _os << _obj.m_event; return _os; } diff --git a/sources/ewol/event/Entry.h b/sources/ewol/event/Entry.h index 462c3fc2..50188c05 100644 --- a/sources/ewol/event/Entry.h +++ b/sources/ewol/event/Entry.h @@ -56,7 +56,7 @@ namespace ewol { return m_unicodeData; }; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::event::Entry& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::event::Entry& _obj); class EntrySystem { public: @@ -69,7 +69,7 @@ namespace ewol { }; ewol::event::Entry m_event; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::event::EntrySystem& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::event::EntrySystem& _obj); }; }; diff --git a/sources/ewol/event/Input.cpp b/sources/ewol/event/Input.cpp index dd02bf10..f1bf0508 100644 --- a/sources/ewol/event/Input.cpp +++ b/sources/ewol/event/Input.cpp @@ -11,7 +11,7 @@ #undef __class__ #define __class__ "event::Input" -etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::Input& _obj) { +std::ostream& ewol::event::operator <<(std::ostream& _os, const ewol::event::Input& _obj) { _os << "{type=" << _obj.getType(); _os << " status=" << _obj.getStatus(); _os << " id=" << _obj.getId(); @@ -20,7 +20,7 @@ etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::Input& return _os; } -etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::InputSystem& _obj) { +std::ostream& ewol::event::operator <<(std::ostream& _os, const ewol::event::InputSystem& _obj) { _os << _obj.m_event; return _os; } diff --git a/sources/ewol/event/Input.h b/sources/ewol/event/Input.h index 494f3de6..e3acdc0e 100644 --- a/sources/ewol/event/Input.h +++ b/sources/ewol/event/Input.h @@ -70,7 +70,7 @@ namespace ewol { // TODO : Call the entry element ant rest it ... } }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::event::Input& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::event::Input& _obj); class InputSystem { public: @@ -102,7 +102,7 @@ namespace ewol { return m_realIdEvent; }; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::event::InputSystem& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::event::InputSystem& _obj); }; }; diff --git a/sources/ewol/event/Time.cpp b/sources/ewol/event/Time.cpp index ea8e2d3d..0d4d7833 100644 --- a/sources/ewol/event/Time.cpp +++ b/sources/ewol/event/Time.cpp @@ -11,7 +11,7 @@ #undef __class__ #define __class__ "event::Time" -etk::CCout& ewol::event::operator <<(etk::CCout& _os, const ewol::event::Time& _obj) { +std::ostream& ewol::event::operator <<(std::ostream& _os, const ewol::event::Time& _obj) { _os << "{time=" << _obj.getTime(); _os << " uptime=" << _obj.getApplUpTime(); _os << " delta=" << _obj.getDelta(); diff --git a/sources/ewol/event/Time.h b/sources/ewol/event/Time.h index 9c1d3c14..7e5cb31c 100644 --- a/sources/ewol/event/Time.h +++ b/sources/ewol/event/Time.h @@ -59,7 +59,7 @@ namespace ewol { return m_timeDeltaCall; }; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::event::Time& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::event::Time& _obj); }; }; diff --git a/sources/ewol/key/Special.cpp b/sources/ewol/key/Special.cpp index a6465e3e..6f4977ed 100644 --- a/sources/ewol/key/Special.cpp +++ b/sources/ewol/key/Special.cpp @@ -201,7 +201,7 @@ void ewol::key::Special::setInsert(bool _value) { } } -etk::CCout& ewol::key::operator <<(etk::CCout& _os, const ewol::key::Special _obj) { +std::ostream& ewol::key::operator <<(std::ostream& _os, const ewol::key::Special _obj) { _os << " capLock=" << _obj.getCapsLock(); _os << " shift=" << _obj.getShift(); _os << " ctrl=" << _obj.getCtrl(); diff --git a/sources/ewol/key/Special.h b/sources/ewol/key/Special.h index efe453df..fab8a9fd 100644 --- a/sources/ewol/key/Special.h +++ b/sources/ewol/key/Special.h @@ -9,8 +9,7 @@ #ifndef __EWOL_KEY_SPECIAL_H__ #define __EWOL_KEY_SPECIAL_H__ -#include -#include +#include #include namespace ewol { @@ -113,7 +112,7 @@ namespace ewol { */ void update(enum ewol::key::keyboard _move, bool _isDown); }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::key::Special _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::key::Special _obj); }; }; diff --git a/sources/ewol/key/keyboard.cpp b/sources/ewol/key/keyboard.cpp index 2f5ed961..be51c89e 100644 --- a/sources/ewol/key/keyboard.cpp +++ b/sources/ewol/key/keyboard.cpp @@ -49,7 +49,7 @@ static const char* keyboardDescriptionString[ewol::key::keyboardCount+1] = { "keyboardCount" }; -etk::CCout& ewol::key::operator <<(etk::CCout& _os, const enum ewol::key::keyboard _obj) { +std::ostream& ewol::key::operator <<(std::ostream& _os, const enum ewol::key::keyboard _obj) { if (_obj >= 0 && _obj = 0 && _obj -#include +#include namespace ewol { namespace key { @@ -61,7 +60,7 @@ namespace ewol { /** * @brief Debug operator To display the curent element in a Human redeable information */ - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::key::keyboard _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::key::keyboard _obj); enum keyboardSystem { keyboardSystemUnknow = 0, //!< Unknown keyboard system key @@ -74,7 +73,7 @@ namespace ewol { keyboardSystemBack, //!< Hardware Back key keyboardSystemCount //!< number of posible System key }; - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::key::keyboardSystem _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::key::keyboardSystem _obj); }; }; diff --git a/sources/ewol/key/status.cpp b/sources/ewol/key/status.cpp index 46c37931..4c48c4c5 100644 --- a/sources/ewol/key/status.cpp +++ b/sources/ewol/key/status.cpp @@ -26,7 +26,7 @@ static const char* statusDescriptionString[ewol::key::statusCount+1] = { "statusCount" }; -etk::CCout& ewol::key::operator <<(etk::CCout& _os, const enum ewol::key::status _obj) { +std::ostream& ewol::key::operator <<(std::ostream& _os, const enum ewol::key::status _obj) { if (_obj >= 0 && _obj -#include +#include namespace ewol { namespace key { @@ -37,7 +36,7 @@ namespace ewol { /** * @brief Debug operator To display the curent element in a Human redeable information */ - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::key::status _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::key::status _obj); }; }; diff --git a/sources/ewol/key/type.cpp b/sources/ewol/key/type.cpp index 15e2ab9f..c4340524 100644 --- a/sources/ewol/key/type.cpp +++ b/sources/ewol/key/type.cpp @@ -17,7 +17,7 @@ static const char* typeDescriptionString[ewol::key::typeCount+1] = { "typeCount" }; -etk::CCout& ewol::operator <<(etk::CCout& _os, const enum ewol::key::type _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const enum ewol::key::type _obj) { if (_obj >= 0 && _obj < ewol::key::typeCount) { _os << typeDescriptionString[_obj]; } else { diff --git a/sources/ewol/key/type.h b/sources/ewol/key/type.h index 9007ea20..e82c0665 100644 --- a/sources/ewol/key/type.h +++ b/sources/ewol/key/type.h @@ -9,8 +9,7 @@ #ifndef __EWOL_KEY_TYPE_H__ #define __EWOL_KEY_TYPE_H__ -#include -#include +#include namespace ewol { namespace key { @@ -28,7 +27,7 @@ namespace ewol { /** * @brief Debug operator To display the curent element in a Human redeable information */ - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::key::type _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::key::type _obj); }; diff --git a/sources/ewol/object/Config.cpp b/sources/ewol/object/Config.cpp index b68fc00e..065cfc20 100644 --- a/sources/ewol/object/Config.cpp +++ b/sources/ewol/object/Config.cpp @@ -13,7 +13,7 @@ #undef __class__ #define __class__ "object::Config" -etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::object::Config& _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const ewol::object::Config& _obj) { _os << "{"; _os << "config=\"" << _obj.getConfig() << "\""; _os << " data=\"" << _obj.getData() << "\"}"; diff --git a/sources/ewol/object/Config.h b/sources/ewol/object/Config.h index 4cffe5d5..1ba02116 100644 --- a/sources/ewol/object/Config.h +++ b/sources/ewol/object/Config.h @@ -9,8 +9,7 @@ #ifndef __EWOL_OBJECT_CONFIG_H__ #define __EWOL_OBJECT_CONFIG_H__ -#include -#include +#include namespace ewol { namespace object { @@ -39,7 +38,7 @@ namespace ewol { }; }; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::object::Config& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::object::Config& _obj); }; diff --git a/sources/ewol/object/ConfigElement.cpp b/sources/ewol/object/ConfigElement.cpp index 5a4ede8b..783cbebc 100644 --- a/sources/ewol/object/ConfigElement.cpp +++ b/sources/ewol/object/ConfigElement.cpp @@ -11,7 +11,7 @@ #undef __class__ #define __class__ "object::ConfigElement" -etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::object::ConfigElement& _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const ewol::object::ConfigElement& _obj) { _os << "{"; if (NULL != _obj.getConfig()) { _os << "config=\"" << _obj.getConfig() << "\""; diff --git a/sources/ewol/object/ConfigElement.h b/sources/ewol/object/ConfigElement.h index cb2303c6..2d00995d 100644 --- a/sources/ewol/object/ConfigElement.h +++ b/sources/ewol/object/ConfigElement.h @@ -9,8 +9,7 @@ #ifndef __EWOL_OBJECT_CONFIG_ELEMENT_H__ #define __EWOL_OBJECT_CONFIG_ELEMENT_H__ -#include -#include +#include namespace ewol { namespace object { @@ -52,7 +51,7 @@ namespace ewol { }; }; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::object::ConfigElement& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::object::ConfigElement& _obj); }; diff --git a/sources/ewol/object/Message.cpp b/sources/ewol/object/Message.cpp index 49032cce..8481598f 100644 --- a/sources/ewol/object/Message.cpp +++ b/sources/ewol/object/Message.cpp @@ -11,7 +11,7 @@ #undef __class__ #define __class__ "object/Message" -etk::CCout& ewol::object::operator <<(etk::CCout& _os, const ewol::object::Message& _obj) { +std::ostream& ewol::object::operator <<(std::ostream& _os, const ewol::object::Message& _obj) { _os << "{"; if (NULL != _obj.getMessage()) { _os << "msg=\"" << _obj.getMessage() << "\""; diff --git a/sources/ewol/object/Message.h b/sources/ewol/object/Message.h index 30c5a9b2..a8a2674d 100644 --- a/sources/ewol/object/Message.h +++ b/sources/ewol/object/Message.h @@ -9,8 +9,7 @@ #ifndef __EWOL_OBJECT_MESSAGE_H__ #define __EWOL_OBJECT_MESSAGE_H__ -#include -#include +#include namespace ewol { namespace object { @@ -47,7 +46,7 @@ namespace ewol { return m_data; }; }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::object::Message& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::object::Message& _obj); }; }; diff --git a/sources/ewol/openGL/openGL.cpp b/sources/ewol/openGL/openGL.cpp index ab67ea45..73280c48 100644 --- a/sources/ewol/openGL/openGL.cpp +++ b/sources/ewol/openGL/openGL.cpp @@ -9,6 +9,7 @@ #include #include #include +#include /** * @brief get the draw mutex (ewol render). diff --git a/sources/ewol/resource/TexturedFont.cpp b/sources/ewol/resource/TexturedFont.cpp index da4e088b..2926c2f1 100644 --- a/sources/ewol/resource/TexturedFont.cpp +++ b/sources/ewol/resource/TexturedFont.cpp @@ -18,7 +18,7 @@ #include -etk::CCout& ewol::operator <<(etk::CCout& _os, enum ewol::font::mode _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, enum ewol::font::mode _obj) { switch(_obj) { default : _os << "error"; @@ -344,7 +344,7 @@ ewol::GlyphProperty* ewol::resource::TexturedFont::getGlyphPointer(const char32_ } ewol::resource::TexturedFont* ewol::resource::TexturedFont::keep(const std::string& _filename) { - EWOL_INFO("KEEP : TexturedFont : file : '" << _filename << "'"); + EWOL_VERBOSE("KEEP : TexturedFont : file : '" << _filename << "'"); ewol::resource::TexturedFont* object = NULL; ewol::Resource* object2 = getManager().localKeep(_filename); if (NULL != object2) { @@ -372,7 +372,7 @@ void ewol::resource::TexturedFont::release(ewol::resource::TexturedFont*& _objec if (NULL == _object) { return; } - EWOL_INFO("RELEASE: TexturedFont : file : '" << _object->getName() << "' count=" << _object->getCounter()); + EWOL_VERBOSE("RELEASE: TexturedFont : file : '" << _object->getName() << "' count=" << _object->getCounter()); std::string name = _object->getName(); int32_t count = _object->getCounter() - 1; ewol::Resource* object2 = static_cast(_object); diff --git a/sources/ewol/resource/TexturedFont.h b/sources/ewol/resource/TexturedFont.h index 6da58dc4..dc163133 100644 --- a/sources/ewol/resource/TexturedFont.h +++ b/sources/ewol/resource/TexturedFont.h @@ -25,7 +25,7 @@ namespace ewol { BoldItalic, }; }; - etk::CCout& operator <<(etk::CCout& _os, enum ewol::font::mode _obj); + std::ostream& operator <<(std::ostream& _os, enum ewol::font::mode _obj); namespace resource { class TexturedFont : public ewol::resource::Texture { diff --git a/sources/ewol/widget/WSlider.cpp b/sources/ewol/widget/WSlider.cpp index f4098e2f..c44ca249 100644 --- a/sources/ewol/widget/WSlider.cpp +++ b/sources/ewol/widget/WSlider.cpp @@ -15,7 +15,7 @@ static const char* l_listsladingMode[ewol::widget::WSlider::sladingTransition_co "transition horisantal" }; -etk::CCout& operator <<(etk::CCout& _os, const enum ewol::widget::WSlider::sladingMode _obj) { +std::ostream& operator <<(std::ostream& _os, const enum ewol::widget::WSlider::sladingMode _obj) { _os << l_listsladingMode[_obj]; return _os; } diff --git a/sources/ewol/widget/WSlider.h b/sources/ewol/widget/WSlider.h index d81daa08..e14e738c 100644 --- a/sources/ewol/widget/WSlider.h +++ b/sources/ewol/widget/WSlider.h @@ -106,7 +106,7 @@ namespace ewol { virtual bool onGetConfig(const char* _config, std::string& _result) const; }; }; - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::widget::WSlider::sladingMode _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::widget::WSlider::sladingMode _obj); }; #endif diff --git a/sources/ewol/widget/Widget.cpp b/sources/ewol/widget/Widget.cpp index 38ee49b4..25425d98 100644 --- a/sources/ewol/widget/Widget.cpp +++ b/sources/ewol/widget/Widget.cpp @@ -16,7 +16,7 @@ #undef __class__ #define __class__ "DrawProperty" -etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::DrawProperty& _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const ewol::DrawProperty& _obj) { _os << "{ windowsSize=" << _obj.m_windowsSize << " start=" << _obj.m_origin << " stop=" << (_obj.m_origin+_obj.m_size) << "}"; return _os; } @@ -78,7 +78,7 @@ enum ewol::gravity ewol::stringToGravity(const std::string& _obj) { return ewol::gravityCenter; } -etk::CCout& ewol::operator <<(etk::CCout& _os, const enum ewol::gravity _obj) { +std::ostream& ewol::operator <<(std::ostream& _os, const enum ewol::gravity _obj) { _os << ewol::gravityToString(_obj); return _os; } diff --git a/sources/ewol/widget/Widget.h b/sources/ewol/widget/Widget.h index de25c634..2f2c86fc 100644 --- a/sources/ewol/widget/Widget.h +++ b/sources/ewol/widget/Widget.h @@ -67,7 +67,7 @@ namespace ewol { ivec2 m_size; //!< Windows clipping upper widget (can not be <0 and >m_windowsSize) void limit(const vec2& _origin, const vec2& _size); }; - etk::CCout& operator <<(etk::CCout& _os, const ewol::DrawProperty& _obj); + std::ostream& operator <<(std::ostream& _os, const ewol::DrawProperty& _obj); /** * @brief Gravity of the widget property * @not-in-doc @@ -83,7 +83,7 @@ namespace ewol { gravityButtomLeft=0x0C, gravityLeft=0x08, }; - etk::CCout& operator <<(etk::CCout& _os, const enum ewol::gravity _obj); + std::ostream& operator <<(std::ostream& _os, const enum ewol::gravity _obj); std::string gravityToString(const enum ewol::gravity _obj); enum ewol::gravity stringToGravity(const std::string& _obj); /**