[DEV] update lutin naming

This commit is contained in:
Edouard DUPIN 2013-12-23 22:38:46 +01:00
parent c1ab11e532
commit 6f8a4f8510
5 changed files with 62 additions and 58 deletions

View File

@ -11,7 +11,7 @@
const etk::convertionTable_ts etk::constConvertionTable[] = {
const struct etk::convertionTable etk::constConvertionTable[] = {
// haveBackSlash, inputValue, newValue
{ false , '(' , 0 , REGEXP_OPCODE_PTHESE_IN},
{ true , '(' , '(' , REGEXP_OPCODE_ERROR},
@ -62,13 +62,12 @@ const etk::convertionTable_ts etk::constConvertionTable[] = {
{ true , '0' , '\0', REGEXP_OPCODE_ERROR},
{ true , '@' , 0 , REGEXP_OPCODE_NO_CHAR},
};
const int64_t etk::constConvertionTableSize = sizeof(etk::constConvertionTable) / sizeof(etk::convertionTable_ts) ;
const int64_t etk::constConvertionTableSize = sizeof(etk::constConvertionTable) / sizeof(struct etk::convertionTable) ;
void etk::displayElem(const std::vector<char32_t>& _data, int64_t _start, int64_t _stop) {
etk::cout<< ETK_BASH_COLOR_NORMAL;
for (int64_t iii=_start; iii<(int64_t)_data.size() && iii<_stop ; iii++) {
switch(_data[iii])
{
switch(_data[iii]) {
case REGEXP_OPCODE_PTHESE_IN: etk::cout<<ETK_BASH_COLOR_RED << (char*)"(" << ETK_BASH_COLOR_NORMAL; break;
case REGEXP_OPCODE_PTHESE_OUT: etk::cout<<ETK_BASH_COLOR_RED << (char*)")" << ETK_BASH_COLOR_NORMAL; break;
case REGEXP_OPCODE_BRACKET_IN: etk::cout<<ETK_BASH_COLOR_YELLOW << (char*)"[" << ETK_BASH_COLOR_NORMAL; break;
@ -100,8 +99,7 @@ void etk::displayElem(const std::vector<char32_t>& _data, int64_t _start, int64_
}
char * etk::levelSpace(uint32_t _level) {
switch(_level)
{
switch(_level) {
case 0: return (char*)"";
case 1: return (char*)" ";
case 2: return (char*)" ";

View File

@ -15,10 +15,8 @@
#include <etk/UString.h>
#include <math.h>
namespace etk
{
template <typename T> class Vector2D
{
namespace etk {
template <typename T> class Vector2D {
public:
T m_floats[2];
public:
@ -172,7 +170,7 @@ namespace etk
/* ****************************************************
* ++ operator
*****************************************************/
Vector2D<T>& operator++() {
Vector2D<T>& operator++(void) {
++m_floats[0];
++m_floats[1];
return *this;
@ -185,7 +183,7 @@ namespace etk
/* ****************************************************
* -- operator
*****************************************************/
Vector2D<T>& operator--() {
Vector2D<T>& operator--(void) {
--m_floats[0];
--m_floats[1];
return *this;
@ -272,13 +270,13 @@ namespace etk
/**
* @brief Return the x value
*/
const T& getX() const {
const T& getX(void) const {
return m_floats[0];
}
/**
* @brief Return the y value
*/
const T& getY() const {
const T& getY(void) const {
return m_floats[1];
}
/**
@ -296,19 +294,19 @@ namespace etk
/**
* @brief Return the x value
*/
const T& x() const {
const T& x(void) const {
return m_floats[0];
}
/**
* @brief Return the y value
*/
const T& y() const {
const T& y(void) const {
return m_floats[1];
}
operator T *() {
operator T *(void) {
return &m_floats[0];
}
operator const T *() const {
operator const T *(void) const {
return &m_floats[0];
}
/**
@ -348,8 +346,6 @@ namespace etk
etk::CCout& operator <<(etk::CCout &os, const etk::Vector2D<float>& obj);
etk::CCout& operator <<(etk::CCout &os, const etk::Vector2D<uint32_t>& obj);
etk::CCout& operator <<(etk::CCout &os, const etk::Vector2D<bool>& obj);
};
// To siplify the writing of the code ==> this permit to have the same name with the glsl language...
typedef etk::Vector2D<float> vec2;

View File

@ -1,14 +1,18 @@
#!/usr/bin/python
import lutinModule
import lutinTools
import lutinModule as module
import lutinTools as tools
def Create(target):
def get_desc():
return "e-tk : Ewol tool kit"
def create(target):
# module name is 'edn' and type binary.
myModule = lutinModule.module(__file__, 'etk', 'LIBRARY')
myModule = module.Module(__file__, 'etk', 'LIBRARY')
# add extra compilation flags :
myModule.add_extra_compile_flags()
# add the file to compile:
myModule.AddSrcFile([
myModule.add_src_file([
'etk/debugGeneric.cpp',
'etk/debug.cpp',
'etk/unicode.cpp',
@ -31,35 +35,35 @@ def Create(target):
'etk/archive/Zip.cpp'])
if target.name=="Windows":
myModule.AddSrcFile('etk/os/Mutex.Windows.cpp')
myModule.AddSrcFile('etk/os/Semaphore.Windows.cpp')
myModule.add_src_file('etk/os/Mutex.Windows.cpp')
myModule.add_src_file('etk/os/Semaphore.Windows.cpp')
else:
myModule.AddSrcFile('etk/os/Mutex.Generic.cpp')
myModule.AddSrcFile('etk/os/Semaphore.Generic.cpp')
myModule.add_src_file('etk/os/Mutex.Generic.cpp')
myModule.add_src_file('etk/os/Semaphore.Generic.cpp')
# name of the dependency
myModule.AddModuleDepend('linearmath')
myModule.AddModuleDepend('minizip')
myModule.add_module_depend('linearmath')
myModule.add_module_depend('minizip')
if target.buildMode == "release":
# TODO : The other way is to remove this ...
# TODO : Fore release mode : the etk folder are absolutly not at the same position in the tree ...
myModule.CompileFlags_CC("-DMODE_RELEASE")
myModule.compile_flags_CC("-DMODE_RELEASE")
else:
myModule.AddExportFlag_CC("-DDEBUG_LEVEL=3")
myModule.AddExportFlag_CC("-DDEBUG=1")
myModule.add_export_flag_CC("-DDEBUG_LEVEL=3")
myModule.add_export_flag_CC("-DDEBUG=1")
# Bor backtrace display :
if target.name!="Windows":
myModule.AddExportflag_LD("-ldl -rdynamic")
myModule.add_export_flag_LD("-ldl -rdynamic")
if target.name=="Windows":
None
elif target.name=="Android":
None
else:
myModule.AddExportflag_LD("-lpthread")
myModule.add_export_flag_LD("-lpthread")
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__))
myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule

View File

@ -1,17 +1,21 @@
#!/usr/bin/python
import lutinModule
import lutinTools
import lutinModule as module
import lutinTools as tools
import datetime
def Create(target):
def get_desc():
return "e-tk test software"
def create(target):
# module name is 'edn' and type binary.
myModule = lutinModule.module(__file__, 'etktest', 'BINARY')
myModule = module.Module(__file__, 'etktest', 'BINARY')
# add the file to compile:
myModule.AddSrcFile([
myModule.add_src_file([
'test/main.cpp'])
myModule.AddModuleDepend(['etk'])
myModule.add_module_depend(['etk'])
# add the currrent module at the system
return myModule

View File

@ -2,6 +2,10 @@
import monkModule as module
import monkTools as tools
def get_desc():
return "e-tk : Ewol tool kit"
def create():
# module name is 'edn' and type binary.
myModule = module.Module(__file__, 'etk', 'LIBRARY')
@ -11,5 +15,3 @@ def create():
# add the currrent module at the
return myModule
def get_desc():
return ""