]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Win32 compatibility.
authorrnv <rnv@opencascade.com>
Thu, 17 Oct 2013 07:24:33 +0000 (07:24 +0000)
committerrnv <rnv@opencascade.com>
Thu, 17 Oct 2013 07:24:33 +0000 (07:24 +0000)
35 files changed:
doc/docutils/CMakeLists.txt
doc/salome/gui/GEOM/CMakeLists.txt
idl/CMakeLists.txt
src/EntityGUI/EntityGUI_FieldDlg.cxx
src/GEOM/CMakeLists.txt
src/GEOM/GEOM_Engine.hxx
src/GEOM_SWIG_WITHIHM/CMakeLists.txt
src/ImportExportGUI/ImportExportGUI_ExportXAODlg.h
src/ImportExportGUI/ImportExportGUI_ImportXAODlg.h
src/XAO/CMakeLists.txt
src/XAO/XAO.hxx [new file with mode: 0755]
src/XAO/XAO_BooleanField.hxx
src/XAO/XAO_BooleanStep.hxx
src/XAO/XAO_BrepGeometry.hxx
src/XAO/XAO_DoubleField.hxx
src/XAO/XAO_DoubleStep.hxx
src/XAO/XAO_Exception.hxx
src/XAO/XAO_Field.cxx
src/XAO/XAO_Field.hxx
src/XAO/XAO_GeometricElement.hxx
src/XAO/XAO_Geometry.hxx
src/XAO/XAO_Group.hxx
src/XAO/XAO_IntegerField.hxx
src/XAO/XAO_IntegerStep.hxx
src/XAO/XAO_Step.hxx
src/XAO/XAO_StringField.hxx
src/XAO/XAO_StringStep.hxx
src/XAO/XAO_Xao.hxx
src/XAO/XAO_XaoExporter.hxx
src/XAO/XAO_XaoUtils.cxx
src/XAO/XAO_XaoUtils.hxx
src/XAO/tests/BrepGeometryTest.cxx
src/XAO/tests/TestUtils.hxx
src/XAO_Swig/CMakeLists.txt
src/XAO_Swig/xao.i

index 985c835de674d2c51747edce2a4f28148523192b..681e33800ae40cdd64f8b1f544d940cda24f9ddf 100755 (executable)
@@ -45,7 +45,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py)
 #    Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
 
 SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
-IF(WINDOWS)
+IF(WIN32)
   STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
   @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
   @SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
@@ -65,7 +65,7 @@ IF(WINDOWS)
   ")
   SET(EXT "bat")
   SET(CALL_STR "call")
-ELSE(WINDOWS)
+ELSE(WIN32)
   SET(SCR  " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
   export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
   export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
@@ -93,7 +93,7 @@ ELSE(WINDOWS)
   )
   SET(EXT "sh")
   SET(CALL_STR ".")
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
 
index 9a8550ef7e76bd25797b0a216f55004391f89c82..93285c4c79d04b121007dfd0e4dde22927db5c94 100644 (file)
@@ -34,18 +34,17 @@ SALOME_CONFIGURE_FILE(static/header.html.in ${builddir}/static/header.html)
 SALOME_CONFIGURE_FILE(static/header_py.html.in ${builddir}/static/header_py.html)
 
 SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
-IF(WINDOWS)
+IF(WIN32)
   STRING(REPLACE "/" "\\" f ${f})
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
-ADD_CUSTOM_TARGET(usr_docs mkdir -p tmp 
+ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/geomBuilder.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/geomBuilder.py
   COMMAND ${PYTHON_EXECUTABLE} ${f} -o tmp/gsketcher.py ${CMAKE_SOURCE_DIR}/src/GEOM_SWIG/gsketcher.py
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_tui 
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
-  COMMAND ${PYTHON_EXECUTABLE} -c "import shutil; shutil.rmtree(r'''tmp''')"
-  COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''', ignore=shutil.ignore_patterns('*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM/geompy_doc'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GEOM''')"
+  COMMAND  ${CMAKE_COMMAND} -E remove_directory tmp
   VERBATIM 
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
 )
@@ -53,5 +52,16 @@ ADD_CUSTOM_TARGET(usr_docs mkdir -p tmp
 ADD_DEPENDENCIES(usr_docs html_docs)
 
 INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${SALOME_INSTALL_DOC}/gui)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${SALOME_INSTALL_DOC}/gui
+        PATTERN "*usr_docs*" EXCLUDE
+        PATTERN "*CMakeFiles*" EXCLUDE
+        PATTERN "static" EXCLUDE
+        PATTERN "Makefile*" EXCLUDE
+        PATTERN "*.cmake" EXCLUDE
+        PATTERN "doxyfile*" EXCLUDE
+        PATTERN "*.vcproj" EXCLUDE
+)
+
 INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM)
+
index 3f93f4c2a7e40e6abf33dc4346bad4d51beb432c..44a1b598e7b609a75c91d85e4b62667f5236d016 100755 (executable)
@@ -25,9 +25,9 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_BINARY_DIR}
 )
 
-IF(WINDOWS)
+IF(WIN32)
   ADD_DEFINITIONS(-DNOGDI)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 
 SET(SalomeIDLGEOM_IDLSOURCES
index 7fd1adf9de1d3d5f5aafc6671b72caccdc13749d..f819f96e84d6e41df1abfbe4a89270825cab24bf 100644 (file)
 #include <SALOMEDS_wrap.hxx>
 #include <GEOMImpl_Types.hxx>
 
+#ifdef max
+  #undef max
+#endif
+
 
 const int theIntLimit = std::numeric_limits<int>::max() - 10;
 
index a1ce3979a09c3659dad6af2058b222e8c5d8ca24..607ac6e1dfac556aee590f178ae8f50e35357ff8 100755 (executable)
@@ -40,6 +40,7 @@ SET(_link_LIBRARIES
   ${CAS_TKCDF}
   ${CAS_TKG3d}
   ${KERNEL_SALOMELocalTrace}
+  ${KERNEL_OpUtil}
   GEOMSketcher
   )
 
index 67e2dfe307d5418de0503bfa9ea4893b8139dbd1..174ad0c90de488d311581b30d28d74d1cc89d668 100644 (file)
@@ -180,9 +180,9 @@ class GEOM_Engine
                                    const TCollection_AsciiString&            anEntry,
                                    Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
 
-  void DocumentModified(const int theDocId, const bool isModified);
+  Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
   
-  bool DocumentModified(const int theDocId);
+  Standard_EXPORT bool DocumentModified(const int theDocId);
 
  protected:
   Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);       
index a44292a7ff42d45f114599c98525154218161142..7a36ff10bb9dee04d313183a913485e9b81b7b2c 100755 (executable)
@@ -77,9 +77,9 @@ SET(_swig_SCRIPTS
 
 SWIG_ADD_MODULE(libGEOM_Swig python libGEOM_Swig.i libGEOM_Swig.cxx)
 SWIG_LINK_LIBRARIES(libGEOM_Swig "${_link_LIBRARIES}")
-IF(WINDOWS)
+IF(WIN32)
   SET_TARGET_PROPERTIES(_libGEOM_Swig PROPERTIES DEBUG_OUTPUT_NAME _libGEOM_Swig_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
 
 INSTALL(TARGETS _libGEOM_Swig DESTINATION ${SALOME_INSTALL_PYTHON})
 
index acc4737cda579e42afb76f7f764b02f41ac96447..1f009b8d625eeda7a52147a1d7bbb16a4484bf44 100644 (file)
@@ -67,7 +67,7 @@ private slots:
     void ClickOnOk();
     bool ClickOnApply();
     void ActivateThisDialog();
-    void LineEditReturnPressed();
+//  void LineEditReturnPressed();
     void SelectionIntoArgument();
     void SetEditCurrentArgument();
     void btnFileSelectClicked();
index 085c7bd9021d3ff8277e33fd613d545b27dde2a4..baacc3311f000e37807f291f2f889f57c14e5481 100644 (file)
@@ -59,7 +59,7 @@ private slots:
     void ClickOnOk();
     bool ClickOnApply();
     void ActivateThisDialog();
-    void LineEditReturnPressed();
+//  void LineEditReturnPressed();
     void btnFileSelectClicked();
 };
 
index b0ab3a4cd9f55ec1bb71302e5ef1bb229d71477e..433874f735c15da15765f39c6b595c9252b892ae 100644 (file)
@@ -40,12 +40,13 @@ ADD_DEFINITIONS(
 SET(_link_LIBRARIES
   ${PTHREAD_LIBRARIES}
   ${LIBXML2_LIBRARIES}
-  ${CAS_TKBRep} ${CAS_TKTopAlgo}
+  ${CAS_TKBRep} ${CAS_TKTopAlgo} ${CAS_TKG2d}
   )
 
 # --- headers ---
 
 SET(XAO_HEADERS
+  XAO.hxx 
   XAO_BooleanField.hxx
   XAO_BooleanStep.hxx
   XAO_BrepGeometry.hxx
diff --git a/src/XAO/XAO.hxx b/src/XAO/XAO.hxx
new file mode 100755 (executable)
index 0000000..128e520
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Roman NIKOLAEV (OpenCascade)
+
+#if defined XAO_EXPORTS || defined Xao_EXPORTS
+ #if defined WIN32
+  #define XAO_EXPORT __declspec( dllexport )
+ #else
+  #define XAO_EXPORT
+ #endif
+#else
+ #if defined WIN32
+  #define XAO_EXPORT __declspec( dllimport )
+ #else
+  #define XAO_EXPORT
+ #endif
+#endif
\ No newline at end of file
index 9860c46438abadc238573ef21bd9240d2ca29f68..5fed9f254104eba475a7bafe29adcf402675cfce 100644 (file)
 
 #include <string>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Field.hxx"
 #include "XAO_BooleanStep.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class BooleanField
      * Represents a field with boolean values.
      */
-    class BooleanField : public Field
+    class XAO_EXPORT BooleanField : public Field
     {
     public:
         /**
index 9986a069aa0108c4cab3b84d53046f05dfd44d1e..f1e596b74d7582ebaf47edec2459909736913563 100644 (file)
 
 #include <vector>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Step.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class BooleanStep
      * Step with boolean values.
      */
-    class BooleanStep : public Step
+    class XAO_EXPORT BooleanStep : public Step
     {
     public:
         /**
index a457b3a770345702b29fc7ac4a14d42aaaac4355..6be30f970125bdc035d15cb885af6ccd157978c1 100644 (file)
 
 #include <TopoDS_Shape.hxx>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Geometry.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class BrepGeometry
      * Representation of a BRep Geometry.
      */
-    class BrepGeometry : public Geometry
+    class XAO_EXPORT BrepGeometry : public Geometry
     {
     public:
         /**
index 040a503b762229984058d0e2c427563af4b73f2a..4e58ea9912db4ad0c12b828c5c8dab68c43b0f6e 100644 (file)
 
 #include <string>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Field.hxx"
 #include "XAO_DoubleStep.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class DoubleField
      * Represents a field with double values.
      */
-    class DoubleField : public Field
+    class XAO_EXPORT DoubleField : public Field
     {
     public:
         /**
index 5f4f3e34ad3fcb11e1615ea7208db7f4a8849e0f..699286e3792b055d9bd7a4c69560da4f9dc24dc0 100644 (file)
 
 #include <vector>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Step.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class DoubleStep
      * Step with double values.
      */
-    class DoubleStep : public Step
+    class XAO_EXPORT DoubleStep : public Step
     {
     public:
         /**
index dce64a9677a028bea826f41bf784405904f64ea8..78d4b3072af9587dc5fdfdd64390dd50e1d187fe 100644 (file)
 #ifndef __XAO_EXCEPTION_HXX__
 #define __XAO_EXCEPTION_HXX__
 
+#include "XAO.hxx"
+#include <exception>
+
 namespace XAO
 {
     /**
      * \class XAO_Exception
      * Exception for XAO operations.
      */
-    class XAO_Exception : public std::exception
+    class XAO_EXPORT XAO_Exception : public std::exception
     {
     public:
         /**
index 51d73616c3150c146432136c9d94cc3becdc8e0a..1e5f27ace55dbb1eeb27f900f69084b717ee7169 100644 (file)
@@ -44,7 +44,7 @@ Field::Field(const XAO::Dimension& dimension,
 
 Field::~Field()
 {
-    for (int i = 0; i < m_steps.size(); ++i)
+    for (unsigned int i = 0; i < m_steps.size(); ++i)
         delete m_steps[i];
 }
 
@@ -81,7 +81,7 @@ throw (XAO_Exception)
 void Field::setComponentsNames(const std::vector<std::string>& names)
 throw (XAO_Exception)
 {
-    for (int i = 0; i < names.size(); ++i)
+    for (unsigned int  i = 0; i < names.size(); ++i)
     {
         if (i < m_nbComponents)
             m_components[i] = names[i];
index e1931d587bc11ba26018e3a5d3de224c4142d200..3a940f49021e1ca0a613695a17243c3d4598fc79 100644 (file)
 #include <string>
 #include <vector>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Step.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
 namespace XAO
 {
     typedef std::vector<Step*>::iterator stepIterator;
@@ -35,7 +42,7 @@ namespace XAO
      * @class Field
      * A geometrical Field.
      */
-    class Field
+    class XAO_EXPORT Field
     {
     protected:
         /**
index f0496479ecbc18d9f606e8bd3fe27bd2b46b0492..cfb0018522e866012362964d954105696cd6fa6f 100644 (file)
 
 #include <string>
 #include <map>
+
+#include "XAO.hxx"
 #include "XAO_Exception.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
 namespace XAO
 {
     /**
      * \class GeometricElement
      * Generic class to manipulate a topologic element (vertex, edge, face or solid).
      */
-    class GeometricElement
+    class XAO_EXPORT GeometricElement
     {
     public:
         /**
@@ -100,7 +108,7 @@ namespace XAO
      * \class GeometricElementList
      * Generic class to manipulate a list of topologic element.
      */
-    class GeometricElementList
+    class XAO_EXPORT GeometricElementList
     {
     public:
         /**
index 12ca3101affd4226c130ccef3defe0fe562c9495..da9ca5b7c6e7af85105a2e1d259c5bffa1aa135d 100644 (file)
 
 #include <string>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Exception.hxx"
 #include "XAO_GeometricElement.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class Geometry
      * Base class for geometries.
      */
-    class Geometry
+    class XAO_EXPORT Geometry
     {
     protected:
         /**
index de46a7dc0fb31438c8caff56ec300c9ec9311d49..052ee3095f5e66d3233fb30bec72b7cf12e078a2 100644 (file)
 #include <string>
 #include <set>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
-
+#ifdef WIN32
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
 namespace XAO
 {
     /**
      * \class Group
      * Class to represent a Geometrical Group.
      */
-    class Group
+    class XAO_EXPORT Group
     {
     public:
         /**
index 9e33cb364fb6b8e845ce5a79d5bd4dda9b08316f..f619449f76bbf9896f922cbf8f60085db21cab79 100644 (file)
 
 #include <string>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Field.hxx"
 #include "XAO_IntegerStep.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class IntegerField
      * Represents a field with integer values.
      */
-    class IntegerField : public Field
+    class XAO_EXPORT IntegerField : public Field
     {
     public:
         /**
index 09673466a8847014937c41cb16c89c7cf6d39e88..322a44bcb4a8a01eb096c03829dd29d45a1ba941 100644 (file)
 
 #include <vector>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Step.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class IntegerStep
      * Step with integer values.
      */
-    class IntegerStep : public Step
+    class XAO_EXPORT IntegerStep : public Step
     {
     public:
         /**
index 6c61020c90ebb62e10371d7298e82fb1b5a54413..903d57549e206c9cdab911516cef2231c0bdb84a 100644 (file)
 #ifndef __XAO_STEP_HXX__
 #define __XAO_STEP_HXX__
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
+
 namespace XAO
 {
     /**
      * @class Step
      * Base class for steps.
      */
-    class Step
+    class XAO_EXPORT Step
     {
     protected:
         /** Default constructor. */
index b9adb690e4d84a901d5afe6fd11e5493cdce7a9e..107efe80e8dfe7d31bec17b7af91a82221ae3a12 100644 (file)
 
 #include <string>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Field.hxx"
 #include "XAO_StringStep.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
 namespace XAO
 {
     /**
      * @class StringField
      * Represents a field with string values.
      */
-    class StringField : public Field
+    class XAO_EXPORT StringField : public Field
     {
     public:
         /**
index b0eb2f61511efe918f510f28066845d19448f3ed..ed6e1772d4139f06ee6030491ec7a92cac182705 100644 (file)
 #include <string>
 #include <vector>
 
+#include "XAO.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Step.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
 namespace XAO
 {
     /**
      * @class StringStep
      * Step with strings values.
      */
-    class StringStep : public Step
+    class XAO_EXPORT StringStep : public Step
     {
     public:
         /**
index 451d327cb6d72707ca0469a0964ef0f5796a30cc..bceb909bd35fc18cdb3e1311b165e68f5a53c8e1 100644 (file)
 
 #include <string>
 #include <list>
+
+#include "XAO.hxx"
 #include "XAO_Exception.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Geometry.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#pragma warning(disable:4251) // Warning dll-interface ...
+#endif
+
 namespace XAO
 {
     class Group;
@@ -40,7 +47,7 @@ namespace XAO
      * @class Xao
      * The Xao class describes the XAO format.
      */
-    class Xao
+    class XAO_EXPORT Xao
     {
     public:
         /**
index a63e921ca1ec6a2dca7c8d4ec3aa12b27b81ee8d..2971ab63e2413968e82948c27a4c003d79e2a0ac 100644 (file)
 #ifndef __XAO_XAOEXPORTER_HXX__
 #define __XAO_XAOEXPORTER_HXX__
 
+#include "XAO.hxx"
 #include "XAO_Xao.hxx"
 #include "XAO_Geometry.hxx"
 #include "XAO_Group.hxx"
 #include "XAO_Field.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
+
 namespace XAO
 {
     /**
      * @class XaoExporter
      * Util class for import/export XAO.
      */
-    class XaoExporter
+    class XAO_EXPORT XaoExporter
     {
     public:
         /**
index 206f5ed0cd4c86d211a59dcc1924737931b8ac48..2ef33528657721bac9b73af4cf065b372441da1c 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <sstream>
 
+#include "XAO_Exception.hxx"
 #include "XAO_Xao.hxx"
 #include "XAO_XaoUtils.hxx"
 
index cc82e0d2d95625037388c2087d57aad68e787a43..02b9a36ed8ce7844943dc431018d5e6de910955a 100644 (file)
 #include <string>
 #include <exception>
 
+#include "XAO.hxx"
 #include "XAO_Exception.hxx"
 
+#ifdef WIN32
+#pragma warning(disable:4290) // Warning Exception ...
+#endif
 
 namespace XAO
 {
@@ -66,7 +70,7 @@ namespace XAO
      * \class XaoUtils
      * Utilities class to convert types.
      */
-    class XaoUtils
+    class XAO_EXPORT XaoUtils
     {
     public:
         /**
index 069b64d31f30155e7c345e71137175311f370863..d4ed474f92fff93ad1122cffa57e2e0950fa52ac 100644 (file)
@@ -152,7 +152,7 @@ void BrepGeometryTest::testGetEdgeVertices()
 void printVector(std::vector<int>& v)
 {
     std::cout << "# ";
-    for (int i = 0; i < v.size(); i++)
+    for (unsigned int i = 0; i < v.size(); i++)
         std::cout << v[i] << ", ";
     std::cout << std::endl;
 }
@@ -266,7 +266,7 @@ void BrepGeometryTest::testParse()
         {
             std::cout << "  Shell #" << shellIndex << std::endl;
             std::vector<int> faces = geom->getSolidFaces(solidIndex, shellIndex);
-            for (int indf = 0; indf < faces.size(); ++indf)
+            for (unsigned int indf = 0; indf < faces.size(); ++indf)
             {
                 int faceIndex = faces[indf];
                 std::cout  << "    Face #" << geom->getFaceReference(faceIndex) << std::endl;
@@ -276,7 +276,7 @@ void BrepGeometryTest::testParse()
                 {
                     std::cout << "      Wire #" << wireIndex << std::endl;
                     std::vector<int> edges = geom->getFaceEdges(faceIndex, wireIndex);
-                    for (int inde = 0; inde < edges.size(); ++inde)
+                    for (unsigned int inde = 0; inde < edges.size(); ++inde)
                     {
                         int edgeIndex = edges[inde];
                         std::cout << "        Edge #" << geom->getEdgeReference(edgeIndex) << " : ";
index f754db107e97bc9572f813b3f2610667082e0ff7..83e3436806df3f47cf6d6a287e1b2d197bf22194 100644 (file)
@@ -12,7 +12,8 @@ namespace XAO
         static std::string getTestFilePath(const std::string& fileName)
         {
             std::string dataDir = getenv("GEOM_SRC_DIR");
-            dataDir += "/src/XAO/tests/data/" + fileName;
+            dataDir += "/src/XAO/tests/data/";
+            dataDir += fileName;
             return dataDir;
         }
 
index 03091f92516597c48bc375ee1313f104f0f8fc1b..929e7318f72713d6f0d67a1cd0ad63a0d5186185 100644 (file)
@@ -59,9 +59,9 @@ SET_SOURCE_FILES_PROPERTIES(xao.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 SWIG_ADD_MODULE(xao python xao.i)
 SWIG_LINK_LIBRARIES(xao "${_link_LIBRARIES}")
-IF(WINDOWS)
+IF(WIN32)
   SET_TARGET_PROPERTIES(_xao PROPERTIES DEBUG_OUTPUT_NAME _xao_d)
-ENDIF(WINDOWS)
+ENDIF(WIN32)
   
 INSTALL(TARGETS _xao DESTINATION ${SALOME_INSTALL_PYTHON})
 INSTALL(FILES xao.i DESTINATION ${SALOME_INSTALL_HEADERS})
index 2a0942b3a3d092903fb6e7a0b4b02135c486da31..85f47cf49ef8d96efe08b10557f149225c8e2326 100644 (file)
@@ -1,5 +1,6 @@
 %module xao
 %{
+#include "XAO.hxx"
 #include "XAO_Exception.hxx"
 #include "XAO_XaoUtils.hxx"
 #include "XAO_Xao.hxx"
@@ -48,6 +49,7 @@ namespace std
 %ignore XAO::MsgBuilder;
 %ignore XAO::XaoUtils;
 
+%include "XAO.hxx"
 %include XAO_Exception.hxx
 %include XAO_XaoUtils.hxx