From 8288a4327a437863a75f46bfb93d15669d6f311f Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Fri, 14 Sep 2018 10:37:25 +0200 Subject: [PATCH] #3212 BBTK Feature New Normal - vtk8itk4wx3-mingw64 MACOS --- kernel/src/bbtkPackage.cxx | 5 +- kernel/src/bbtkRTTI.cxx | 38 +++++++------ kernel/src/bbtkSystem.h | 69 ++++++++++++----------- kernel/src/bbtkWxGUIPackageBrowser2.cxx | 11 ++-- kernel/src/bbtkWxGUIPackageBrowser2.h | 2 + packages/vtk/CMakeLists.txt | 1 + packages/vtk/src/bbvtkImageBoundaries.cxx | 9 ++- 7 files changed, 75 insertions(+), 60 deletions(-) diff --git a/kernel/src/bbtkPackage.cxx b/kernel/src/bbtkPackage.cxx index 7507a2a..f33d84e 100644 --- a/kernel/src/bbtkPackage.cxx +++ b/kernel/src/bbtkPackage.cxx @@ -1214,10 +1214,7 @@ printf("EED Package::OpenDynamicLibrary %s %s \n", libname.c_str(), package_n s << "
\n"; */ } - } - - else - { + } else { s << "

"<\n"; s << "

\n"; s << "
Description : " diff --git a/kernel/src/bbtkRTTI.cxx b/kernel/src/bbtkRTTI.cxx index be8ac46..bad76a8 100644 --- a/kernel/src/bbtkRTTI.cxx +++ b/kernel/src/bbtkRTTI.cxx @@ -74,8 +74,16 @@ namespace bbtk << " to " << TypeName(target_type) << std::endl); void* target_pointer = 0; -#if __GNUC__ > 3 || \ - (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || \ + + + +#if __APPLE__ + //EED2018-08-28 Be careful #include is not complete (CommandLine mechanisme Xcode) + printf("EED bbtkRTTI run_time_up_or_down_cast 2018-08-28 Warnning !!!! Apple cast missing __do_upcast "); + return source_pointer; +#else + #if __GNUC__ > 3 || \ + (__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || \ (__GNUC_MINOR__ == 1 && \ __GNUC_PATCHLEVEL__ > 0))) @@ -86,31 +94,25 @@ namespace bbtk void* tmp = source_pointer; if (source_type.__do_upcast(targetTI,&tmp)) - { - target_pointer = tmp; - } - else - { - bbtkDebugMessage("data",7, + { + target_pointer = tmp; + } else { + bbtkDebugMessage("data",7, " * upcast failed : trying dynamic down cast" < #else -#ifdef CMAKE_HAVE_INTTYPES_H - // Old system only have this - #include // For uint8_t uint16_t and uint32_t -#else - //#include "XXX.h" -// Broken plateforms do not respect C99 and do not provide those typedef -// Special case for recent Borland compiler, comes with stdint.h -#if defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560) \ - || defined(__MINGW32__) -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed int int32_t; -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; - -/// \todo Find a clever way to deal with int64_t, uint64_t - -#else -#error "Sorry your plateform is not supported" -#endif // defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560) || defined(__MINGW32__) -#endif // CMAKE_HAVE_INTTYPES_H + #ifdef CMAKE_HAVE_INTTYPES_H + // Old system only have this + #include // For uint8_t uint16_t and uint32_t + #else + //#include "XXX.h" + // Broken plateforms do not respect C99 and do not provide those typedef + // Special case for recent Borland compiler, comes with stdint.h + #if defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560) \ + || defined(__MINGW32__) + typedef signed char int8_t; + typedef signed short int16_t; + typedef signed int int32_t; + typedef unsigned char uint8_t; + typedef unsigned short uint16_t; + typedef unsigned int uint32_t; + /// \todo Find a clever way to deal with int64_t, uint64_t + #else + #error "Sorry your plateform is not supported" + #endif // defined(_MSC_VER) || defined(__BORLANDC__) && (__BORLANDC__ < 0x0560) || defined(__MINGW32__) + #endif // CMAKE_HAVE_INTTYPES_H #endif // CMAKE_HAVE_STDINT_H // Basically for VS6 and bcc 5.5.1: #ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) + #define UINT32_MAX (4294967295U) #endif @@ -231,18 +231,19 @@ namespace bbtk // file separator #if defined(_WIN32) -#define VALID_FILE_SEPARATOR "\\" -#define INVALID_FILE_SEPARATOR "/" -#define VALID_FILE_SEPARATOR_CHAR '\\' -#define INVALID_FILE_SEPARATOR_CHAR '/' + #define VALID_FILE_SEPARATOR "\\" + #define INVALID_FILE_SEPARATOR "/" + #define VALID_FILE_SEPARATOR_CHAR '\\' + #define INVALID_FILE_SEPARATOR_CHAR '/' #else -#define INVALID_FILE_SEPARATOR "\\" -#define VALID_FILE_SEPARATOR "/" -#define INVALID_FILE_SEPARATOR_CHAR '\\' -#define VALID_FILE_SEPARATOR_CHAR '/' + #define INVALID_FILE_SEPARATOR "\\" + #define VALID_FILE_SEPARATOR "/" + #define INVALID_FILE_SEPARATOR_CHAR '\\' + #define VALID_FILE_SEPARATOR_CHAR '/' #endif -#endif + +#endif //__bbtkSystem_h__ //---------------------------- @@ -266,3 +267,5 @@ namespace bbtk * \defgroup interface Graphical User Interface components * \defgroup data Data */ + + diff --git a/kernel/src/bbtkWxGUIPackageBrowser2.cxx b/kernel/src/bbtkWxGUIPackageBrowser2.cxx index 0193bb3..e87ffcb 100644 --- a/kernel/src/bbtkWxGUIPackageBrowser2.cxx +++ b/kernel/src/bbtkWxGUIPackageBrowser2.cxx @@ -271,16 +271,19 @@ int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData) //DFGO -> To identify it is a box sendtext += crea::std2wx("box:"); sendtext += crea::std2wx(d->GetFullTypeName()); + sendtext += _T(""); + printf("EED WxGUIBlackBoxList::OnBeginDrag <%s>%d <%s>%d\n", + (const char*)sendtext.mb_str(),sendtext.Len() , d->GetFullTypeName().c_str() , d->GetFullTypeName().length() ); } - } - else - { + } else { wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed")); } wxTextDataObject tdo(sendtext); + printf("EED WxGUIBlackBoxList::OnBeginDrag <%s>\n",(const char*) tdo.GetText().mb_str() ); + wxDropSource tds(tdo, this); - tds.DoDragDrop(); + tds.DoDragDrop( ); // const wxPoint& pt = event.m_pointDrag; diff --git a/kernel/src/bbtkWxGUIPackageBrowser2.h b/kernel/src/bbtkWxGUIPackageBrowser2.h index a4b8062..762f78b 100644 --- a/kernel/src/bbtkWxGUIPackageBrowser2.h +++ b/kernel/src/bbtkWxGUIPackageBrowser2.h @@ -193,6 +193,7 @@ private: wxListItemAttr m_attr; + // DECLARE_NO_COPY_CLASS(WxGUIBlackBoxListCtrl) DECLARE_EVENT_TABLE() }; @@ -243,6 +244,7 @@ private: wxCheckBox *mShowWidgetsFilter; wxCheckBox *mShowAdaptorsFilter; wxCheckBox *mShowGUIsFilter; + //RaC BlackBoxDescriptor *_actualSelected; diff --git a/packages/vtk/CMakeLists.txt b/packages/vtk/CMakeLists.txt index baa3ce5..6689a60 100644 --- a/packages/vtk/CMakeLists.txt +++ b/packages/vtk/CMakeLists.txt @@ -129,6 +129,7 @@ SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI ON) #) #=========================================================================== + #=========================================================================== SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES diff --git a/packages/vtk/src/bbvtkImageBoundaries.cxx b/packages/vtk/src/bbvtkImageBoundaries.cxx index 67eefef..3275137 100644 --- a/packages/vtk/src/bbvtkImageBoundaries.cxx +++ b/packages/vtk/src/bbvtkImageBoundaries.cxx @@ -32,7 +32,15 @@ #include "bbvtkPackage.h" #include "creaVtk_MACROS.h" + +/* + #include + +*/ + + + namespace bbvtk { @@ -43,7 +51,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageBoundaries,bbtk::AtomicBlackBox); //===== void ImageBoundaries::Process() { - printf("bbtk:vtk::ImageBoundaries::Process start\n"); if (bbGetInputIn()!=NULL){ int i,j,k; int ext[6]; -- 2.47.1