From 9396e5e02d863f6fa8c72b503895379b9ebd6a85 Mon Sep 17 00:00:00 2001 From: jriegel Date: Sat, 7 Jan 2012 15:29:57 +0100 Subject: [PATCH] First work for LibPack8 and PropertyUUID --- src/Base/Uuid.h | 7 +++++++ src/Mod/Assembly/App/AppAssembly.cpp | 7 ++++++- src/Mod/Assembly/App/CMakeLists.txt | 5 +++++ src/Mod/Assembly/App/Item.cpp | 4 +++- src/Mod/Assembly/App/Item.h | 5 +++-- src/Mod/Assembly/Gui/CMakeLists.txt | 6 ++++++ 6 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/Base/Uuid.h b/src/Base/Uuid.h index 3ec4e9af9..362d6b7b2 100644 --- a/src/Base/Uuid.h +++ b/src/Base/Uuid.h @@ -47,8 +47,15 @@ public: const std::string& getValue(void) const; static std::string createUuid(void); + /// raw data + unsigned long Data1; + unsigned short Data2; + unsigned short Data3; + unsigned char Data4[ 8 ]; + private: std::string _uuid; + }; } //namespace Base diff --git a/src/Mod/Assembly/App/AppAssembly.cpp b/src/Mod/Assembly/App/AppAssembly.cpp index 3a2434acd..d46f1d4d9 100644 --- a/src/Mod/Assembly/App/AppAssembly.cpp +++ b/src/Mod/Assembly/App/AppAssembly.cpp @@ -30,6 +30,9 @@ #include #include +#include "Item.h" +#include "ItemAssembly.h" +#include "ItemPart.h" extern struct PyMethodDef Assembly_methods[]; @@ -61,7 +64,9 @@ void AssemblyExport initAssembly() // call PyType_Ready, otherwise we run into a segmentation fault, later on. // This function is responsible for adding inherited slots from a type's base class. - //Assembly::FeatureViewPart ::init(); + Assembly::Item ::init(); + Assembly::ItemAssembly ::init(); + Assembly::ItemPart ::init(); } } // extern "C" diff --git a/src/Mod/Assembly/App/CMakeLists.txt b/src/Mod/Assembly/App/CMakeLists.txt index 11eb37cc0..a9e499a91 100644 --- a/src/Mod/Assembly/App/CMakeLists.txt +++ b/src/Mod/Assembly/App/CMakeLists.txt @@ -1,3 +1,8 @@ +if(MSVC) + add_definitions(-DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH) +else(MSVC) + add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H) +endif(MSVC) include_directories( ${CMAKE_SOURCE_DIR}/src diff --git a/src/Mod/Assembly/App/Item.cpp b/src/Mod/Assembly/App/Item.cpp index b77bb871e..0ca9126d8 100644 --- a/src/Mod/Assembly/App/Item.cpp +++ b/src/Mod/Assembly/App/Item.cpp @@ -39,7 +39,9 @@ PROPERTY_SOURCE(Assembly::Item, Part::Feature) Item::Item() { - ADD_PROPERTY(Model,(0)); + ADD_PROPERTY(Id,(0)); + ADD_PROPERTY(Name,(0)); + ADD_PROPERTY(Description,(0)); } short Item::mustExecute() const diff --git a/src/Mod/Assembly/App/Item.h b/src/Mod/Assembly/App/Item.h index 15f4f8af0..0dd7f9fe1 100644 --- a/src/Mod/Assembly/App/Item.h +++ b/src/Mod/Assembly/App/Item.h @@ -38,8 +38,9 @@ class AssemblyExport Item : public Part::Feature public: Item(); - App::PropertyLinkList Model; - App::PropertyLink Tip; + App::PropertyString Id; + App::PropertyString Name ; + App::PropertyString Description ; /** @name methods override feature */ //@{ diff --git a/src/Mod/Assembly/Gui/CMakeLists.txt b/src/Mod/Assembly/Gui/CMakeLists.txt index 432839c5d..04734001b 100644 --- a/src/Mod/Assembly/Gui/CMakeLists.txt +++ b/src/Mod/Assembly/Gui/CMakeLists.txt @@ -1,3 +1,9 @@ +if(MSVC) + add_definitions(-DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH) +else(MSVC) + add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H) +endif(MSVC) + include_directories( ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}