]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To make reusable some C++ idioms that are implemented in MEDWrapper of MED module
authorapo <apo@opencascade.com>
Thu, 21 Jul 2005 13:31:34 +0000 (13:31 +0000)
committerapo <apo@opencascade.com>
Thu, 21 Jul 2005 13:31:34 +0000 (13:31 +0000)
src/CONVERTOR/Makefile.in
src/CONVERTOR/VISU_Convertor.hxx

index 3b9480e963abb587f6b38499715ee868ad960209..fcbad7b7e36c35facb7946be3781c2c3148034da 100644 (file)
@@ -32,12 +32,18 @@ VPATH=.:@srcdir@
 
 @COMMENCE@
 
-EXPORT_HEADERS = VISU_Convertor.hxx  VISU_Convertor_impl.hxx  VISU_ConvertorUtils.hxx  VISU_ExtractUnstructuredGrid.hxx
+EXPORT_HEADERS = VISU_Convertor.hxx  \
+       VISU_Convertor_impl.hxx  \
+       VISU_ConvertorUtils.hxx  \
+       VISU_ExtractUnstructuredGrid.hxx
 
 # Libraries targets
 
 LIB = libVisuConvertor.la
-LIB_SRC = VISU_Convertor.cxx VISU_Convertor_impl.cxx VISU_ConvertorUtils.cxx VISU_ExtractUnstructuredGrid.cxx \
+LIB_SRC = VISU_Convertor.cxx \
+       VISU_Convertor_impl.cxx \
+       VISU_ConvertorUtils.cxx \
+       VISU_ExtractUnstructuredGrid.cxx \
        VISU_MedConvertor.cxx
 
 # Executables targets
@@ -45,7 +51,12 @@ BIN = VISUConvertor
 BIN_SRC = 
 
 CPPFLAGS+= -ftemplate-depth-32 $(VTK_INCLUDES) $(HDF5_INCLUDES) $(QT_INCLUDES) \
-       -I${KERNEL_ROOT_DIR}/include/salome -I${MED_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
+       -I${KERNEL_ROOT_DIR}/include/salome \
+       -I${MED_ROOT_DIR}/include/salome \
+       $(BOOST_CPPFLAGS)
+
 LDFLAGS+= $(VTK_LIBS) $(QT_LIBS) -L${MED_ROOT_DIR}/lib/salome -lMEDWrapper
+
 LDFLAGSFORBIN=$(LDFLAGS) -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase
+
 @CONCLUDE@
index 31e38ff3b416af5d7ea8ad09ed87a848962a763a..ee0b46e84ef2fd0660b0efcf3a161feb38b4f468 100644 (file)
 #include <string>
 #include <stdexcept>
 
-#include <boost/shared_ptr.hpp>
+#include "MED_SharedPtr.hxx"
 
 class vtkUnstructuredGrid;
 
 namespace VISU{
 
-  template<class T> class SharedPtr: public boost::shared_ptr<T>
-  {
-  public:
-    SharedPtr() {}
-
-    template<class Y>
-    explicit SharedPtr(Y * p): 
-      boost::shared_ptr<T>(p) 
-    {}
-
-    template<class Y>
-    SharedPtr(SharedPtr<Y> const & r):
-      boost::shared_ptr<T>(r,boost::detail::dynamic_cast_tag())
-    {}
-
-    template<class Y>
-    SharedPtr & operator=(SharedPtr<Y> const & r)
-    {
-      boost::shared_ptr<T>(r,boost::detail::dynamic_cast_tag()).swap(*this);
-      return *this;
-    }
+  using MED::SharedPtr;
 
-    template<class Y> SharedPtr& operator()(Y * p) // Y must be complete
-    {
-      return operator=<Y>(SharedPtr<Y>(p));
-    }
-
-    operator const T& () const 
-    { 
-      return *(this->get());
-    }
-
-    operator T& () 
-    { 
-      return *(this->get());
-    }
-
-  };
   //---------------------------------------------------------------
-
-
   enum  TEntity {NODE_ENTITY, EDGE_ENTITY, FACE_ENTITY, CELL_ENTITY};
 
   struct TMesh;