diff src/boundarycondition.h @ 253:5e9b5bbdc56b

Support both DOLFIN 1.3.0 and 1.4.0 * src/dolfin_compat.h: use a macro to set the correct shared_ptr (std or boost)
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Tue, 29 Jul 2014 18:05:56 +0200
parents 9e944b0d0fc8
children ab35a8b0deef
line wrap: on
line diff
--- a/src/boundarycondition.h	Tue Jul 29 17:11:59 2014 +0200
+++ b/src/boundarycondition.h	Tue Jul 29 18:05:56 2014 +0200
@@ -22,6 +22,7 @@
 #include <vector>
 #include <dolfin.h>
 #include <octave/oct.h>
+#include "dolfin_compat.h"
 
 class boundarycondition : public octave_base_value
 {
@@ -44,24 +45,24 @@
   is_defined (void) const
     { return true; }
 
-  const std::vector< boost::shared_ptr 
+  const std::vector< SHARED_PTR 
                    <const dolfin::DirichletBC> > &
   get_bc (void) const 
     { return bcu; }
 
   void
-  add_bc (const boost::shared_ptr<const dolfin::FunctionSpace> & V,
-          boost::shared_ptr<const dolfin::GenericFunction> f,
+  add_bc (const SHARED_PTR <const dolfin::FunctionSpace> & V,
+          SHARED_PTR <const dolfin::GenericFunction> f,
           std::size_t n)
     {
-      boost::shared_ptr<const dolfin::DirichletBC> 
+      SHARED_PTR <const dolfin::DirichletBC> 
         p (new dolfin::DirichletBC (V, f, n));
       bcu.push_back(p);
     }
 
  private:
 
-  std::vector<boost::shared_ptr 
+  std::vector<SHARED_PTR 
              <const dolfin::DirichletBC> > bcu;
 
   DECLARE_OCTAVE_ALLOCATOR;