[DEV] add autobinding of CPP11 and Boost for CPP03
This commit is contained in:
parent
ea899a1ed1
commit
025b59a8c7
1
binding_X11/etk/chrono.h
Normal file
1
binding_X11/etk/chrono.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include <chrono>
|
1
binding_X11/etk/condition_variable.h
Normal file
1
binding_X11/etk/condition_variable.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include <condition_variable>
|
1
binding_X11/etk/functional.h
Normal file
1
binding_X11/etk/functional.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include <functional>
|
1
binding_X11/etk/memory.h
Normal file
1
binding_X11/etk/memory.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include <memory>
|
2
binding_X11/etk/mutex.h
Normal file
2
binding_X11/etk/mutex.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
#include <mutex>
|
1
binding_X11/etk/thread.h
Normal file
1
binding_X11/etk/thread.h
Normal file
@ -0,0 +1 @@
|
|||||||
|
#include <thread>
|
18
etk/log.cpp
18
etk/log.cpp
@ -8,12 +8,8 @@
|
|||||||
|
|
||||||
#include <etk/log.h>
|
#include <etk/log.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#if __cplusplus >= 201103L
|
#include <etk/mutex.h>
|
||||||
#include <mutex>
|
#include <etk/thread.h>
|
||||||
#include <thread>
|
|
||||||
#else
|
|
||||||
#include <etk/mutex.h>
|
|
||||||
#endif
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
@ -228,7 +224,7 @@ static std::map<uint32_t, std::string>& getThreadList() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string etk::log::getThreadName() {
|
std::string etk::log::getThreadName() {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::map<uint32_t,std::string>& list = getThreadList();
|
std::map<uint32_t,std::string>& list = getThreadList();
|
||||||
uint32_t threadID = getThreadID();
|
uint32_t threadID = getThreadID();
|
||||||
std::string out;
|
std::string out;
|
||||||
@ -246,11 +242,11 @@ std::string etk::log::getThreadName() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void etk::log::setThreadName(const std::string& _name) {
|
void etk::log::setThreadName(const std::string& _name) {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::map<uint32_t,std::string>& list = getThreadList();
|
std::map<uint32_t,std::string>& list = getThreadList();
|
||||||
uint32_t threadID = getThreadID();
|
uint32_t threadID = getThreadID();
|
||||||
static std11::mutex g_lock;
|
static std11::mutex g_lock;
|
||||||
g_lock.lock();-Wc++0x-compat
|
g_lock.lock();
|
||||||
auto it = list.find(threadID);
|
auto it = list.find(threadID);
|
||||||
if (it == list.end()) {
|
if (it == list.end()) {
|
||||||
list.insert(std::pair<uint32_t, std::string>(threadID,_name));
|
list.insert(std::pair<uint32_t, std::string>(threadID,_name));
|
||||||
@ -262,7 +258,7 @@ void etk::log::setThreadName(const std::string& _name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t etk::log::getThreadID() {
|
uint32_t etk::log::getThreadID() {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint32_t out = 0;
|
uint32_t out = 0;
|
||||||
std::thread::id this_id = std::this_thread::get_id();
|
std::thread::id this_id = std::this_thread::get_id();
|
||||||
uint64_t iddd = std::hash<std::thread::id>()(this_id);
|
uint64_t iddd = std::hash<std::thread::id>()(this_id);
|
||||||
@ -407,7 +403,7 @@ void etk::log::logChar(int32_t _id, int32_t _level, int32_t _ligne, const char*
|
|||||||
*pointer++ = ' ';
|
*pointer++ = ' ';
|
||||||
*pointer = '\0';
|
*pointer = '\0';
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
if(getThreadId() == true) {
|
if(getThreadId() == true) {
|
||||||
// display thread ID
|
// display thread ID
|
||||||
uint32_t iddd = etk::log::getThreadID();
|
uint32_t iddd = etk::log::getThreadID();
|
||||||
|
@ -118,7 +118,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<bool>::operator std::u32string() const {
|
template<> Vector2D<bool>::operator std::u32string() const {
|
||||||
std::u32string str;
|
std::u32string str;
|
||||||
str = U"(";
|
str = U"(";
|
||||||
@ -154,7 +154,7 @@ namespace etk {
|
|||||||
}
|
}
|
||||||
TK_VERBOSE("Parse : '" << _str << "' ==> " << *this);
|
TK_VERBOSE("Parse : '" << _str << "' ==> " << *this);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<bool>::Vector2D(const std::u32string& _str) {
|
template<> Vector2D<bool>::Vector2D(const std::u32string& _str) {
|
||||||
m_floats[0] = false;
|
m_floats[0] = false;
|
||||||
m_floats[1] = false;
|
m_floats[1] = false;
|
||||||
@ -190,7 +190,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<int32_t>::operator std::u32string() const {
|
template<> Vector2D<int32_t>::operator std::u32string() const {
|
||||||
std::u32string str;
|
std::u32string str;
|
||||||
str = U"(";
|
str = U"(";
|
||||||
@ -227,7 +227,7 @@ namespace etk {
|
|||||||
}
|
}
|
||||||
TK_VERBOSE("Parse : \"" << _str << "\" ==> " << *this);
|
TK_VERBOSE("Parse : \"" << _str << "\" ==> " << *this);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<int32_t>::Vector2D(const std::u32string& _str) {
|
template<> Vector2D<int32_t>::Vector2D(const std::u32string& _str) {
|
||||||
m_floats[0] = 0;
|
m_floats[0] = 0;
|
||||||
m_floats[1] = 0;
|
m_floats[1] = 0;
|
||||||
@ -264,7 +264,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<uint32_t>::operator std::u32string() const {
|
template<> Vector2D<uint32_t>::operator std::u32string() const {
|
||||||
std::u32string str;
|
std::u32string str;
|
||||||
str = U"(";
|
str = U"(";
|
||||||
@ -300,7 +300,7 @@ namespace etk {
|
|||||||
}
|
}
|
||||||
TK_VERBOSE("Parse : \"" << _str << "\" ==> " << *this);
|
TK_VERBOSE("Parse : \"" << _str << "\" ==> " << *this);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<uint32_t>::Vector2D(const std::u32string& _str) {
|
template<> Vector2D<uint32_t>::Vector2D(const std::u32string& _str) {
|
||||||
m_floats[0] = 0;
|
m_floats[0] = 0;
|
||||||
m_floats[1] = 0;
|
m_floats[1] = 0;
|
||||||
@ -336,7 +336,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<float>::operator std::u32string() const {
|
template<> Vector2D<float>::operator std::u32string() const {
|
||||||
std::u32string str;
|
std::u32string str;
|
||||||
str = U"(";
|
str = U"(";
|
||||||
@ -372,7 +372,7 @@ namespace etk {
|
|||||||
}
|
}
|
||||||
TK_VERBOSE("Parse : \"" << _str << "\" ==> " << *this);
|
TK_VERBOSE("Parse : \"" << _str << "\" ==> " << *this);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> Vector2D<float>::Vector2D(const std::u32string& _str) {
|
template<> Vector2D<float>::Vector2D(const std::u32string& _str) {
|
||||||
m_floats[0] = 0;
|
m_floats[0] = 0;
|
||||||
m_floats[1] = 0;
|
m_floats[1] = 0;
|
||||||
@ -408,7 +408,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<vec2>(const vec2& _obj) {
|
template<> std::u32string to_u32string<vec2>(const vec2& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<ivec2>(const ivec2& _obj) {
|
template<> std::u32string to_u32string<ivec2>(const ivec2& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -438,7 +438,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<uivec2>(const uivec2& _obj) {
|
template<> std::u32string to_u32string<uivec2>(const uivec2& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -453,7 +453,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<bvec2>(const bvec2& _obj) {
|
template<> std::u32string to_u32string<bvec2>(const bvec2& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -463,7 +463,7 @@ namespace etk {
|
|||||||
_variableRet = vec2(_value);
|
_variableRet = vec2(_value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<vec2>(vec2& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<vec2>(vec2& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
@ -473,7 +473,7 @@ namespace etk {
|
|||||||
_variableRet = ivec2(_value);
|
_variableRet = ivec2(_value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<ivec2>(ivec2& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<ivec2>(ivec2& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
@ -483,7 +483,7 @@ namespace etk {
|
|||||||
_variableRet = uivec2(_value);
|
_variableRet = uivec2(_value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<uivec2>(uivec2& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<uivec2>(uivec2& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
@ -493,7 +493,7 @@ namespace etk {
|
|||||||
_variableRet = bvec2(_value);
|
_variableRet = bvec2(_value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<bvec2>(bvec2& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<bvec2>(bvec2& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ namespace etk {
|
|||||||
m_floats[1] = (T)_obj.y();
|
m_floats[1] = (T)_obj.y();
|
||||||
};
|
};
|
||||||
Vector2D(const std::string& _str);
|
Vector2D(const std::string& _str);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
Vector2D(const std::u32string& _str);
|
Vector2D(const std::u32string& _str);
|
||||||
#endif
|
#endif
|
||||||
~Vector2D() { };
|
~Vector2D() { };
|
||||||
@ -373,7 +373,7 @@ namespace etk {
|
|||||||
}
|
}
|
||||||
//!< string cast :
|
//!< string cast :
|
||||||
operator std::string() const;
|
operator std::string() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
operator std::u32string() const;
|
operator std::u32string() const;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -124,7 +124,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<vec3>(const vec3& _obj) {
|
template<> std::u32string to_u32string<vec3>(const vec3& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<ivec3>(const ivec3& _obj) {
|
template<> std::u32string to_u32string<ivec3>(const ivec3& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<uivec3>(const uivec3& _obj) {
|
template<> std::u32string to_u32string<uivec3>(const uivec3& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ namespace etk {
|
|||||||
str += ")";
|
str += ")";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::u32string to_u32string<bvec3>(const bvec3& _obj) {
|
template<> std::u32string to_u32string<bvec3>(const bvec3& _obj) {
|
||||||
return etk::to_u32string(etk::to_string(_obj));
|
return etk::to_u32string(etk::to_string(_obj));
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@ namespace etk {
|
|||||||
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<vec3>(vec3& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<vec3>(vec3& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
@ -265,7 +265,7 @@ namespace etk {
|
|||||||
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<ivec3>(ivec3& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<ivec3>(ivec3& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
@ -310,7 +310,7 @@ namespace etk {
|
|||||||
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<uivec3>(uivec3& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<uivec3>(uivec3& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ namespace etk {
|
|||||||
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
TK_VERBOSE("Parse : '" << _value << "' ==> " << _variableRet);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<bvec3>(bvec3& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<bvec3>(bvec3& _variableRet, const std::u32string& _value) {
|
||||||
return from_string(_variableRet, etk::to_string(_value));
|
return from_string(_variableRet, etk::to_string(_value));
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ namespace etk {
|
|||||||
#ifdef ETK_BUILD_LINEARMATH
|
#ifdef ETK_BUILD_LINEARMATH
|
||||||
return btSqrt(length2());
|
return btSqrt(length2());
|
||||||
#else
|
#else
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
return std::sqrt(length2());
|
return std::sqrt(length2());
|
||||||
#else
|
#else
|
||||||
return sqrt(length2());
|
return sqrt(length2());
|
||||||
|
@ -276,7 +276,7 @@ std::string getApplicationPath() {
|
|||||||
TK_INFO("Binary name : " << binaryName);
|
TK_INFO("Binary name : " << binaryName);
|
||||||
return binaryName;
|
return binaryName;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUApplicationPath() {
|
std::u32string getUApplicationPath() {
|
||||||
return etk::to_u32string(getApplicationPath());
|
return etk::to_u32string(getApplicationPath());
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ void etk::initDefaultFolder(const char* _applName) {
|
|||||||
std::string etk::getUserHomeFolder() {
|
std::string etk::getUserHomeFolder() {
|
||||||
return baseFolderHome;
|
return baseFolderHome;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::getUUserHomeFolder() {
|
std::u32string etk::getUUserHomeFolder() {
|
||||||
return etk::to_u32string(baseFolderHome);
|
return etk::to_u32string(baseFolderHome);
|
||||||
}
|
}
|
||||||
@ -399,7 +399,7 @@ std::string etk::getUserHomeFolder() {
|
|||||||
std::string etk::getUserRunFolder() {
|
std::string etk::getUserRunFolder() {
|
||||||
return baseRunPath;
|
return baseRunPath;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::getUUserRunFolder() {
|
std::u32string etk::getUUserRunFolder() {
|
||||||
return etk::to_u32string(baseRunPath);
|
return etk::to_u32string(baseRunPath);
|
||||||
}
|
}
|
||||||
@ -490,7 +490,7 @@ etk::FSNode::FSNode(const std::string& _nodeName) :
|
|||||||
{
|
{
|
||||||
privateSetName(_nodeName);
|
privateSetName(_nodeName);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
etk::FSNode::FSNode(const std::u32string& _nodeName) :
|
etk::FSNode::FSNode(const std::u32string& _nodeName) :
|
||||||
m_userFileName(""),
|
m_userFileName(""),
|
||||||
m_type(etk::FSN_TYPE_UNKNOW),
|
m_type(etk::FSN_TYPE_UNKNOW),
|
||||||
@ -709,7 +709,7 @@ void etk::FSNode::privateSetName(const std::string& _newName) {
|
|||||||
updateFileSystemProperty();
|
updateFileSystemProperty();
|
||||||
TK_DBG_MODE("6 : type : [" << m_typeNode << "] right :" << m_rights);
|
TK_DBG_MODE("6 : type : [" << m_typeNode << "] right :" << m_rights);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::FSNode::privateSetName(const std::u32string& _newName) {
|
void etk::FSNode::privateSetName(const std::u32string& _newName) {
|
||||||
privateSetName(etk::to_string(_newName));
|
privateSetName(etk::to_string(_newName));
|
||||||
}
|
}
|
||||||
@ -732,7 +732,7 @@ bool directCheckFile(std::string _tmpFileNameDirect, bool _checkInAPKIfNeeded =
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool directCheckFile(std::u32string _tmpFileNameDirect, bool _checkInAPKIfNeeded = false) {
|
bool directCheckFile(std::u32string _tmpFileNameDirect, bool _checkInAPKIfNeeded = false) {
|
||||||
return directCheckFile(etk::to_string(_tmpFileNameDirect));
|
return directCheckFile(etk::to_string(_tmpFileNameDirect));
|
||||||
}
|
}
|
||||||
@ -927,7 +927,7 @@ bool etk::FSNode::setRight(etk::FSNodeRight _newRight) {
|
|||||||
void etk::FSNode::setName(const std::string& _newName) {
|
void etk::FSNode::setName(const std::string& _newName) {
|
||||||
privateSetName(_newName);
|
privateSetName(_newName);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::FSNode::setName(const std::u32string& _newName) {
|
void etk::FSNode::setName(const std::u32string& _newName) {
|
||||||
privateSetName(_newName);
|
privateSetName(_newName);
|
||||||
}
|
}
|
||||||
@ -940,7 +940,7 @@ std::string etk::FSNode::getNameFolder() const {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::getUNameFolder() const {
|
std::u32string etk::FSNode::getUNameFolder() const {
|
||||||
return etk::to_u32string(getNameFolder());
|
return etk::to_u32string(getNameFolder());
|
||||||
}
|
}
|
||||||
@ -949,7 +949,7 @@ std::string etk::FSNode::getNameFolder() const {
|
|||||||
std::string etk::FSNode::getFileSystemName() const {
|
std::string etk::FSNode::getFileSystemName() const {
|
||||||
return m_systemFileName;
|
return m_systemFileName;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::getUFileSystemName() const {
|
std::u32string etk::FSNode::getUFileSystemName() const {
|
||||||
return etk::to_u32string(getFileSystemName());
|
return etk::to_u32string(getFileSystemName());
|
||||||
}
|
}
|
||||||
@ -988,7 +988,7 @@ std::string etk::FSNode::getName() const {
|
|||||||
output += m_userFileName;
|
output += m_userFileName;
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::getUName() const {
|
std::u32string etk::FSNode::getUName() const {
|
||||||
return etk::to_u32string(getName());
|
return etk::to_u32string(getName());
|
||||||
}
|
}
|
||||||
@ -1001,7 +1001,7 @@ std::string etk::FSNode::getNameFile() const {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::getUNameFile() const {
|
std::u32string etk::FSNode::getUNameFile() const {
|
||||||
return etk::to_u32string(getNameFile());
|
return etk::to_u32string(getNameFile());
|
||||||
}
|
}
|
||||||
@ -1045,7 +1045,7 @@ std::string etk::FSNode::getRelativeFolder() const {
|
|||||||
TK_DBG_MODE(" ==> : ''" );
|
TK_DBG_MODE(" ==> : ''" );
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::getURelativeFolder() const {
|
std::u32string etk::FSNode::getURelativeFolder() const {
|
||||||
return etk::to_u32string(getRelativeFolder());
|
return etk::to_u32string(getRelativeFolder());
|
||||||
}
|
}
|
||||||
@ -1077,7 +1077,7 @@ bool etk::FSNode::move(const std::string& _path) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNode::move(const std::u32string& _path) {
|
bool etk::FSNode::move(const std::u32string& _path) {
|
||||||
return move(etk::to_string(_path));
|
return move(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -1114,7 +1114,7 @@ std::string etk::FSNode::timeCreatedString() const {
|
|||||||
}
|
}
|
||||||
return tmpTime;
|
return tmpTime;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::timeUCreatedString() const {
|
std::u32string etk::FSNode::timeUCreatedString() const {
|
||||||
return etk::to_u32string(timeCreatedString());
|
return etk::to_u32string(timeCreatedString());
|
||||||
}
|
}
|
||||||
@ -1132,7 +1132,7 @@ std::string etk::FSNode::timeModifiedString() const {
|
|||||||
}
|
}
|
||||||
return tmpTime;
|
return tmpTime;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::timeUModifiedString() const {
|
std::u32string etk::FSNode::timeUModifiedString() const {
|
||||||
return etk::to_u32string(timeModifiedString());
|
return etk::to_u32string(timeModifiedString());
|
||||||
}
|
}
|
||||||
@ -1150,7 +1150,7 @@ std::string etk::FSNode::timeAccessedString() const {
|
|||||||
}
|
}
|
||||||
return tmpTime;
|
return tmpTime;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::timeUAccessedString() const {
|
std::u32string etk::FSNode::timeUAccessedString() const {
|
||||||
return etk::to_u32string(timeAccessedString());
|
return etk::to_u32string(timeAccessedString());
|
||||||
}
|
}
|
||||||
@ -1468,7 +1468,7 @@ void etk::FSNode::folderGetRecursiveFiles(std::vector<std::string>& _output, boo
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::FSNode::folderGetRecursiveFiles(std::vector<std::u32string>& _output, bool _recursiveEnable) {
|
void etk::FSNode::folderGetRecursiveFiles(std::vector<std::u32string>& _output, bool _recursiveEnable) {
|
||||||
_output.clear();
|
_output.clear();
|
||||||
std::vector<std::string> tmpVal;
|
std::vector<std::string> tmpVal;
|
||||||
@ -1501,7 +1501,7 @@ std::string etk::FSNode::fileGetExtention() {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNode::fileUGetExtention() {
|
std::u32string etk::FSNode::fileUGetExtention() {
|
||||||
return etk::to_u32string(fileGetExtention());
|
return etk::to_u32string(fileGetExtention());
|
||||||
}
|
}
|
||||||
@ -1858,7 +1858,7 @@ static std::map<std::string, std::string> g_listTheme;
|
|||||||
|
|
||||||
void etk::theme::setName(const std::string& _refName, const std::string& _folderName) {
|
void etk::theme::setName(const std::string& _refName, const std::string& _folderName) {
|
||||||
TK_WARNING("Change theme : '" << _refName << "' : '" << _folderName << "'");
|
TK_WARNING("Change theme : '" << _refName << "' : '" << _folderName << "'");
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
auto it = g_listTheme.find(_refName);
|
auto it = g_listTheme.find(_refName);
|
||||||
#else
|
#else
|
||||||
std::map<std::string, std::string>::iterator it = g_listTheme.find(_refName);
|
std::map<std::string, std::string>::iterator it = g_listTheme.find(_refName);
|
||||||
@ -1869,14 +1869,14 @@ void etk::theme::setName(const std::string& _refName, const std::string& _folder
|
|||||||
}
|
}
|
||||||
g_listTheme.insert(std::pair<std::string,std::string>(_refName, _folderName));
|
g_listTheme.insert(std::pair<std::string,std::string>(_refName, _folderName));
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::theme::setName(const std::u32string& _refName, const std::u32string& _folderName) {
|
void etk::theme::setName(const std::u32string& _refName, const std::u32string& _folderName) {
|
||||||
setName(etk::to_string(_refName), etk::to_string(_folderName));
|
setName(etk::to_string(_refName), etk::to_string(_folderName));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string etk::theme::getName(const std::string& _refName) {
|
std::string etk::theme::getName(const std::string& _refName) {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
auto it = g_listTheme.find(_refName);
|
auto it = g_listTheme.find(_refName);
|
||||||
#else
|
#else
|
||||||
std::map<std::string, std::string>::iterator it = g_listTheme.find(_refName);
|
std::map<std::string, std::string>::iterator it = g_listTheme.find(_refName);
|
||||||
@ -1886,7 +1886,7 @@ std::string etk::theme::getName(const std::string& _refName) {
|
|||||||
}
|
}
|
||||||
return _refName;
|
return _refName;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::theme::getName(const std::u32string& _refName) {
|
std::u32string etk::theme::getName(const std::u32string& _refName) {
|
||||||
return etk::to_u32string(getName(etk::to_string(_refName)));
|
return etk::to_u32string(getName(etk::to_string(_refName)));
|
||||||
}
|
}
|
||||||
@ -1895,7 +1895,7 @@ std::string etk::theme::getName(const std::string& _refName) {
|
|||||||
// get the list of all the theme folder availlable in the user Home/appl
|
// get the list of all the theme folder availlable in the user Home/appl
|
||||||
std::vector<std::string> etk::theme::list() {
|
std::vector<std::string> etk::theme::list() {
|
||||||
std::vector<std::string> keys;
|
std::vector<std::string> keys;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
for (auto &it : g_listTheme) {
|
for (auto &it : g_listTheme) {
|
||||||
keys.push_back(it.first);
|
keys.push_back(it.first);
|
||||||
}
|
}
|
||||||
@ -1906,7 +1906,7 @@ std::vector<std::string> etk::theme::list() {
|
|||||||
#endif
|
#endif
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::vector<std::u32string> etk::theme::listU() {
|
std::vector<std::u32string> etk::theme::listU() {
|
||||||
std::vector<std::u32string> keys;
|
std::vector<std::u32string> keys;
|
||||||
for (auto &it : g_listTheme) {
|
for (auto &it : g_listTheme) {
|
||||||
@ -1918,7 +1918,7 @@ std::vector<std::string> etk::theme::list() {
|
|||||||
|
|
||||||
static std::map<std::string, std::string> g_listThemeDefault;
|
static std::map<std::string, std::string> g_listThemeDefault;
|
||||||
void etk::theme::setNameDefault(const std::string& _refName, const std::string& _folderName) {
|
void etk::theme::setNameDefault(const std::string& _refName, const std::string& _folderName) {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
auto it = g_listThemeDefault.find(_refName);
|
auto it = g_listThemeDefault.find(_refName);
|
||||||
#else
|
#else
|
||||||
std::map<std::string, std::string>::iterator it = g_listThemeDefault.find(_refName);
|
std::map<std::string, std::string>::iterator it = g_listThemeDefault.find(_refName);
|
||||||
@ -1929,14 +1929,14 @@ void etk::theme::setNameDefault(const std::string& _refName, const std::string&
|
|||||||
}
|
}
|
||||||
g_listThemeDefault.insert(std::pair<std::string,std::string>(_refName, _folderName));
|
g_listThemeDefault.insert(std::pair<std::string,std::string>(_refName, _folderName));
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::theme::setNameDefault(const std::u32string& _refName, const std::u32string& _folderName) {
|
void etk::theme::setNameDefault(const std::u32string& _refName, const std::u32string& _folderName) {
|
||||||
setNameDefault(etk::to_string(_refName), etk::to_string(_folderName));
|
setNameDefault(etk::to_string(_refName), etk::to_string(_folderName));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string etk::theme::getNameDefault(const std::string& _refName) {
|
std::string etk::theme::getNameDefault(const std::string& _refName) {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
auto it=g_listThemeDefault.find(_refName);
|
auto it=g_listThemeDefault.find(_refName);
|
||||||
#else
|
#else
|
||||||
std::map<std::string, std::string>::iterator it = g_listThemeDefault.find(_refName);
|
std::map<std::string, std::string>::iterator it = g_listThemeDefault.find(_refName);
|
||||||
@ -1946,7 +1946,7 @@ std::string etk::theme::getNameDefault(const std::string& _refName) {
|
|||||||
}
|
}
|
||||||
return "default";
|
return "default";
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::theme::getNameDefault(const std::u32string& _refName) {
|
std::u32string etk::theme::getNameDefault(const std::u32string& _refName) {
|
||||||
return etk::to_u32string(getNameDefault(etk::to_string(_refName)));
|
return etk::to_u32string(getNameDefault(etk::to_string(_refName)));
|
||||||
}
|
}
|
||||||
@ -1966,7 +1966,7 @@ bool etk::FSNodeRemove(const std::string& _path) {
|
|||||||
}
|
}
|
||||||
return tmpNode.remove();
|
return tmpNode.remove();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeRemove(const std::u32string& _path) {
|
bool etk::FSNodeRemove(const std::u32string& _path) {
|
||||||
return FSNodeRemove(etk::to_string(_path));
|
return FSNodeRemove(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -1979,7 +1979,7 @@ int64_t etk::FSNodeGetCount(const std::string& _path) {
|
|||||||
}
|
}
|
||||||
return tmpNode.folderCount();
|
return tmpNode.folderCount();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
int64_t etk::FSNodeGetCount(const std::u32string& _path) {
|
int64_t etk::FSNodeGetCount(const std::u32string& _path) {
|
||||||
return FSNodeGetCount(etk::to_string(_path));
|
return FSNodeGetCount(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -1989,7 +1989,7 @@ bool etk::FSNodeCreate(const std::string& _path, etk::FSNodeRight _right, enum e
|
|||||||
// TODO :
|
// TODO :
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeCreate(const std::u32string& _path, etk::FSNodeRight _right, enum etk::typeNode _type) {
|
bool etk::FSNodeCreate(const std::u32string& _path, etk::FSNodeRight _right, enum etk::typeNode _type) {
|
||||||
return FSNodeCreate(etk::to_string(_path), _right, _type);
|
return FSNodeCreate(etk::to_string(_path), _right, _type);
|
||||||
}
|
}
|
||||||
@ -1999,7 +1999,7 @@ bool etk::FSNodeExist(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.exist();
|
return tmpNode.exist();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeExist(const std::u32string& _path) {
|
bool etk::FSNodeExist(const std::u32string& _path) {
|
||||||
return FSNodeExist(etk::to_string(_path));
|
return FSNodeExist(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2016,7 +2016,7 @@ bool etk::FSNodeMove(const std::string& _path1, const std::string& _path2) {
|
|||||||
//move the node
|
//move the node
|
||||||
return tmpNode.move(_path2);
|
return tmpNode.move(_path2);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeMove(const std::u32string& _path1, const std::u32string& _path2) {
|
bool etk::FSNodeMove(const std::u32string& _path1, const std::u32string& _path2) {
|
||||||
return FSNodeMove(etk::to_string(_path1), etk::to_string(_path2));
|
return FSNodeMove(etk::to_string(_path1), etk::to_string(_path2));
|
||||||
}
|
}
|
||||||
@ -2026,7 +2026,7 @@ etk::FSNodeRight etk::FSNodeGetRight(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.getRight();
|
return tmpNode.getRight();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
etk::FSNodeRight etk::FSNodeGetRight(const std::u32string& _path) {
|
etk::FSNodeRight etk::FSNodeGetRight(const std::u32string& _path) {
|
||||||
return FSNodeGetRight(etk::to_string(_path));
|
return FSNodeGetRight(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2036,7 +2036,7 @@ enum etk::typeNode etk::FSNodeGetType(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.getNodeType();
|
return tmpNode.getNodeType();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
enum etk::typeNode etk::FSNodeGetType(const std::u32string& _path) {
|
enum etk::typeNode etk::FSNodeGetType(const std::u32string& _path) {
|
||||||
return FSNodeGetType(etk::to_string(_path));
|
return FSNodeGetType(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2046,7 +2046,7 @@ uint64_t etk::FSNodeGetTimeCreated(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.timeCreated();
|
return tmpNode.timeCreated();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t etk::FSNodeGetTimeCreated(const std::u32string& _path) {
|
uint64_t etk::FSNodeGetTimeCreated(const std::u32string& _path) {
|
||||||
return FSNodeGetTimeCreated(etk::to_string(_path));
|
return FSNodeGetTimeCreated(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2056,7 +2056,7 @@ uint64_t etk::FSNodeGetTimeModified(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.timeModified();
|
return tmpNode.timeModified();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t etk::FSNodeGetTimeModified(const std::u32string& _path) {
|
uint64_t etk::FSNodeGetTimeModified(const std::u32string& _path) {
|
||||||
return FSNodeGetTimeModified(etk::to_string(_path));
|
return FSNodeGetTimeModified(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2066,7 +2066,7 @@ uint64_t etk::FSNodeGetTimeAccessed(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.timeAccessed();
|
return tmpNode.timeAccessed();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t etk::FSNodeGetTimeAccessed(const std::u32string& _path) {
|
uint64_t etk::FSNodeGetTimeAccessed(const std::u32string& _path) {
|
||||||
return FSNodeGetTimeAccessed(etk::to_string(_path));
|
return FSNodeGetTimeAccessed(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2076,7 +2076,7 @@ bool etk::FSNodeTouch(const std::string& _path) {
|
|||||||
etk::FSNode tmpNode(_path);
|
etk::FSNode tmpNode(_path);
|
||||||
return tmpNode.touch();
|
return tmpNode.touch();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeTouch(const std::u32string& _path) {
|
bool etk::FSNodeTouch(const std::u32string& _path) {
|
||||||
return FSNodeTouch(etk::to_string(_path));
|
return FSNodeTouch(etk::to_string(_path));
|
||||||
}
|
}
|
||||||
@ -2100,7 +2100,7 @@ bool etk::FSNodeEcho(const std::string& _path, const std::string& _dataTowrite)
|
|||||||
}
|
}
|
||||||
return tmpNode.fileClose();
|
return tmpNode.fileClose();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeEcho(const std::u32string& _path, const std::u32string& _dataTowrite) {
|
bool etk::FSNodeEcho(const std::u32string& _path, const std::u32string& _dataTowrite) {
|
||||||
return FSNodeEcho(etk::to_string(_path), etk::to_string(_dataTowrite));
|
return FSNodeEcho(etk::to_string(_path), etk::to_string(_dataTowrite));
|
||||||
}
|
}
|
||||||
@ -2124,7 +2124,7 @@ bool etk::FSNodeEchoAdd(const std::string& _path, const std::string& _dataTowrit
|
|||||||
}
|
}
|
||||||
return tmpNode.fileClose();
|
return tmpNode.fileClose();
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::FSNodeEchoAdd(const std::u32string& _path, const std::u32string& _dataTowrite) {
|
bool etk::FSNodeEchoAdd(const std::u32string& _path, const std::u32string& _dataTowrite) {
|
||||||
return FSNodeEchoAdd(etk::to_string(_path), etk::to_string(_dataTowrite));
|
return FSNodeEchoAdd(etk::to_string(_path), etk::to_string(_dataTowrite));
|
||||||
}
|
}
|
||||||
@ -2142,7 +2142,7 @@ void etk::FSNodeHistory(const std::string& _path, int32_t _historyCount) {
|
|||||||
etk::FSNodeMove(_path, _path + "-1");
|
etk::FSNodeMove(_path, _path + "-1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::FSNodeHistory(const std::u32string& _path, int32_t _historyCount) {
|
void etk::FSNodeHistory(const std::u32string& _path, int32_t _historyCount) {
|
||||||
return FSNodeHistory(etk::to_string(_path), _historyCount);
|
return FSNodeHistory(etk::to_string(_path), _historyCount);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ namespace etk {
|
|||||||
* @param[in] _path Path of the curent file /folder ...
|
* @param[in] _path Path of the curent file /folder ...
|
||||||
*/
|
*/
|
||||||
FSNode(const std::string& _path = "~");
|
FSNode(const std::string& _path = "~");
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
FSNode(const std::u32string& _path);
|
FSNode(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -163,7 +163,7 @@ namespace etk {
|
|||||||
* @param[in] _newName Name of the Node
|
* @param[in] _newName Name of the Node
|
||||||
*/
|
*/
|
||||||
void privateSetName(const std::string& _newName);
|
void privateSetName(const std::string& _newName);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void privateSetName(const std::u32string& _newName);
|
void privateSetName(const std::u32string& _newName);
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
@ -214,7 +214,7 @@ namespace etk {
|
|||||||
* @return false : action not done
|
* @return false : action not done
|
||||||
*/
|
*/
|
||||||
void setName(const std::string& _newName);
|
void setName(const std::string& _newName);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void setName(const std::u32string& _newName);
|
void setName(const std::u32string& _newName);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -222,7 +222,7 @@ namespace etk {
|
|||||||
* @return the requested filename
|
* @return the requested filename
|
||||||
*/
|
*/
|
||||||
std::string getFileSystemName() const;
|
std::string getFileSystemName() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUFileSystemName() const;
|
std::u32string getUFileSystemName() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -231,7 +231,7 @@ namespace etk {
|
|||||||
* @note Auto remove of ../../../ and //
|
* @note Auto remove of ../../../ and //
|
||||||
*/
|
*/
|
||||||
std::string getNameFolder() const;
|
std::string getNameFolder() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUNameFolder() const;
|
std::u32string getUNameFolder() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -240,7 +240,7 @@ namespace etk {
|
|||||||
* @note Auto remove of ../../../ and //
|
* @note Auto remove of ../../../ and //
|
||||||
*/
|
*/
|
||||||
std::string getName() const;
|
std::string getName() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUName() const;
|
std::u32string getUName() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -248,7 +248,7 @@ namespace etk {
|
|||||||
* @return the name of the node (like myFile.kkk)
|
* @return the name of the node (like myFile.kkk)
|
||||||
*/
|
*/
|
||||||
std::string getNameFile() const;
|
std::string getNameFile() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUNameFile() const;
|
std::u32string getUNameFile() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -257,7 +257,7 @@ namespace etk {
|
|||||||
* @note Auto remove of ../../../ and //
|
* @note Auto remove of ../../../ and //
|
||||||
*/
|
*/
|
||||||
std::string getRelativeFolder() const;
|
std::string getRelativeFolder() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getURelativeFolder() const;
|
std::u32string getURelativeFolder() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -273,7 +273,7 @@ namespace etk {
|
|||||||
* @return false : action not done
|
* @return false : action not done
|
||||||
*/
|
*/
|
||||||
bool move(const std::string& _path);
|
bool move(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool move(const std::u32string& _path);
|
bool move(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -299,7 +299,7 @@ namespace etk {
|
|||||||
* @return The time requested (in string)
|
* @return The time requested (in string)
|
||||||
*/
|
*/
|
||||||
std::string timeCreatedString() const;
|
std::string timeCreatedString() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string timeUCreatedString() const;
|
std::u32string timeUCreatedString() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -312,7 +312,7 @@ namespace etk {
|
|||||||
* @return The time requested (in string)
|
* @return The time requested (in string)
|
||||||
*/
|
*/
|
||||||
std::string timeModifiedString() const;
|
std::string timeModifiedString() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string timeUModifiedString() const;
|
std::u32string timeUModifiedString() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -325,7 +325,7 @@ namespace etk {
|
|||||||
* @return The time requested (in string)
|
* @return The time requested (in string)
|
||||||
*/
|
*/
|
||||||
std::string timeAccessedString() const;
|
std::string timeAccessedString() const;
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string timeUAccessedString() const;
|
std::u32string timeUAccessedString() const;
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -383,7 +383,7 @@ namespace etk {
|
|||||||
* @param[in] _recursiveEnable Activate the recursive mode (enable by default)
|
* @param[in] _recursiveEnable Activate the recursive mode (enable by default)
|
||||||
*/
|
*/
|
||||||
void folderGetRecursiveFiles(std::vector<std::string>& _output, bool _recursiveEnable=true);
|
void folderGetRecursiveFiles(std::vector<std::string>& _output, bool _recursiveEnable=true);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void folderGetRecursiveFiles(std::vector<std::u32string>& _output, bool _recursiveEnable=true);
|
void folderGetRecursiveFiles(std::vector<std::u32string>& _output, bool _recursiveEnable=true);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -397,7 +397,7 @@ namespace etk {
|
|||||||
* @return the requested extention
|
* @return the requested extention
|
||||||
*/
|
*/
|
||||||
std::string fileGetExtention();
|
std::string fileGetExtention();
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string fileUGetExtention();
|
std::u32string fileUGetExtention();
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -524,7 +524,7 @@ namespace etk {
|
|||||||
fileRead(&value[0], sizeof(char), fileSize()/sizeof(char));
|
fileRead(&value[0], sizeof(char), fileSize()/sizeof(char));
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string fileReadAllU32String() {
|
std::u32string fileReadAllU32String() {
|
||||||
return utf8::convertUnicode(fileReadAllString());
|
return utf8::convertUnicode(fileReadAllString());
|
||||||
}
|
}
|
||||||
@ -538,7 +538,7 @@ namespace etk {
|
|||||||
void fileWriteAll(const std::string& _value) {
|
void fileWriteAll(const std::string& _value) {
|
||||||
fileWrite(static_cast<const void*>(&(_value[0])), sizeof(char), _value.size()/sizeof(char));
|
fileWrite(static_cast<const void*>(&(_value[0])), sizeof(char), _value.size()/sizeof(char));
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void fileWriteAll(const std::u32string& _value) {
|
void fileWriteAll(const std::u32string& _value) {
|
||||||
fileWriteAll(u32char::convertToUtf8(_value));
|
fileWriteAll(u32char::convertToUtf8(_value));
|
||||||
}
|
}
|
||||||
@ -578,7 +578,7 @@ namespace etk {
|
|||||||
* @return the home folder : like : "/home/machin/"
|
* @return the home folder : like : "/home/machin/"
|
||||||
*/
|
*/
|
||||||
std::string getUserHomeFolder();
|
std::string getUserHomeFolder();
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUUserHomeFolder();
|
std::u32string getUUserHomeFolder();
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -586,7 +586,7 @@ namespace etk {
|
|||||||
* @return the basic folder name (ex : run ./appl in the pwd=/home/machin/sousFolder ==> this return the pwd folder)
|
* @return the basic folder name (ex : run ./appl in the pwd=/home/machin/sousFolder ==> this return the pwd folder)
|
||||||
*/
|
*/
|
||||||
std::string getUserRunFolder();
|
std::string getUserRunFolder();
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getUUserRunFolder();
|
std::u32string getUUserRunFolder();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ namespace etk {
|
|||||||
* @param[in] _folderName The associated folder of the Theme (like "myTheme/folder/folder2/")
|
* @param[in] _folderName The associated folder of the Theme (like "myTheme/folder/folder2/")
|
||||||
*/
|
*/
|
||||||
void setName(const std::string& _refName, const std::string& _folderName);
|
void setName(const std::string& _refName, const std::string& _folderName);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
void setName(const std::u32string& _refName, const std::u32string& _folderName);
|
void setName(const std::u32string& _refName, const std::u32string& _folderName);
|
||||||
#endif
|
#endif
|
||||||
@ -608,7 +608,7 @@ namespace etk {
|
|||||||
* @return the path of the theme
|
* @return the path of the theme
|
||||||
*/
|
*/
|
||||||
std::string getName(const std::string& _refName);
|
std::string getName(const std::string& _refName);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::u32string getName(const std::u32string& _refName);
|
std::u32string getName(const std::u32string& _refName);
|
||||||
#endif
|
#endif
|
||||||
@ -618,7 +618,7 @@ namespace etk {
|
|||||||
* @param[in] _folderName The associated default folder of the Theme (like "myTheme/color/default/")
|
* @param[in] _folderName The associated default folder of the Theme (like "myTheme/color/default/")
|
||||||
*/
|
*/
|
||||||
void setNameDefault(const std::string& _refName, const std::string& _folderName);
|
void setNameDefault(const std::string& _refName, const std::string& _folderName);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
void setNameDefault(const std::u32string& _refName, const std::u32string& _folderName);
|
void setNameDefault(const std::u32string& _refName, const std::u32string& _folderName);
|
||||||
#endif
|
#endif
|
||||||
@ -628,7 +628,7 @@ namespace etk {
|
|||||||
* @return the path of the theme
|
* @return the path of the theme
|
||||||
*/
|
*/
|
||||||
std::string getNameDefault(const std::string& _refName);
|
std::string getNameDefault(const std::string& _refName);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::u32string getNameDefault(const std::u32string& _refName);
|
std::u32string getNameDefault(const std::u32string& _refName);
|
||||||
#endif
|
#endif
|
||||||
@ -637,7 +637,7 @@ namespace etk {
|
|||||||
* @return The list of elements
|
* @return The list of elements
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> list();
|
std::vector<std::string> list();
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::vector<std::u32string> listU();
|
std::vector<std::u32string> listU();
|
||||||
#endif
|
#endif
|
||||||
@ -650,7 +650,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeRemove(const std::string& _path);
|
bool FSNodeRemove(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeRemove(const std::u32string& _path);
|
bool FSNodeRemove(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -660,7 +660,7 @@ namespace etk {
|
|||||||
* @return -1 : An error occured
|
* @return -1 : An error occured
|
||||||
*/
|
*/
|
||||||
int64_t FSNodeGetCount(const std::string& _path);
|
int64_t FSNodeGetCount(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
int64_t FSNodeGetCount(const std::u32string& _path);
|
int64_t FSNodeGetCount(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -672,7 +672,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeCreate(const std::string& _path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::FSN_FOLDER);
|
bool FSNodeCreate(const std::string& _path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::FSN_FOLDER);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeCreate(const std::u32string& _path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::FSN_FOLDER);
|
bool FSNodeCreate(const std::u32string& _path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::FSN_FOLDER);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -682,7 +682,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeExist(const std::string& _path);
|
bool FSNodeExist(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeExist(const std::u32string& _path);
|
bool FSNodeExist(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -693,7 +693,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeMove(const std::string& _path1, const std::string& _path2);
|
bool FSNodeMove(const std::string& _path1, const std::string& _path2);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeMove(const std::u32string& _path1, const std::u32string& _path2);
|
bool FSNodeMove(const std::u32string& _path1, const std::u32string& _path2);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -703,7 +703,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
etk::FSNodeRight FSNodeGetRight(const std::string& _path);
|
etk::FSNodeRight FSNodeGetRight(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
etk::FSNodeRight FSNodeGetRight(const std::u32string& _path);
|
etk::FSNodeRight FSNodeGetRight(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -713,7 +713,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
enum etk::typeNode FSNodeGetType(const std::string& _path);
|
enum etk::typeNode FSNodeGetType(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
enum etk::typeNode FSNodeGetType(const std::u32string& _path);
|
enum etk::typeNode FSNodeGetType(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -723,7 +723,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
uint64_t FSNodeGetTimeCreated(const std::string& _path);
|
uint64_t FSNodeGetTimeCreated(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t FSNodeGetTimeCreated(const std::u32string& _path);
|
uint64_t FSNodeGetTimeCreated(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -733,7 +733,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
uint64_t FSNodeGetTimeModified(const std::string& _path);
|
uint64_t FSNodeGetTimeModified(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t FSNodeGetTimeModified(const std::u32string& _path);
|
uint64_t FSNodeGetTimeModified(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -743,7 +743,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
uint64_t FSNodeGetTimeAccessed(const std::string& _path);
|
uint64_t FSNodeGetTimeAccessed(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t FSNodeGetTimeAccessed(const std::u32string& _path);
|
uint64_t FSNodeGetTimeAccessed(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -753,7 +753,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeTouch(const std::string& _path);
|
bool FSNodeTouch(const std::string& _path);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeTouch(const std::u32string& _path);
|
bool FSNodeTouch(const std::u32string& _path);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -764,7 +764,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeEcho(const std::string& _path, const std::string& _dataTowrite);
|
bool FSNodeEcho(const std::string& _path, const std::string& _dataTowrite);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeEcho(const std::u32string& _path, const std::u32string& _dataTowrite);
|
bool FSNodeEcho(const std::u32string& _path, const std::u32string& _dataTowrite);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -775,7 +775,7 @@ namespace etk {
|
|||||||
* @return false : An error occured
|
* @return false : An error occured
|
||||||
*/
|
*/
|
||||||
bool FSNodeEchoAdd(const std::string& _path, const std::string& _dataTowrite);
|
bool FSNodeEchoAdd(const std::string& _path, const std::string& _dataTowrite);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool FSNodeEchoAdd(const std::u32string& _path, const std::u32string& _dataTowrite);
|
bool FSNodeEchoAdd(const std::u32string& _path, const std::u32string& _dataTowrite);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
@ -784,7 +784,7 @@ namespace etk {
|
|||||||
* @param[in] _historyCount number of saved file in the history (-xxx)
|
* @param[in] _historyCount number of saved file in the history (-xxx)
|
||||||
*/
|
*/
|
||||||
void FSNodeHistory(const std::string& _path, int32_t _historyCount);
|
void FSNodeHistory(const std::string& _path, int32_t _historyCount);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void FSNodeHistory(const std::u32string& _path, int32_t _historyCount);
|
void FSNodeHistory(const std::u32string& _path, int32_t _historyCount);
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +174,7 @@ void etk::FSNodeRight::setOtherRunable(bool _newStatus)
|
|||||||
m_rights |= RIGHT_OTHER_EXECUTE;
|
m_rights |= RIGHT_OTHER_EXECUTE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::FSNodeRight::getURight() const {
|
std::u32string etk::FSNodeRight::getURight() const {
|
||||||
return etk::to_u32string(getRight());
|
return etk::to_u32string(getRight());
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ namespace etk {
|
|||||||
void setOtherReadable(bool _newStatus);
|
void setOtherReadable(bool _newStatus);
|
||||||
void setOtherWritable(bool _newStatus);
|
void setOtherWritable(bool _newStatus);
|
||||||
void setOtherRunable(bool _newStatus);
|
void setOtherRunable(bool _newStatus);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string getURight() const;
|
std::u32string getURight() const;
|
||||||
#endif
|
#endif
|
||||||
std::string getRight() const;
|
std::string getRight() const;
|
||||||
|
@ -130,7 +130,7 @@ int8_t u32char::convertUtf8(char32_t _val, char _output[5]) {
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::string u32char::convertToUtf8(const std::u32string& _input) {
|
std::string u32char::convertToUtf8(const std::u32string& _input) {
|
||||||
TK_TODO("implement this function ...");
|
TK_TODO("implement this function ...");
|
||||||
return "TODO ... std::string u32char::convertToUtf8(const std::u32string& _input)";
|
return "TODO ... std::string u32char::convertToUtf8(const std::u32string& _input)";
|
||||||
@ -231,7 +231,7 @@ bool utf8::theoricFirst(const char _input) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string utf8::convertUnicode(const std::string& _input) {
|
std::u32string utf8::convertUnicode(const std::string& _input) {
|
||||||
TK_TODO("implement this function ...");
|
TK_TODO("implement this function ...");
|
||||||
return U"TODO ... std::u32string utf8::convertUnicode(const std::string& _input)";
|
return U"TODO ... std::u32string utf8::convertUnicode(const std::string& _input)";
|
||||||
@ -312,7 +312,7 @@ char32_t utf8::iterator::operator* () {
|
|||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "etk"
|
#define __class__ "etk"
|
||||||
namespace etk {
|
namespace etk {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> std::string to_string<std::u32string>(const std::u32string& _input) {
|
template<> std::string to_string<std::u32string>(const std::u32string& _input) {
|
||||||
std::string out;
|
std::string out;
|
||||||
for (size_t iii=0; iii<_input.size(); ++iii) {
|
for (size_t iii=0; iii<_input.size(); ++iii) {
|
||||||
@ -418,7 +418,7 @@ namespace etk {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
static std::u32string transform_to_u32string(const char* _input) {
|
static std::u32string transform_to_u32string(const char* _input) {
|
||||||
if (_input == NULL) {
|
if (_input == NULL) {
|
||||||
return U"";
|
return U"";
|
||||||
@ -471,7 +471,7 @@ namespace etk {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
namespace etk {
|
namespace etk {
|
||||||
template<> std::u32string to_u32string<char*>(char* const & _input) {
|
template<> std::u32string to_u32string<char*>(char* const & _input) {
|
||||||
return transform_to_u32string(_input);
|
return transform_to_u32string(_input);
|
||||||
@ -569,7 +569,7 @@ bool etk::string_to_bool(const std::string& _str) {
|
|||||||
if( true == compare_no_case(_str, "true")
|
if( true == compare_no_case(_str, "true")
|
||||||
|| true == compare_no_case(_str, "enable")
|
|| true == compare_no_case(_str, "enable")
|
||||||
|| true == compare_no_case(_str, "yes")
|
|| true == compare_no_case(_str, "yes")
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
|| _str == u8"1"
|
|| _str == u8"1"
|
||||||
#else
|
#else
|
||||||
|| _str == "1"
|
|| _str == "1"
|
||||||
@ -579,7 +579,7 @@ bool etk::string_to_bool(const std::string& _str) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::compare_no_case(const std::u32string& _obj, const std::u32string& _val) {
|
bool etk::compare_no_case(const std::u32string& _obj, const std::u32string& _val) {
|
||||||
if (_val.size() != _obj.size()) {
|
if (_val.size() != _obj.size()) {
|
||||||
return false;
|
return false;
|
||||||
@ -610,7 +610,7 @@ struct doublette {
|
|||||||
char32_t upper;
|
char32_t upper;
|
||||||
};
|
};
|
||||||
struct doublette convertionTable[] = {
|
struct doublette convertionTable[] = {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
{U'ç', U'Ç'},
|
{U'ç', U'Ç'},
|
||||||
|
|
||||||
{U'á', U'Á'}, {U'à', U'À'}, {U'ä', U'Ä'}, {U'â', U'Â'}, {U'å', U'Å'}, {U'ã', U'Ã'},
|
{U'á', U'Á'}, {U'à', U'À'}, {U'ä', U'Ä'}, {U'â', U'Â'}, {U'å', U'Å'}, {U'ã', U'Ã'},
|
||||||
@ -666,7 +666,7 @@ std::string etk::tolower(std::string _obj) {
|
|||||||
}
|
}
|
||||||
return _obj;
|
return _obj;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::tolower(std::u32string _obj) {
|
std::u32string etk::tolower(std::u32string _obj) {
|
||||||
for(size_t iii=0 ; iii<_obj.size() ; iii++) {
|
for(size_t iii=0 ; iii<_obj.size() ; iii++) {
|
||||||
_obj[iii] = localToLower(_obj[iii]);
|
_obj[iii] = localToLower(_obj[iii]);
|
||||||
@ -681,7 +681,7 @@ std::string etk::toupper(std::string _obj) {
|
|||||||
}
|
}
|
||||||
return _obj;
|
return _obj;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::toupper(std::u32string _obj) {
|
std::u32string etk::toupper(std::u32string _obj) {
|
||||||
for(size_t iii=0 ; iii<_obj.size() ; iii++) {
|
for(size_t iii=0 ; iii<_obj.size() ; iii++) {
|
||||||
_obj[iii] = localToUpper(_obj[iii]);
|
_obj[iii] = localToUpper(_obj[iii]);
|
||||||
@ -716,7 +716,7 @@ bool etk::end_with(const std::string& _obj, const std::string& _val, bool _caseS
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::end_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive) {
|
bool etk::end_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive) {
|
||||||
if (_val.size() == 0) {
|
if (_val.size() == 0) {
|
||||||
return false;
|
return false;
|
||||||
@ -771,7 +771,7 @@ bool etk::start_with(const std::string& _obj, const std::string& _val, bool _cas
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool etk::start_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive) {
|
bool etk::start_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive) {
|
||||||
if (_val.size() == 0) {
|
if (_val.size() == 0) {
|
||||||
return false;
|
return false;
|
||||||
@ -852,7 +852,7 @@ std::string etk::extract_line(const std::string& _obj, int32_t _pos) {
|
|||||||
}
|
}
|
||||||
return std::string(_obj, startPos, stopPos - startPos);
|
return std::string(_obj, startPos, stopPos - startPos);
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string etk::extract_line(const std::u32string& _obj, int32_t _pos) {
|
std::u32string etk::extract_line(const std::u32string& _obj, int32_t _pos) {
|
||||||
// search back : '\n'
|
// search back : '\n'
|
||||||
size_t startPos = _obj.rfind('\n', _pos);
|
size_t startPos = _obj.rfind('\n', _pos);
|
||||||
@ -898,7 +898,7 @@ std::vector<std::string> etk::split(const std::string& _input, char _val) {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::vector<std::u32string> etk::split(const std::u32string& _input, char32_t _val) {
|
std::vector<std::u32string> etk::split(const std::u32string& _input, char32_t _val) {
|
||||||
std::vector<std::u32string> list;
|
std::vector<std::u32string> list;
|
||||||
size_t lastStartPos = 0;
|
size_t lastStartPos = 0;
|
||||||
@ -1003,7 +1003,7 @@ void etk::sort(std::vector<std::string *> &_list) {
|
|||||||
_list.insert(_list.begin()+findPos, tmpList[iii]);
|
_list.insert(_list.begin()+findPos, tmpList[iii]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
void etk::sort(std::vector<std::u32string *> &_list) {
|
void etk::sort(std::vector<std::u32string *> &_list) {
|
||||||
std::vector<std::u32string *> tmpList(_list);
|
std::vector<std::u32string *> tmpList(_list);
|
||||||
_list.clear();
|
_list.clear();
|
||||||
@ -1022,7 +1022,7 @@ void etk::sort(std::vector<std::string *> &_list) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace etk {
|
namespace etk {
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<std::u32string>(std::u32string& _variableRet, const std::string& _value) {
|
template<> bool from_string<std::u32string>(std::u32string& _variableRet, const std::string& _value) {
|
||||||
_variableRet = etk::to_u32string(_value);
|
_variableRet = etk::to_u32string(_value);
|
||||||
return true;
|
return true;
|
||||||
@ -1080,7 +1080,7 @@ namespace etk {
|
|||||||
_variableRet = string_to_bool(_value);
|
_variableRet = string_to_bool(_value);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template<> bool from_string<int8_t>(int8_t& _variableRet, const std::u32string& _value) {
|
template<> bool from_string<int8_t>(int8_t& _variableRet, const std::u32string& _value) {
|
||||||
_variableRet = string_to_int8_t(_value);
|
_variableRet = string_to_int8_t(_value);
|
||||||
return true;
|
return true;
|
||||||
@ -1149,7 +1149,7 @@ std::ostream& std::operator <<(std::ostream& _os, const std::vector<std::string>
|
|||||||
_os << "}";
|
_os << "}";
|
||||||
return _os;
|
return _os;
|
||||||
}
|
}
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::ostream& std::operator <<(std::ostream& _os, const std::u32string& _obj) {
|
std::ostream& std::operator <<(std::ostream& _os, const std::u32string& _obj) {
|
||||||
_os << etk::to_string(_obj).c_str();
|
_os << etk::to_string(_obj).c_str();
|
||||||
return _os;
|
return _os;
|
||||||
|
@ -41,7 +41,7 @@ namespace u32char {
|
|||||||
|
|
||||||
char32_t changeOrder(char32_t _val);
|
char32_t changeOrder(char32_t _val);
|
||||||
int8_t convertUtf8(char32_t _val, char _output[5]);
|
int8_t convertUtf8(char32_t _val, char _output[5]);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::string convertToUtf8(const std::u32string& _input);
|
std::string convertToUtf8(const std::u32string& _input);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -61,7 +61,7 @@ namespace utf8 {
|
|||||||
bool theoricFirst(const char _input);
|
bool theoricFirst(const char _input);
|
||||||
|
|
||||||
char32_t convertChar32(const char* _input);
|
char32_t convertChar32(const char* _input);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::u32string convertUnicode(const std::string& _input);
|
std::u32string convertUnicode(const std::string& _input);
|
||||||
#endif
|
#endif
|
||||||
class iterator {
|
class iterator {
|
||||||
@ -387,127 +387,127 @@ namespace std {
|
|||||||
namespace etk {
|
namespace etk {
|
||||||
// these declaration is to prevent some under template declaration of unknown type
|
// these declaration is to prevent some under template declaration of unknown type
|
||||||
template <class TYPE> std::string to_string(const TYPE& _variable);
|
template <class TYPE> std::string to_string(const TYPE& _variable);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template <class TYPE> std::u32string to_u32string(const TYPE& _variable);
|
template <class TYPE> std::u32string to_u32string(const TYPE& _variable);
|
||||||
#endif
|
#endif
|
||||||
// these declaration is to prevent some under template declaration of unknown type
|
// these declaration is to prevent some under template declaration of unknown type
|
||||||
template <class TYPE> bool from_string(TYPE& _variableRet, const std::string& _value);
|
template <class TYPE> bool from_string(TYPE& _variableRet, const std::string& _value);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
template <class TYPE> bool from_string(TYPE& _variableRet, const std::u32string& _value);
|
template <class TYPE> bool from_string(TYPE& _variableRet, const std::u32string& _value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO : Change this in :
|
// TODO : Change this in :
|
||||||
// TODO : template <typename TYPE> TYPE string_to<TYPE>(const std::u32string& _value); ==> check exceptions ...
|
// TODO : template <typename TYPE> TYPE string_to<TYPE>(const std::u32string& _value); ==> check exceptions ...
|
||||||
long double string_to_long_double(const std::string& _str);
|
long double string_to_long_double(const std::string& _str);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
long double string_to_long_double(const std::u32string& _str);
|
long double string_to_long_double(const std::u32string& _str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
double string_to_double(const std::string& _str);
|
double string_to_double(const std::string& _str);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
double string_to_double(const std::u32string& _str);
|
double string_to_double(const std::u32string& _str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float string_to_float(const std::string& _str);
|
float string_to_float(const std::string& _str);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
float string_to_float(const std::u32string& _str);
|
float string_to_float(const std::u32string& _str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int8_t string_to_int8_t(const std::string& _str, int _base = 10);
|
int8_t string_to_int8_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
int8_t string_to_int8_t(const std::u32string& _str, int _base = 10);
|
int8_t string_to_int8_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int16_t string_to_int16_t(const std::string& _str, int _base = 10);
|
int16_t string_to_int16_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
int16_t string_to_int16_t(const std::u32string& _str, int _base = 10);
|
int16_t string_to_int16_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t string_to_int32_t(const std::string& _str, int _base = 10);
|
int32_t string_to_int32_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
int32_t string_to_int32_t(const std::u32string& _str, int _base = 10);
|
int32_t string_to_int32_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int64_t string_to_int64_t(const std::string& _str, int _base = 10);
|
int64_t string_to_int64_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
int64_t string_to_int64_t(const std::u32string& _str, int _base = 10);
|
int64_t string_to_int64_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t string_to_uint8_t(const std::string& _str, int _base = 10);
|
uint8_t string_to_uint8_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint8_t string_to_uint8_t(const std::u32string& _str, int _base = 10);
|
uint8_t string_to_uint8_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint16_t string_to_uint16_t(const std::string& _str, int _base = 10);
|
uint16_t string_to_uint16_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint16_t string_to_uint16_t(const std::u32string& _str, int _base = 10);
|
uint16_t string_to_uint16_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t string_to_uint32_t(const std::string& _str, int _base = 10);
|
uint32_t string_to_uint32_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint32_t string_to_uint32_t(const std::u32string& _str, int _base = 10);
|
uint32_t string_to_uint32_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint64_t string_to_uint64_t(const std::string& _str, int _base = 10);
|
uint64_t string_to_uint64_t(const std::string& _str, int _base = 10);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
uint64_t string_to_uint64_t(const std::u32string& _str, int _base = 10);
|
uint64_t string_to_uint64_t(const std::u32string& _str, int _base = 10);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool string_to_bool(const std::string& _str);
|
bool string_to_bool(const std::string& _str);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
bool string_to_bool(const std::u32string& _str);
|
bool string_to_bool(const std::u32string& _str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string tolower(std::string _obj);
|
std::string tolower(std::string _obj);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::u32string tolower(std::u32string _obj);
|
std::u32string tolower(std::u32string _obj);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string toupper(std::string _obj);
|
std::string toupper(std::string _obj);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::u32string toupper(std::u32string _obj);
|
std::u32string toupper(std::u32string _obj);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool compare_no_case(const std::string& _obj, const std::string& _val);
|
bool compare_no_case(const std::string& _obj, const std::string& _val);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
bool compare_no_case(const std::u32string& _obj, const std::u32string& _val);
|
bool compare_no_case(const std::u32string& _obj, const std::u32string& _val);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool end_with(const std::string& _obj, const std::string& _val, bool _caseSensitive = true);
|
bool end_with(const std::string& _obj, const std::string& _val, bool _caseSensitive = true);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
bool end_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive = true);
|
bool end_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive = true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool start_with(const std::string& _obj, const std::string& _val, bool _caseSensitive = true);
|
bool start_with(const std::string& _obj, const std::string& _val, bool _caseSensitive = true);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
bool start_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive = true);
|
bool start_with(const std::u32string& _obj, const std::u32string& _val, bool _caseSensitive = true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string replace(const std::string& _obj, char _val, char _replace);
|
std::string replace(const std::string& _obj, char _val, char _replace);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::u32string replace(const std::u32string& _obj, char32_t _val, char32_t _replace);
|
std::u32string replace(const std::u32string& _obj, char32_t _val, char32_t _replace);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string extract_line(const std::string& _obj, int32_t _pos);
|
std::string extract_line(const std::string& _obj, int32_t _pos);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::u32string extract_line(const std::u32string& _obj, int32_t _pos);
|
std::u32string extract_line(const std::u32string& _obj, int32_t _pos);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<std::string> split(const std::string& _input, char _val);
|
std::vector<std::string> split(const std::string& _input, char _val);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
std::vector<std::u32string> split(const std::u32string& _input, char32_t _val);
|
std::vector<std::u32string> split(const std::u32string& _input, char32_t _val);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void sort(std::vector<std::string *>& _list);
|
void sort(std::vector<std::string *>& _list);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
//! @previous
|
//! @previous
|
||||||
void sort(std::vector<std::u32string *>& _list);
|
void sort(std::vector<std::u32string *>& _list);
|
||||||
#endif
|
#endif
|
||||||
@ -531,7 +531,7 @@ namespace std {
|
|||||||
namespace std {
|
namespace std {
|
||||||
std::ostream& operator <<(std::ostream& _os, const std::string& _obj);
|
std::ostream& operator <<(std::ostream& _os, const std::string& _obj);
|
||||||
std::ostream& operator <<(std::ostream& _os, const std::vector<std::string>& _obj);
|
std::ostream& operator <<(std::ostream& _os, const std::vector<std::string>& _obj);
|
||||||
#if __cplusplus >= 201103L
|
#if __CPP_VERSION__ >= 2011
|
||||||
std::ostream& operator <<(std::ostream& _os, const std::u32string& _obj);
|
std::ostream& operator <<(std::ostream& _os, const std::u32string& _obj);
|
||||||
std::ostream& operator <<(std::ostream& _os, const std::vector<std::u32string>& _obj);
|
std::ostream& operator <<(std::ostream& _os, const std::vector<std::u32string>& _obj);
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,7 +41,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __cplusplus <= 201103L
|
|
||||||
|
|
||||||
|
#if __CPP_VERSION__ < 2011
|
||||||
#define nullptr NULL
|
#define nullptr NULL
|
||||||
typedef uint32_t char32_t;
|
typedef uint32_t char32_t;
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -60,7 +62,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
typedef float float_t;
|
#include <math.h>
|
||||||
|
#ifndef _MATH_H_MATHDEF
|
||||||
|
typedef float float_t;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
20
lutin_etk.py
20
lutin_etk.py
@ -31,16 +31,6 @@ def create(target):
|
|||||||
if target.name=="IOs":
|
if target.name=="IOs":
|
||||||
myModule.add_src_file('etk/logIOs.m')
|
myModule.add_src_file('etk/logIOs.m')
|
||||||
|
|
||||||
# force old version of C++
|
|
||||||
target.xx_version = 4005000
|
|
||||||
|
|
||||||
if target.config["compilator"] == "gcc" \
|
|
||||||
and target.xx_version < 4007000:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
# name of the dependency
|
|
||||||
myModule.add_optionnal_module_depend('linearmath', "ETK_BUILD_LINEARMATH", export=True)
|
|
||||||
myModule.add_optionnal_module_depend('minizip', "ETK_BUILD_MINIZIP")
|
|
||||||
|
|
||||||
if target.config["mode"] == "release":
|
if target.config["mode"] == "release":
|
||||||
# TODO : The other way is to remove this ...
|
# TODO : The other way is to remove this ...
|
||||||
@ -55,8 +45,16 @@ def create(target):
|
|||||||
|
|
||||||
if target.config["compilator"] == "gcc" \
|
if target.config["compilator"] == "gcc" \
|
||||||
and target.xx_version < 4007000:
|
and target.xx_version < 4007000:
|
||||||
|
# note : this framework depend on C++ 11, but a simple port of Boost for old compatibility has been done ...
|
||||||
|
myModule.compile_version_XX(2003)
|
||||||
myModule.add_optionnal_module_depend('boost', "ETK_BUILD_BOOST", export=True)
|
myModule.add_optionnal_module_depend('boost', "ETK_BUILD_BOOST", export=True)
|
||||||
myModule.add_export_path(tools.get_current_path(__file__) + "/etk/boost_to_std")
|
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_boost")
|
||||||
|
else:
|
||||||
|
myModule.compile_version_XX(2011)
|
||||||
|
# name of the dependency
|
||||||
|
myModule.add_optionnal_module_depend('linearmath', "ETK_BUILD_LINEARMATH", export=True)
|
||||||
|
myModule.add_optionnal_module_depend('minizip', "ETK_BUILD_MINIZIP")
|
||||||
|
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_X11")
|
||||||
|
|
||||||
if target.name=="Windows":
|
if target.name=="Windows":
|
||||||
None
|
None
|
||||||
|
Loading…
Reference in New Issue
Block a user